|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.management.mstransport.MainSocketClient
public class MainSocketClient
This is the basic endpoint for the Management Client.This class handles all the communication done between the Management Client and Server. All the responses from the Management Server are received and processed here. The actual transport of the data (ie., the underlying protocol) is taken care by the TransportProvider implementation class.
SocketConnection,TransportProvider| Field Summary | |
|---|---|
boolean |
connected
The value specifies if the client is connected to the server or not. |
| Constructor Summary | |
|---|---|
MainSocketClient(java.applet.Applet app)
Creates a MainSocketClient with the applet argument.The TransportProvider implementation class is retrieved from the CLIENT_CLASS_NAME applet parameter. |
|
MainSocketClient(java.applet.Applet app,
java.lang.String className)
Creates the MainSocketClient with the applet and the TransportProvider Class. |
|
MainSocketClient(java.lang.String hostname,
java.lang.String rmi)
RMI |
|
| Method Summary | |
|---|---|
java.lang.String[] |
checkResponses()
Checks for any outstanding responses that are still in the receive queue. |
boolean |
checkTimeout(java.lang.String reqid)
Checks whether there are any timed-out requests for this specific ID. |
java.lang.String |
genReqID()
Generate a request ID for PDU. |
long |
getTimeOutCount()
This method returns the current timeout interval set for synchrous call to the server. |
void |
killMeSilently()
Terminates the connection maintained with the server and closes all the resources used up. |
void |
processMsPDU(byte[] pduData)
Processes the data received from the transport provider.If the pduData passed is null, this method just returns without performing any operation. |
void |
registerForMcResponses(com.adventnet.management.mstransport.MsClientListener ms)
|
void |
run()
Implementation of the Runnable interface. |
boolean |
send(byte[] data)
This method sends the data asynchronously to the Server.ie., this method returns immediately after placing the request in a request queue. |
void |
setTimeOutCount(long milliSeconds)
This method sets the timeOutCount for Synchronized send to the Server. |
byte[] |
syncSend(java.lang.String id,
byte[] data)
Sends the data to the server and returns only after a response is received for this particular request.ie., the data is transferred synchronously. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean connected
| Constructor Detail |
|---|
public MainSocketClient(java.applet.Applet app)
throws com.adventnet.management.transport.TransportException
app - the Web NMS Client Applet.
com.adventnet.management.transport.TransportException
public MainSocketClient(java.applet.Applet app,
java.lang.String className)
throws com.adventnet.management.transport.TransportException
app - the Web NMS Client applet.className - an implementation of the TransportProvider interface
com.adventnet.management.transport.TransportException
public MainSocketClient(java.lang.String hostname,
java.lang.String rmi)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void registerForMcResponses(com.adventnet.management.mstransport.MsClientListener ms)
public void processMsPDU(byte[] pduData)
pduData - the data to be processedpublic boolean send(byte[] data)
id - the registered id.data - the data to be sent to the server.
public byte[] syncSend(java.lang.String id,
byte[] data)
id - the registered ID.data - the data that needs to be sent.
public boolean checkTimeout(java.lang.String reqid)
reqid - the request ID for which the time out request
is to be verified.
public java.lang.String[] checkResponses()
public java.lang.String genReqID()
public void killMeSilently()
public void setTimeOutCount(long milliSeconds)
milliSeconds - The timeOutCount to be set.public long getTimeOutCount()
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||