|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jaw.impl.adaptor.comm.AdaptorClient | +--com.sun.jaw.impl.adaptor.udp.AdaptorClient
The AdaptorClient
class provides an implementation of the
AdaptorMO interface based on the HTTP/UDP protocol.
Querying a Java Dynamic Management agent with the HTTP/UDP adaptor implies that an instance of AdaptorServerImpl is running on the remote Java Dynamic Management agent.
In order to identify the Java Dynamic Management agent the adaptor needs to communicate with, the method connect needs to be invoked.
It is possible to request the use of a specific proxy. To do so, once the object is instantiated, you need to call the setup method with a string containing the hostname and optionally a port number. By default the port 8083 will be used to communicate with the adaptor.
AdaptorMO
,
AdaptorServerImpl
, Serialized FormConstructor Summary | |
AdaptorClient()
Constructs an HTTP/UDP adaptor client. |
Method Summary | |
void |
connect(java.lang.Object context,
java.lang.String host,
int port,
java.lang.String logicalName)
Initializes the communication with the remote Java Dynamic Management agent. |
protected java.io.InputStream |
doReceive(AdaptorSocket sckt,
boolean heartBeat)
Calls the doReceive method on the specified adaptor socket. |
Methods inherited from class com.sun.jaw.impl.adaptor.comm.AdaptorClient |
cb_connect,
cb_disconnect,
cb_newDBMO,
cb_newDBMO,
cb_newMO,
cb_newMO,
deleteMO,
disconnect,
getAdaptorVersion,
getClassLoader,
getClassVersion,
getClientVersion,
getDomain,
getIndexedValue,
getMapperSrv,
getObject,
getObjectFromCache,
getOnlyNames,
getServerVersion,
getTimeoutMilliSeconds,
getValue,
getValues,
invokePerform,
isConnected,
newDBMO,
newDBMO,
newMO,
newMO,
newObj,
newObj,
setClassLoader,
setIndexedValue,
setMapperSrv,
setTimeoutMilliSeconds,
setup,
setValue,
setValues,
transferObject |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AdaptorClient()
Method Detail |
public void connect(java.lang.Object context, java.lang.String host, int port, java.lang.String logicalName)
As UDP is connectionless, we must detect asap that the server is not responding. So we modify the timoeut to a "not too short, not too long" value.
context
- used to provide the client's authentication info.host
- host name of the server.port
- port number of the server.logicalName
- logical name of the server.protected java.io.InputStream doReceive(AdaptorSocket sckt, boolean heartBeat) throws java.io.IOException
As UDP is connectionless, we must detect asap that the server is not responding. Instead of waiting for an incoming message for a long timeout, the timeout is chopped into "small" chunks. When a timeout arises, we just check if the server is dead. If not, we go back waiting. Otherwise, we declare that the connection to the server has been lost.
sckt
- The adaptor socket.heartBeat
- Checking cycle is active.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |