net.agmodel.genericBroker
Class ServiceHTTP

java.lang.Object
  |
  +--net.agmodel.genericBroker.ServiceHTTP
Direct Known Subclasses:
ServerHTTP

public abstract class ServiceHTTP
extends Object

An HTTP servlet wrapper interface to ServerRMI. The HTTP servlet wrapper is used when direct RMI connnections are blocked by firewalls. Each method below wraps a corresponding ServerRMI method. Method parameters are serialized and sent using HTTP to a wrapper servlet which calls the corresponding ServerRMI method and returns the results. int constants are used to identify which ServerRMI method to call

See Also:
ServerRMI

Field Summary
protected static String HOSTPARAMEXTENSION
          The extension used by subclasses when generating the name of the parameter for the HTTP host name
protected static String PORTPARAMEXTENSION
          The extension used by subclasses when generating the name of the parameter for the HTTP port
protected  URL servlet
           
 
Constructor Summary
ServiceHTTP(String host)
          Create a linking class to communicate with the wrapper servlet on the default HTTP port (80).
ServiceHTTP(String host, int port)
          Create a linking class to communicate with the wrapper servlet on a nominated port.
 
Method Summary
protected abstract  String getServletPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOSTPARAMEXTENSION

protected static final String HOSTPARAMEXTENSION
The extension used by subclasses when generating the name of the parameter for the HTTP host name

See Also:
Constant Field Values

PORTPARAMEXTENSION

protected static final String PORTPARAMEXTENSION
The extension used by subclasses when generating the name of the parameter for the HTTP port

See Also:
Constant Field Values

servlet

protected URL servlet
Constructor Detail

ServiceHTTP

public ServiceHTTP(String host,
                   int port)
            throws GeneralException
Create a linking class to communicate with the wrapper servlet on a nominated port. Usually port 80 (default HTTP) or 8080 (Tomcat servlet container default) are used.

Parameters:
host - the web server hosting the wrapper servlet
Throws:
GeneralException

ServiceHTTP

public ServiceHTTP(String host)
            throws GeneralException
Create a linking class to communicate with the wrapper servlet on the default HTTP port (80).

Parameters:
host - the web server hosting the wrapper servlet
Throws:
GeneralException
Method Detail

getServletPath

protected abstract String getServletPath()