com.adventnet.adaptors.clients
Interface Client

All Known Implementing Classes:
AbstractClient

public interface Client
extends MBeanServer

This interface must be implemented by All Adaptor Clients

Since:
Adaptor Framework 2.0

Method Summary
 void addHeartBeatListener(HeartBeatListener listener)
          Add the heart beat listener to this connector client
 void authenticate(com.adventnet.agent.security.UserContext userContext)
           
 void connect(java.lang.String host, int port, java.lang.Object adaptorInfo)
          Initializes the communication with the remote managed object server.
 void disconnect()
          Diconnects the communication with the adaptor.
 void enableHeartBeat(boolean flag)
          Enables the heart beat mechanism for this connector client
 int getHeartBeatRate()
          Gets the heart beat rate time interval(in msec) at the connector client.
 boolean isAuthenticationEnabled()
           
 java.lang.Boolean isConnectedWithAdaptor()
          Indicates whether the client is connected with the adaptor.
 boolean isHeartBeatEnabled()
          Specifies whether the heart beat mechanism is enabled for this connector client
 void removeHeartBeatListener(HeartBeatListener listener)
          Remove a heart beat listener from this connector client
 void setHeartBeatRate(int rate)
          Sets the heart beat rate time interval(in msec) at the connector client.
 void setProperty(java.lang.String propName, java.lang.String propValue)
          Method to set additional properties required by client
 void stopHeartBeat()
          Stops the heart beat service
 
Methods inherited from interface javax.management.MBeanServer
addNotificationListener, addNotificationListener, createMBean, createMBean, createMBean, createMBean, deserialize, deserialize, deserialize, getAttribute, getAttributes, getClassLoader, getClassLoaderFor, getClassLoaderRepository, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, instantiate, instantiate, instantiate, instantiate, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, registerMBean, removeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean
 

Method Detail

connect

public void connect(java.lang.String host,
                    int port,
                    java.lang.Object adaptorInfo)
             throws java.net.ConnectException
Initializes the communication with the remote managed object server.
Parameters:
host - The host name of the adaptor.
port - The port number of the adaptor.
adaptorInfo - The information object specific to the adaptor.

disconnect

public void disconnect()
Diconnects the communication with the adaptor.

isConnectedWithAdaptor

public java.lang.Boolean isConnectedWithAdaptor()
                                         throws java.net.NoRouteToHostException
Indicates whether the client is connected with the adaptor.

enableHeartBeat

public void enableHeartBeat(boolean flag)
Enables the heart beat mechanism for this connector client
Parameters:
flag - true to enable the heartbeat

isHeartBeatEnabled

public boolean isHeartBeatEnabled()
Specifies whether the heart beat mechanism is enabled for this connector client

getHeartBeatRate

public int getHeartBeatRate()
Gets the heart beat rate time interval(in msec) at the connector client. Default is 2000 msec i.e 2 seconds

setHeartBeatRate

public void setHeartBeatRate(int rate)
Sets the heart beat rate time interval(in msec) at the connector client.
Parameters:
rate - the heart beat rate time interval at the connector client Default is 2000 msec i.e 2 seconds

addHeartBeatListener

public void addHeartBeatListener(HeartBeatListener listener)
Add the heart beat listener to this connector client
Parameters:
listener - the heartbeat listener

removeHeartBeatListener

public void removeHeartBeatListener(HeartBeatListener listener)
Remove a heart beat listener from this connector client
Parameters:
listener - the heartbeat listener

stopHeartBeat

public void stopHeartBeat()
Stops the heart beat service

isAuthenticationEnabled

public boolean isAuthenticationEnabled()

authenticate

public void authenticate(com.adventnet.agent.security.UserContext userContext)
                  throws com.adventnet.agent.security.AuthenticationException

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.String propValue)
Method to set additional properties required by client
Parameters:
propName - key for the property
propValue - value of the property