|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
com.adventnet.services.cascading.Cascader
public class Cascader
The Cascader class helps to achieve Master-Sub Agent architecture in Multi-Protocol Agent. The cascader uses the Client side APIs provided by AdventNet AgentToolkit API to connect to the SubAgents and mirror the MBeans on the MasterAgent side. The protocols as of now supported are RMI CORBA HTTP The cascader implements the DynamicMBean interface thereby becoming an MBean by nature and exposing the management details of the Cascader.
| Field Summary | |
|---|---|
(package private) javax.management.MBeanServer |
server
Variable storing the reference to the MBeanServer where the Cascader is registered. |
| Constructor Summary | |
|---|---|
Cascader()
The NoArg constructor used to initialize the Cascader in forming the MBeanInfo and getting the reference of the MBeanServer using the MBeanServer.findMBeanServer(...) method. |
|
Cascader(java.lang.String host,
int port,
java.lang.String protocol)
Constructor used to initialize the Cascador in forming the MBeanInfo and getting the reference of the MBeanServer using the MBeanServer.findMBeanServer(...) method. |
|
Cascader(java.lang.String host,
int port,
java.lang.String protocol,
javax.management.MBeanServer server)
Constructor used to initialize the Cascador in forming the MBeanInfo and that takes the MBeanServer as a parameter. |
|
| Method Summary | |
|---|---|
void |
enableHeartBeat(boolean heartBeatState)
Enable heartBeat if heartBeatState is true. |
java.lang.Object |
getAttribute(java.lang.String attribute)
Gets the value of a specific attribute of this MBean. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
Enables the values of several attributes of this MBean. |
(package private) Client |
getClient()
Getter for the client used by the Cascader. |
boolean |
getHeartBeatStatus()
Returns status of the HeartBeat support |
java.lang.String |
getHost()
Returns the host name of the remote sub agent to which the adaptor client associated with this service should get connected. |
javax.management.MBeanInfo |
getMBeanInfo()
This method discovers the attributes and operations this MBean exposes for management. |
javax.management.NotificationFilter |
getNotificationFilter()
This method acts as the getter for NotificationFilter used by the Cascader. |
java.lang.String |
getObjectName()
Returns the ObjectName of this cascader with which it has been registered with the MBeanServer. |
java.lang.Integer |
getPort()
Returns the port number on the remote sub agent to which the adaptor client associated with this service should get connected. |
java.lang.String |
getProtocol()
Gets the protocol by which this Cascader contacts the sub-agent through the adaptor client. |
(package private) java.util.Hashtable |
getProxyTable()
Getter for the Proxy MBeans repository. |
java.lang.Integer |
getRemoteObjectsCount()
Gets the number of remote objects present in the subagent cascaded with the Master JMX agent |
javax.management.ObjectName[] |
getRemoteObjectsList()
Gets the remote objects ObjectName list which are present in the subagent cascaded with the Master JMX agent |
java.lang.Integer |
getState()
Returns the state, whether ON_STATE/OFF_STATE, of this service. |
void |
handleHeartBeat(HeartBeatEvent event)
This method will be called by connector clients when relevant connector present in the JMX server is down |
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
Invoked when an JMX notification occurs. |
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
Invokes an action on the original MBean associated with this MBean. |
boolean |
isNotificationEnabled(javax.management.Notification notification)
Invoked before sending the specified notification to the listener. |
void |
postDeregister()
Allows this MBean to perform any operations needed after having been de-registered in the MBeanServer. |
void |
postRegister(java.lang.Boolean registrationDone)
Allows this MBean to perform any operations needed after having been registered in the MBeanServer or after the registration has failed. |
void |
preDeregister()
Allows this MBean to perform any operations it needs before being de-registered by the MBeanServer. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Allows the MBean to perform any operations it needs before being registered in the MBeanServer. |
void |
setAdaptorInfo(java.lang.Object info)
|
void |
setAttribute(javax.management.Attribute attribute)
Sets the value of a specific attribute of this MBean. |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Sets the values of several attributes of this MBean. |
void |
setHeartBeatRate(int rate)
Sets the heart beat rate. |
void |
setHost(java.lang.String host)
Sets the host name the remote sub agent to which the adaptor client associated with this service should get connected. |
void |
setNotificationFilter(javax.management.NotificationFilter filter)
This method sets the NotificationFilter to be used on the Cascader. |
void |
setPort(java.lang.Integer port)
Sets the port number on the remote sub agent to which the adaptor client associated with this service should get connected. |
void |
setProtocol(java.lang.String protocol)
Sets the protocol by which this Cascader contacts the sub-agent through the adaptor client. |
void |
setUserContext(com.adventnet.agent.security.UserContext userContext)
Sets the UserContext to be authenticated. |
void |
startService()
This method starts the cascader service and registers the SubAgent MBeans as mirror MBeans on the Master Agent side.started. |
void |
stopService()
This method stops the Cascader and unregisters the SubAgent MBeans available on the Master Agent. |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
transient javax.management.MBeanServer server
| Constructor Detail |
|---|
public Cascader()
public Cascader(java.lang.String host,
int port,
java.lang.String protocol)
host - The host name.port - The Port number.protocol - The protocol name.
public Cascader(java.lang.String host,
int port,
java.lang.String protocol,
javax.management.MBeanServer server)
host - The host name.port - The Port number.protocol - The protocol name.| Method Detail |
|---|
public void setUserContext(com.adventnet.agent.security.UserContext userContext)
userContext - The UserContext to be authenticatedpublic void startService()
public void stopService()
public void setAdaptorInfo(java.lang.Object info)
public void enableHeartBeat(boolean heartBeatState)
heartBeatState - - The state of heart beat service.public void setHeartBeatRate(int rate)
public java.lang.Integer getPort()
public void setPort(java.lang.Integer port)
throws java.lang.IllegalStateException
port - the new port number.
java.lang.IllegalStateExceptionpublic java.lang.String getHost()
public void setHost(java.lang.String host)
throws java.lang.IllegalStateException
host - The host name.
java.lang.IllegalStateExceptionpublic java.lang.Integer getState()
public java.lang.Integer getRemoteObjectsCount()
public void setNotificationFilter(javax.management.NotificationFilter filter)
filter - the instance of NotificationFilter.public javax.management.NotificationFilter getNotificationFilter()
public javax.management.ObjectName[] getRemoteObjectsList()
public java.lang.String getObjectName()
public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
throws java.lang.IllegalStateException
protocol - The name of the protocol.
java.lang.IllegalStateExceptionpublic boolean getHeartBeatStatus()
Client getClient()
java.util.Hashtable getProxyTable()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationserver - The MBeanServer in which the MBean will be registered.name - The object name of the MBean.
java.lang.Exception - - This exception should be caught by the
MBeanServer and re-thrown as an MBeanRegistrationException.public void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationregistrationDone - Indicates whether or not the MBean has been
successfully registered in the MBeanServer. The value false means that
either the registration phase has failed.registrationDone - indicates whether the mbean is registered
properly with the server.
public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.langException - This exception should be caught by the
MBeanServer and re-thrown as an MBeanRegistrationException.
java.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpublic boolean isNotificationEnabled(javax.management.Notification notification)
isNotificationEnabled in interface javax.management.NotificationFilternotification - - The notification to be sent.Returns:
public void handleHeartBeat(HeartBeatEvent event)
HeartBeatListener
handleHeartBeat in interface HeartBeatListener
public void handleNotification(javax.management.Notification notification,
java.lang.Object handback)
handleNotification in interface javax.management.NotificationListenernotification - - The notification.handback - - An opaque object which helps the listener to
associate information regarding the MBean emitter. This object was
passed to the MBean during the addListener call and resend, without
modification, to the listener. The MBean object should to use or
modify the object.public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBean
public java.lang.Object getAttribute(java.lang.String attribute)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanattribute - A String specifying the name of the
attribute to be retrieved.
javax.management.AttributeNotFoundException - The
specified attribute is not accessible in the MBean.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's setter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes in interface javax.management.DynamicMBeanattributes - A list of attributes to be retrieved.
public java.lang.Object invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
invoke in interface javax.management.DynamicMBeanactionName - The name of the action to be invoked.params - An array containing the parameters to be
set when the action is invokedsignature - An array containing the signature of
the action. The class objects will be loaded using the
same class loader as the one used for loading the MBean
on which the action was invoked.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's setter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.
public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanattribute - The identification of the attribute to
be set and the value it is to be set to.
javax.management.AttributeNotFoundException - The
specified attribute is not accessible in the MBean.
javax.management.InvalidAttributeValueException - The
specified value for the attribute is not valid.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's setter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.
javax.management.RuntimeOperationsException - Wraps a
java.lang.IllegalArgumentException: The object name in parameter is null
or the attribute in parameter is null.public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes in interface javax.management.DynamicMBeanattributes - A list of attributes: The identification
of the attributes to be set and the values they are to be set to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||