net.sf.bt747.j2se.system
Class J2SEHttpSenderImpl

java.lang.Object
  extended by net.sf.bt747.j2se.system.J2SEHttpSenderImpl
All Implemented Interfaces:
BT747HttpSender

public class J2SEHttpSenderImpl
extends java.lang.Object
implements BT747HttpSender


Constructor Summary
J2SEHttpSenderImpl()
           
 
Method Summary
 void doRequest(java.lang.String hostname, int port, java.lang.String file, java.lang.String user, java.lang.String password, BT747Hashtable data, java.lang.String encodingOrNull, LocationSender caller)
          Send out data to a server using http the protocol.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2SEHttpSenderImpl

public J2SEHttpSenderImpl()
Method Detail

doRequest

public void doRequest(java.lang.String hostname,
                      int port,
                      java.lang.String file,
                      java.lang.String user,
                      java.lang.String password,
                      BT747Hashtable data,
                      java.lang.String encodingOrNull,
                      LocationSender caller)
Description copied from interface: BT747HttpSender
Send out data to a server using http the protocol. The data is sent with a GET request. This method may only be called by an HttpLocationSender instance which is also used to send callbacks to. The implementing classes of this interface are obliged to implement the network access in an asynchronous way.

Specified by:
doRequest in interface BT747HttpSender
Parameters:
hostname - a hostname like "www.server.com"
port - a port, typically 80 or 443 for protocols http or https resp.
file - something trailing the server name like "cgi" in "http://my.server.com:80/cgi"
user - a username for authentication. There will be no authentication if the username is empty or null.
password - a password, only used when username ist not null and not empty.
data - a BT747Hashtable containing request parameters as key value pairs. May be empty but must not be null.
encodingOrNull - an encoding for the post parameters like "UTF-8" (which is also the default)
caller - An HttpLocationSender. The object that calls this method. This is used for callbacks for the results.