Class Proxy

Class Proxy

java.lang.Object
   |
   +----Proxy

public class Proxy
extends Object
This class implements the interface with Liaison. It is used by SNMPObj and CMIPObj to send/receive data. Proxy communicates with Liaison using the HTTP protocol.

This class sends the following /BATCH/<operation>/<context>/<data>, where:

Liaison sends back an HTTP response that contains a set of couples divided by carriage returns. Each couple contains a key (attribute name) and a value (attribute value). For instance in front og the following CMIP Set request
/CMIP/CMIP_Set/MIBCTL/objectClass=system&objectInstance=systemId%3d%28name+Telco%29&systemTitle=%28nothing+NULL%29

the following response is returned:
HTTP/1.0 200 OK
Server: IBM ZRL Proxy Server
Date: Fri, 28 Jun 1996 12:30:16 GMT
Content-type: text/x-www-form-urlencoded
Content-length: 73 

currentTime
Fri,+28+Jun+1996+12:30:16+GMT
systemTitle
%28othing+NULL%29


To know about how the Proxy works, please read the following paper: Network Management for the 90s.
See Also:
CMIPObj, SNMPObj

Constructor Index

 o Proxy(String host, int port)

Method Index

 o dispose()
Used to dispose a Proxy instance. Not yet used.
 o SendRequest(String operation, String context, Information input)
Sends a request to Liaison. This method is called whenever the request returns one or more responses.
 o SendOffLineRequest(String operation, String context, String input)
Sends a request to Liaison. This method is called only for non-protocol requests when simple response is returned.
 o SendOffLineReqWithMultipleOut(String operation, String context, String input)
Similar to the previous method with the difference that Liaison can send back multiple responses.
 o toString()
Coverts the instance to a String. Mostly used in order to print the instance.

Constructors

 o Proxy
  public Proxy(String host, int port)
Creates a Proxy instance
Parameters:
host - the TCP/IP address of the host where Liaison is running
port - the port where the Proxy server is running (default 1998)

Methods

 o dispose
  public void dispose() throws IOException
Used to dispose a Proxy instance. Not yet used.
 o SendRequest
  public Vector SendRequest(String operation, String context, 
                  Information input) throws ProxyException
Sends a protocol request to Liaison.
Parameters:
operation - the requested operation
context - the operation context
input - the information that has to be sent out as part of the request
Returns:
A vector of Information instances containing the response(s).
Throws: ProxyException
If an I/O error has occurred (e.g Liaison down or unreachable).
 o SendOffLineRequest
  public String SendOffLineRequest(String operation, String context, String input) throws ProxyException
Sends a non-protocol request to Liaison.
Parameters:
operation - the requested operation
context - the operation context
input - the operation-dependent data
Returns:
A string containing the requested information.
Throws: ProxyException
If an I/O error has occurred (e.g Liaison down or unreachable).
 o SendOffLineReqWithMultipleOut
  public Information SendOffLineReqWithMultipleOut(String operation, String context, String input) throws ProxyException
Sends a non-protocol request to Liaison. Multiple responses are expected out from this request
Parameters:
operation - the requested operation
context - the operation context
input - the operation-dependent data
Returns:
An Information instance containing the responses
Throws: ProxyException
If an I/O error has occurred (e.g Liaison down or unreachable).
 o toString
  public synchronized String toString()
Coverts the instance to a String.