All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface advent.sas.SAServerClient

public interface interface SAServerClient
This is the interface implemented by client programs that wish to use one single class instance to do custom extensions of the SAS. The class is implementing this interface is instantiated when SAS starts, and is used as long as SAS is running. The methods in this interface are called by SAS at different times.


Method Index

 o clientCall(byte[])
This function is to allow the applet client to invoke a method on the server.
 o closeSession(InetAddress, int)
This function is called when an applet session is closed.
 o init(String, String)
This function will be called when SAS starts.
 o initSession(InetAddress, int)
This function will be called when a new applet session is opened.
 o open(int)
This function will be called when the client opens a UDP port.
 o requestPDU(SnmpPDU)
This function is called when the PDU being sent to the agent.
 o responsePDU(SnmpPDU)
This function is called when the response PDU from the agent.

Methods

 o init
 public abstract void init(String applet_dir,
                           String webserverRoot)
This function will be called when SAS starts. The argument is the applet directory, absolute or relative to the current directory, i.e. applet_dir = "" means current directory is applet_directory. The second argument is the webserver root directory.

 o initSession
 public abstract void initSession(InetAddress applet_addr,
                                  int applet_port)
This function will be called when a new applet session is opened.

 o open
 public abstract int open(int port)
This function will be called when the client opens a UDP port. Typically, the port is 0, which implies a system assigned UDP port. For exceptional cases, if listening for TRAP or SNMP PDUs, a specific port can be specified. The return value will be used, to allow for custom port assignment if needed.

 o requestPDU
 public abstract SnmpPDU requestPDU(SnmpPDU pdu)
This function is called when the PDU being sent to the agent. The PDU can be modified as required by the custom class.

 o responsePDU
 public abstract SnmpPDU responsePDU(SnmpPDU pdu)
This function is called when the response PDU from the agent. The PDU can be modified as required.

 o clientCall
 public abstract byte[] clientCall(byte data[])
This function is to allow the applet client to invoke a method on the server. A corresponding method will be provided in the SASClient class. Any arguments and return values, will need to be serialized.

 o closeSession
 public abstract void closeSession(InetAddress applet_addr,
                                   int applet_port)
This function is called when an applet session is closed.


All Packages  Class Hierarchy  This Package  Previous  Next  Index