com.sun.jdmk.cascading
Class CascadingAgent

java.lang.Object
  extended bycom.sun.jdmk.cascading.CascadingAgent
All Implemented Interfaces:
CascadingAgentMBean, EventListener, MBeanRegistration, NotificationFilter, NotificationListener, Serializable

Deprecated. Use package com.sun.jdmk.remote.cascading in preference to classes in this package. This class may be removed in a future version of Java DMK.

public class CascadingAgent
extends Object
implements Serializable, NotificationListener, MBeanRegistration, CascadingAgentMBean, NotificationFilter

This class implements the cascading agent service.

Cascading agents enable you to implement a hierarchy of master agents and subagents.The MBeans in a subagent are mirrored in the master agent. A master agent can contain more than one cascading agent, but must contain one cascading agent for each subagent it communicates with.

When instantiating the cascading agent, the following parameters should be specified to the CascadingAgent constructor:

See Also:
Serialized Form

Constructor Summary
CascadingAgent()
          Deprecated. Constructs a default CascadingAgent.
CascadingAgent(ConnectorAddress remoteAddress)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(ConnectorAddress remoteAddress, ObjectName pattern, QueryExp query)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(ConnectorAddress remoteAddress, RemoteMBeanServer conClient, ObjectName pattern, QueryExp query)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(ConnectorAddress addr, String conClName)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(ConnectorAddress addr, String conClName, ObjectName pattern, QueryExp query)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(ConnectorAddress addr, String conClName, ObjectName pattern, QueryExp query, int timeout)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(String localHost, ConnectorAddress remoteAddress)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(String localHost, ConnectorAddress remoteAddress, ObjectName pattern, QueryExp query)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(String localHost, ConnectorAddress remoteAddress, String conClName)
          Deprecated. Constructs a CascadingAgent.
CascadingAgent(String localHost, ConnectorAddress remoteAddress, String conClName, ObjectName pattern, QueryExp query)
          Deprecated. Constructs a CascadingAgent.
 
Method Summary
 ConnectorAddress getAddress()
          Deprecated. Getter for the ConnectorAddress to which the CascadingAgent is connected.
 String getClientConnectorClassName()
          Deprecated. Getter for the class name of the RemoteMBeanServer of the CascadingAgent.
 Integer getNbOfRemoteMBeans()
          Deprecated. Getter for the number of MBeans "cascaded" by the CascadingAgent.
 ObjectName getPattern()
          Deprecated. Getter for the ObjectName pattern to apply to the MBeans of the subagent.
 QueryExp getQuery()
          Deprecated. Getter for the QueryExp query to apply to the MBeans of the subagent.
 Set getRemoteMBeans()
          Deprecated. Getter for the MBeans "cascaded" by the CascadingAgent.
 RemoteMBeanServer getRemoteMBeanServer()
          Deprecated. Getter for the RemoteMBeanServer of the CascadingAgent.
 void handleNotification(Notification notification, Object handback)
          Deprecated. Processes a MBean Server Notification emitted by the MBean Server.
 boolean isActive()
          Deprecated. Tests if the CascadingAgent is active.
 boolean isNotificationEnabled(Notification notification)
          Deprecated. Notification filter for local MBean Server Notifications Enables reception of MBean Server Notifications concerning "cascaded" MBeans.
 void postDeregister()
          Deprecated. Unregisters all the objects cascaded by the cascading agent.
 void postRegister(Boolean registrationDone)
          Deprecated.  
 void preDeregister()
          Deprecated.  
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Deprecated. Initializes the cascading agent.
 void setAddress(ConnectorAddress adr)
          Deprecated. Setter for the ConnectorAddress to which the CascadingAgent is connected.
 void setClientConnectorClassName(String name)
          Deprecated. Setter for the class name of the RemoteMBeanServer of the CascadingAgent.
 void start()
          Deprecated. Activates the CascadingAgent MBean.
 void stop()
          Deprecated. Deactivates the CascadingAgent MBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CascadingAgent

public CascadingAgent()
Deprecated. 
Constructs a default CascadingAgent.

Initializes a newly created CascadingAgent with the following default values:

By default, all the MBeans in the subagent will be represented in the master agent.


CascadingAgent

public CascadingAgent(ConnectorAddress addr,
                      String conClName)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. All the MBeans in the subagent will be represented in the master agent.

Parameters:
addr - address to connect to in the cascading agent
conClName - class name of the client connector to connect to the cascading agent.

CascadingAgent

public CascadingAgent(String localHost,
                      ConnectorAddress remoteAddress,
                      String conClName)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. All the MBeans in the subagent will be represented in the master agent.

Parameters:
localHost - name/address of local host.
remoteAddress - address of the remote agent to connect to.
conClName - class name of the client connector to connect to the cascading agent.

CascadingAgent

public CascadingAgent(ConnectorAddress addr,
                      String conClName,
                      ObjectName pattern,
                      QueryExp query)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided.

Parameters:
addr - address to connect to in the cascading agent
conClName - class name of the client connector to connect to the cascading agent.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.

CascadingAgent

public CascadingAgent(String localHost,
                      ConnectorAddress remoteAddress,
                      String conClName,
                      ObjectName pattern,
                      QueryExp query)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided.

Parameters:
localHost - name/address of local host.
remoteAddress - address of the remote agent to connect to.
conClName - class name of the client connector to connect to the cascading agent.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.

CascadingAgent

public CascadingAgent(ConnectorAddress remoteAddress,
                      RemoteMBeanServer conClient,
                      ObjectName pattern,
                      QueryExp query)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided.

Parameters:
remoteAddress - address of the remote agent to connect to.
conClient - client connector to connect to the cascading agent.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.
Since:
Java DMK 5.0

CascadingAgent

public CascadingAgent(ConnectorAddress remoteAddress)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. All the MBeans in the subagent will be represented in the master agent. The client connector that will be used is the Java DMK connector client corresponding to the protocol of the ConnectorAddress parameter.

Parameters:
remoteAddress - address of the remote agent to connect to. It can be an instance of of com.sun.jdmk.comm.RmiConnectorClient, com.sun.jdmk.comm.HttpConnectorAddress or com.sun.jdmk.comm.HttpsConnectorAddress classes.
Throws:
IllegalArgumentException - The address parameter is not an instance of a valid class.

CascadingAgent

public CascadingAgent(String localHost,
                      ConnectorAddress remoteAddress)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. All the MBeans in the subagent will be represented in the master agent. The client connector that will be used is the Java DMK connector client corresponding to the protocol of the ConnectorAddress parameter.

Parameters:
localHost - name/address of local host.
remoteAddress - address of the remote agent to connect to. It can be an instance of of com.sun.jdmk.comm.RmiConnectorClient, com.sun.jdmk.comm.HttpConnectorAddress or com.sun.jdmk.comm.HttpsConnectorAddress classes.
Throws:
IllegalArgumentException - The address parameter is not an instance of a valid class.

CascadingAgent

public CascadingAgent(ConnectorAddress remoteAddress,
                      ObjectName pattern,
                      QueryExp query)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. The client connector that will be used is the Java DMK connector client corresponding to the protocol of the ConnectorAddress parameter.

Parameters:
remoteAddress - address of the remote agent to connect to. It can be an instance of com.sun.jdmk.comm.RmiConnectorClient, com.sun.jdmk.comm.HttpConnectorAddress or com.sun.jdmk.comm.HttpsConnectorAddress classes.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.
Throws:
IllegalArgumentException - The address parameter is not an instance of a valid class.

CascadingAgent

public CascadingAgent(String localHost,
                      ConnectorAddress remoteAddress,
                      ObjectName pattern,
                      QueryExp query)
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided. The client connector that will be used is the Java DMK connector client corresponding to the protocol of the ConnectorAddress parameter.

Parameters:
localHost - name/address of local host.
remoteAddress - address of the remote agent to connect to. It can be an instance of com.sun.jdmk.comm.RmiConnectorClient, com.sun.jdmk.comm.HttpConnectorAddress or com.sun.jdmk.comm.HttpsConnectorAddress classes.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.
Throws:
IllegalArgumentException - The address parameter is not an instance of a valid class.

CascadingAgent

public CascadingAgent(ConnectorAddress addr,
                      String conClName,
                      ObjectName pattern,
                      QueryExp query,
                      int timeout)
               throws IllegalArgumentException,
                      UnsupportedOperationException
Deprecated. 
Constructs a CascadingAgent.

In order to initialize the cascading agent, implementation names of the different services required by the MBean Server must be provided.

Parameters:
addr - Address to connect to in the cascading agent.
conClName - class name of the client connector to connect to the cascading agent.
pattern - the ObjectName pattern to apply to the MBeans of the subagent. If the pattern is null or contains an empty domain and key properties, all the MBeans in the subagent will be selected.
query - the query to apply to the MBeans of the subagent. If null no query will be applied in the MBeans of the subagent.
timeout - Timeout between this cascading and the sub agent.
Throws:
IllegalArgumentException - if timeout < 0.
UnsupportedOperationException - if the parameter addr is not of type RmiConnectorAddress
Method Detail

isNotificationEnabled

public boolean isNotificationEnabled(Notification notification)
Deprecated. 
Notification filter for local MBean Server Notifications Enables reception of MBean Server Notifications concerning "cascaded" MBeans.

Specified by:
isNotificationEnabled in interface NotificationFilter

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Deprecated. 
Initializes the cascading agent.

Specified by:
preRegister in interface MBeanRegistration
Parameters:
server - The MBean Server to register the service with.
name - The object name of the MBean.
Throws:
Exception

postRegister

public void postRegister(Boolean registrationDone)
Deprecated. 
Specified by:
postRegister in interface MBeanRegistration

preDeregister

public void preDeregister()
                   throws Exception
Deprecated. 
Specified by:
preDeregister in interface MBeanRegistration
Throws:
Exception

getRemoteMBeanServer

public RemoteMBeanServer getRemoteMBeanServer()
Deprecated. 
Getter for the RemoteMBeanServer of the CascadingAgent.

Returns:
the current value of the RemoteMBeanServer property.

getAddress

public ConnectorAddress getAddress()
Deprecated. 
Getter for the ConnectorAddress to which the CascadingAgent is connected.

Specified by:
getAddress in interface CascadingAgentMBean
Returns:
the current value of the ConnectorAddress property.

setAddress

public void setAddress(ConnectorAddress adr)
Deprecated. 
Setter for the ConnectorAddress to which the CascadingAgent is connected.

Specified by:
setAddress in interface CascadingAgentMBean
Throws:
IllegalStateException - The cascading agent is active.

getClientConnectorClassName

public String getClientConnectorClassName()
Deprecated. 
Getter for the class name of the RemoteMBeanServer of the CascadingAgent.

Specified by:
getClientConnectorClassName in interface CascadingAgentMBean
Returns:
the current value of the the class name of the RemoteMBeanServer.

setClientConnectorClassName

public void setClientConnectorClassName(String name)
Deprecated. 
Setter for the class name of the RemoteMBeanServer of the CascadingAgent.

Specified by:
setClientConnectorClassName in interface CascadingAgentMBean
Throws:
IllegalStateException - The cascading agent is active.

getNbOfRemoteMBeans

public Integer getNbOfRemoteMBeans()
Deprecated. 
Getter for the number of MBeans "cascaded" by the CascadingAgent.

Specified by:
getNbOfRemoteMBeans in interface CascadingAgentMBean

getRemoteMBeans

public Set getRemoteMBeans()
Deprecated. 
Getter for the MBeans "cascaded" by the CascadingAgent.

Specified by:
getRemoteMBeans in interface CascadingAgentMBean
Returns:
a java.util.Set containing all the "cascaded" MBeans.

getPattern

public ObjectName getPattern()
Deprecated. 
Getter for the ObjectName pattern to apply to the MBeans of the subagent. If no ObjectName pattern was specified in the CascadingAgent constructor the method returns null.

Specified by:
getPattern in interface CascadingAgentMBean

getQuery

public QueryExp getQuery()
Deprecated. 
Getter for the QueryExp query to apply to the MBeans of the subagent. If no QueryExp was specified in the CascadingAgent constructor the method returns null.

Specified by:
getQuery in interface CascadingAgentMBean

handleNotification

public void handleNotification(Notification notification,
                               Object handback)
Deprecated. 
Processes a MBean Server Notification emitted by the MBean Server.

Specified by:
handleNotification in interface NotificationListener
Parameters:
notification - The MBean Server Notification to be processed.
handback - The handback object.

postDeregister

public void postDeregister()
Deprecated. 
Unregisters all the objects cascaded by the cascading agent.

Specified by:
postDeregister in interface MBeanRegistration

start

public void start()
Deprecated. 
Activates the CascadingAgent MBean.

Specified by:
start in interface CascadingAgentMBean

stop

public void stop()
Deprecated. 
Deactivates the CascadingAgent MBean.

Specified by:
stop in interface CascadingAgentMBean

isActive

public boolean isActive()
Deprecated. 
Tests if the CascadingAgent is active.

Specified by:
isActive in interface CascadingAgentMBean

FCS Release
jdmk-5_1-b34.1 2005.02.10_16:46:09_MET

Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.