|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--com.adventnet.services.cascading.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) MBeanServer |
server
Variable storing the reference to the MBeanServer where the Cascader is registered. |
| Fields inherited from class javax.management.NotificationBroadcasterSupport |
li |
| 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,
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. |
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. |
MBeanInfo |
getMBeanInfo()
This method discovers the attributes and operations this MBean exposes for 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 |
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(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(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. |
ObjectName |
preRegister(MBeanServer server,
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(Attribute attribute)
Sets the value of a specific attribute of this MBean. |
AttributeList |
setAttributes(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(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,
handleNotification,
removeNotificationListener,
removeNotificationListener,
sendNotification |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
transient 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,
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.public java.lang.String getHost()
public void setHost(java.lang.String host)
throws java.lang.IllegalStateException
host - The host name.public java.lang.Integer getState()
public java.lang.Integer getRemoteObjectsCount()
public void setNotificationFilter(NotificationFilter filter)
filter - the instance of NotificationFilter.public NotificationFilter getNotificationFilter()
public 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.public boolean getHeartBeatStatus()
Client getClient()
java.util.Hashtable getProxyTable()
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
server - The MBeanServer in which the MBean will be registered.name - The object name of the MBean.public void postRegister(java.lang.Boolean registrationDone)
registrationDone - 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
public void postDeregister()
public boolean isNotificationEnabled(Notification notification)
notification - - The notification to be sent.Returns:public void handleHeartBeat(HeartBeatEvent event)
the - heartbeat event to be triggered
public void handleNotification(Notification notification,
java.lang.Object handback)
notification - - 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 MBeanInfo getMBeanInfo()
public java.lang.Object getAttribute(java.lang.String attribute)
throws AttributeNotFoundException,
MBeanException,
ReflectionException
attribute - A String specifying the name of the
attribute to be retrieved.public AttributeList getAttributes(java.lang.String[] attributes)
attributes - 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 MBeanException,
ReflectionException
actionName - 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.
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
attribute - The identification of the attribute to
be set and the value it is to be set to.public AttributeList setAttributes(AttributeList attributes)
attributes - 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||