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.
-
clientCall(byte[])
- This function is to allow the applet client to invoke a method
on the server.
-
closeSession(InetAddress, int)
- This function is called when an applet session is closed.
-
init(String, String)
- This function will be called when SAS starts.
-
initSession(InetAddress, int)
- This function will be called when a new applet session is opened.
-
open(int)
- This function will be called when the client opens a UDP port.
-
requestPDU(SnmpPDU)
- This function is called when the PDU being sent to the agent.
-
responsePDU(SnmpPDU)
- This function is called when the response PDU from the agent.
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.
initSession
public abstract void initSession(InetAddress applet_addr,
int applet_port)
- This function will be called when a new applet session is opened.
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.
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.
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.
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.
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