com.adventnet.adaptors.clients
Interface Client

All Superinterfaces:
javax.management.MBeanServer, javax.management.MBeanServerConnection
All Known Implementing Classes:
AbstractClient, AbstractJMXConnector, CorbaClient, HttpClient, RMIClient

public interface Client
extends javax.management.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

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.
Throws:
java.net.ConnectException

disconnect

void disconnect()
Diconnects the communication with the adaptor.


isConnectedWithAdaptor

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

Throws:
java.net.NoRouteToHostException

enableHeartBeat

void enableHeartBeat(boolean flag)
Enables the heart beat mechanism for this connector client

Parameters:
flag - true to enable the heartbeat

isHeartBeatEnabled

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


getHeartBeatRate

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


setHeartBeatRate

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

void addHeartBeatListener(HeartBeatListener listener)
Add the heart beat listener to this connector client

Parameters:
listener - the heartbeat listener

removeHeartBeatListener

void removeHeartBeatListener(HeartBeatListener listener)
Remove a heart beat listener from this connector client

Parameters:
listener - the heartbeat listener

stopHeartBeat

void stopHeartBeat()
Stops the heart beat service


isAuthenticationEnabled

boolean isAuthenticationEnabled()

authenticate

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

setProperty

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