|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.adaptors.clients.AbstractClient
This Abstract class must be extended by All Adaptor Clients This class abstracts the common behaviour of Adaptor Clients such as RMI,IIOP and HTTP
Client| Inner Class Summary | |
(package private) class |
AbstractClient.HeartBeatDiagnoser
This Active class checks to see if an event needs to be send and then invokes the heartBeat generator |
| Field Summary | |
protected java.lang.Object |
adaptorInfo
|
protected java.util.Properties |
clientProp
|
(package private) AbstractClient.HeartBeatDiagnoser |
heartBeatDiagnoser
|
(package private) boolean |
heartBeatEnabled
|
protected int |
heartBeatRate
|
protected java.lang.String |
host
|
protected boolean |
isSubAgentAlive
|
protected java.util.ArrayList |
listeners
|
protected int |
port
|
| Constructor Summary | |
AbstractClient()
|
|
| Method Summary | |
void |
addHeartBeatListener(HeartBeatListener heartBeatListener)
This method is used to add a heart beat listener |
java.lang.Object |
asyncGetAttribute(ObjectName name,
java.lang.String attribute)
Gets the value of a specific attribute of a named MBean. |
java.lang.Object |
asyncGetAttributes(ObjectName name,
java.lang.String[] attributes)
Gets the values of several attributes of a named MBean. |
java.lang.Object |
asyncInvoke(ObjectName name,
java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
Dummy implementation of AsyncClient interface, subclasses can override to provide their own implementations |
java.lang.Object |
asyncSetAttributes(ObjectName name,
AttributeList attributes)
Sets the values of several attributes of a named MBean. |
void |
authenticate(com.adventnet.agent.security.UserContext userContext)
Dummy implementation for Authentication will do nothing, subclasses can override to provide their own implementations |
abstract void |
connect(java.lang.String host,
int port,
java.lang.Object adaptorInfo)
This method is used to connect to the adaptor |
abstract void |
disconnect()
This method disconnects the client from the adaptor |
void |
enableHeartBeat(boolean enable)
This method is used to enableHeartBeat mechanism |
int |
getHeartBeatRate()
This method returns the heart beat rate |
boolean |
isAuthenticationEnabled()
Dummy implementation to check if Authentication is enabled will return false, subclasses can override to provide their own implementations |
abstract java.lang.Boolean |
isConnectedWithAdaptor()
This method returns true if the client is connected with the adaptor |
boolean |
isHeartBeatEnabled()
This method returns true if the heartBeat is already enabled |
void |
removeHeartBeatListener(HeartBeatListener heartBeatListener)
This method is used to remove a heart beat listener |
protected abstract void |
sendHeartBeatEvent()
This abstract method is the Heart Beat Event Generator |
void |
setHeartBeatRate(int heartBeatRate)
This method sets the heart beat rate |
void |
setProperty(java.lang.String key,
java.lang.String value)
Method to set additional properties required by client |
void |
startHeartBeat()
This method starts the heartbeat mechanism |
void |
stopHeartBeat()
This method stops the heartbeat mechanism |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
boolean heartBeatEnabled
protected int heartBeatRate
protected java.util.ArrayList listeners
AbstractClient.HeartBeatDiagnoser heartBeatDiagnoser
protected boolean isSubAgentAlive
protected java.lang.String host
protected int port
protected java.lang.Object adaptorInfo
protected java.util.Properties clientProp
| Constructor Detail |
public AbstractClient()
| Method Detail |
public abstract void connect(java.lang.String host,
int port,
java.lang.Object adaptorInfo)
throws java.net.ConnectException
public abstract void disconnect()
public abstract java.lang.Boolean isConnectedWithAdaptor()
throws java.net.NoRouteToHostException
public void startHeartBeat()
public void stopHeartBeat()
public void enableHeartBeat(boolean enable)
flag - true to enable the heartbeatpublic boolean isHeartBeatEnabled()
public int getHeartBeatRate()
public void setHeartBeatRate(int heartBeatRate)
rate - the heart beat rate time interval at the connector client
Default is 2000 msec i.e 2 secondspublic void addHeartBeatListener(HeartBeatListener heartBeatListener)
listener - the heartbeat listenerpublic void removeHeartBeatListener(HeartBeatListener heartBeatListener)
listener - the heartbeat listenerprotected abstract void sendHeartBeatEvent()
public boolean isAuthenticationEnabled()
public void authenticate(com.adventnet.agent.security.UserContext userContext)
throws com.adventnet.agent.security.AuthenticationException
public java.lang.Object asyncInvoke(ObjectName name,
java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
throws java.lang.Exception
name - - The object name of the MBean on which the method is to be invoked.actionName - - The name of the operation to be invoked.params - - An array containing the parameters to be set when the operation is invokedsignature - - An array containing the signature of the operation. The class objects will
be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
public java.lang.Object asyncGetAttribute(ObjectName name,
java.lang.String attribute)
throws java.lang.Exception
name - - The object name of the MBean from which the attribute is to be retrieved.attribute - - A String specifying the name of the attribute to be retrieved.
public java.lang.Object asyncGetAttributes(ObjectName name,
java.lang.String[] attributes)
throws java.lang.Exception
name - - The object name of the MBean from which the attributes are retrieved.attributes - - A list of the attributes to be retrieved.
public java.lang.Object asyncSetAttributes(ObjectName name,
AttributeList attributes)
throws java.lang.Exception
name - - The object name of the MBean within which the attributes are to be set.attributes - - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
public void setProperty(java.lang.String key,
java.lang.String value)
propName - key for the propertypropValue - value of the property
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||