|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CascadingAgentMBean
Describes the management interface of the cascading agent MBean.
A CascadingAgent is an MBean that is able to mount a partial view of a source MBeanServer into a target MBeanServer. The source MBeanServer is also sometimes called the cascaded MBeanServer, while the target MBeanServer is called the cascading MBeanServer.
See CascadingAgent
for more details.
Method Summary | |
---|---|
int |
getCascadedMBeanCount()
Returns the number of source MBeans cascaded by this CascadingAgent . |
Set |
getCascadedMBeans()
Returns a Set of ObjectInstance representing the source MBeans
cascaded by this CascadingAgent . |
String |
getDescription()
A human readable string describing this cascading agent. |
ObjectName |
getPattern()
Returns the source ObjectName pattern filter that the
source MBean names must satisfy in order to be cascaded. |
QueryExp |
getQuery()
Returns the source QueryExp query filter that the
source MBean names must satisfy in order to be cascaded. |
String |
getTargetPath()
Gets the targetPath. |
boolean |
isActive()
Tests if the CascadingAgent is active. |
void |
start()
Starts the cascading. |
void |
start(boolean conflictAllowed)
Starts this cascading agent. |
void |
stop()
Stops the cascading. |
Method Detail |
---|
int getCascadedMBeanCount()
CascadingAgent
.
This is the number of source MBeans that have been mounted by
this cascading agent in the target MBeanServer.
CascadingAgent
.Set getCascadedMBeans()
ObjectInstance
representing the source MBeans
cascaded by this CascadingAgent
.
The ObjectInstance objects returned are to be interpreted
in the context of the source MBeanServer: the ObjectNames
correspond to the ObjectNames of the source MBeans in the
source MBeanServer.
Set
containing all
ObjectInstances
representing the cascaded
source MBeans.ObjectName getPattern()
ObjectName
pattern filter that the
source MBean names must satisfy in order to be cascaded.
This pattern is to be evaluated in the context of the source
MBeanServer.
QueryExp getQuery()
QueryExp
query filter that the
source MBean names must satisfy in order to be cascaded.
This query is to be evaluated in the context of the source
MBeanServer.
void start(boolean conflictAllowed) throws IOException, InstanceAlreadyExistsException
When this method successfully completes, the source MBeans from the
source (cascaded) MBeanServer which satisfy the source
ObjectName pattern
filter and the source
QueryExp query
filter will have been
mounted in the target (cascading) MBeanServer under the
specified targetPath
.
After a successful invocation of start(), the
CascadingAgent becomes active
(see isActive()
).
CascadingAgents may be started and stopped multiple times,
long as their underlying MBeanServerConnectionFactory
is
able to return valid MBeanServerConnections.
If conflictAllowed is false, and a name conflict is
detected, this method will throw an InstanceAlreadyExistsException
.
Otherwise, conflicting names are simply skipped - no proxy is
created for the names in conflict.
Using a wildcard pattern/query and setting this parameter to false
with no targetPath will always result in throwing an
InstanceAlreadyExistsException.
If this method raises an exception, then no MBeans will have been cascaded as a result of this invocation.
conflictAllowed
- if true
the cascading agent will
ignore name conflicts. if false
, the cascading
agent will throw an InstanceAlreadyExistsException if
it detects a name conflict while starting.
After the CascadingAgent has started, name conflicts
are always ignored: MBeans from the source MBeanServer whose
name would cause a conflict in the target MBeanServer are
simply not cascaded.
IOException
- if the connection with the source
MBeanServer fails.
IllegalStateException
- if this cascading agent is not
stopped, or if the target MBeanServer can't
be obtained (e.g. the CascadingAgent MBean was
not registered).
InstanceAlreadyExistsException
- if a name conflict is
detected while starting.start(boolean)
void start() throws IOException
This is equivalent to calling start(true)
When this method successfully completes, the source MBeans from the
source (cascaded) MBeanServer which satisfy the source
ObjectName pattern
filter and the source
QueryExp query
filter will have been
mounted in the target (cascading) MBeanServer under the
specified targetPath
.
After a successful invocation of start(), the
CascadingAgent becomes active
(see isActive()
).
CascadingAgents may be started and stopped multiple times,
long as their underlying MBeanServerConnectionFactory
is
able to return valid MBeanServerConnections.
If this method raises an exception, then no MBeans will have been cascaded as a result of this invocation.
IOException
- if cascading couldn't be established.
IllegalStateException
- if this cascading agent is not in
a state where it can be started (for instance, a stop
operation is still in progress). The exact cases
where IllegalStateException can be thrown
is implementation dependent.stop()
,
isActive()
void stop() throws IOException
When this method completes, the MBeans that were cascaded by this
CascadingAgent will no longer be mounted in the cascading
MBeanServer.
After a successful invocation of stop(), the
CascadingAgent becomes inactive
(see isActive()
).
IOException
- if cascading couldn't be stopped.
IllegalStateException
- if this cascading agent is not in
a state where it can be stopped (for instance, a start
operation is still in progress). The exact cases
where IllegalStateException can be thrown
is implementation dependent.start(boolean)
,
isActive()
boolean isActive()
CascadingAgent
is active.
true
if the cascading agent is active.String getDescription()
Whenever possible, this description string should identify
the source MBeanServer which is cascaded by this
CascadingAgent,
and the semantics of this cascading agent.
For instance, if the cascaded agent has a human readable
JMXServiceURL (i.e. not the form containing the
encoded stub), then the source agent could be identified by that
URL, and that URL could be used in this description string.
Alternatively, if the cascaded agent connector was retrieved from
a naming service, then the JMX Agent Name of the cascaded agent
could be used to identify it.
A valid description could be e.g:
String getTargetPath()
com.sun.jdmk.remote.cascading
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |