|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jdmk.remote.cascading.LocalMBeanServerConnectionFactory
public class LocalMBeanServerConnectionFactory
An MBeanServerConnectionFactory
that wraps a local
MBeanServerConnection, e.g, an MBeanServer.
The default implementation of this class is to always return the
MBeanServerConnection passed to its constructor.
The add/remove connection listener methods are
not implemented - they simply do nothing, because the underlying
MBeanServerConnection is expected to be a local
MBeanServer, or an object that wraps a local MBeanServer.
Constructor Summary | |
---|---|
LocalMBeanServerConnectionFactory(javax.management.MBeanServerConnection local,
java.lang.String localID)
Creates a LocalMBeanServerConnectionFactory from a local MBeanServerConnection. |
Method Summary | |
---|---|
void |
addConnectionNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
This implementation does nothing. |
java.lang.String |
getConnectionId()
Returns the connection ID identifying this local connection, as passed to this object's constructor. |
javax.management.MBeanServerConnection |
getMBeanServerConnection()
Return the local MBeanServerConnection as passed
to the constructor of this object. |
static MBeanServerConnectionFactory |
newInstance(javax.management.MBeanServer s)
Creates a new instance of a LocalMBeanServerConnectionFactory . |
void |
removeConnectionNotificationListener(javax.management.NotificationListener listener)
This implementation does nothing. |
void |
removeConnectionNotificationListener(javax.management.NotificationListener l,
javax.management.NotificationFilter f,
java.lang.Object handback)
This implementation does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalMBeanServerConnectionFactory(javax.management.MBeanServerConnection local, java.lang.String localID)
local
- A local MBeanServerConnection. This
MBeanServerConnection is expected to be an an
MBeanServer
, or an object that wraps an
MBeanServer. The wrapped object should not be a
remote MBeanServerConnection returned by a
JMXConnector. If you wish to create a
MBeanServerConnectionFactory
for a remote
agent, use the BasicMBeanServerConnectionFactory
instead.localID
- An ID identifying this local connection. This is the
string that will be returned by {link #getConnectionId()}.Method Detail |
---|
public final javax.management.MBeanServerConnection getMBeanServerConnection() throws java.io.IOException
MBeanServerConnection
as passed
to the constructor of this object. Usually this
MBeanServerConnection
is an MBeanServer
, or an
object that wraps an MBeanServer.
getMBeanServerConnection
in interface MBeanServerConnectionFactory
java.io.IOException
- if a valid
MBeanServerConnection
cannot be created.JMXConnector.getMBeanServerConnection()
public void addConnectionNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
This implementation does nothing. Since local connections never change, they never emit notifications.
addConnectionNotificationListener
in interface MBeanServerConnectionFactory
listener
- a listener to receive connection status
notifications.filter
- a filter to select which notifications are to be
delivered to the listener, or null if all notifications are to
be delivered.handback
- an object to be given to the listener along
with each notification. Can be null.MBeanServerConnectionFactory.removeConnectionNotificationListener(javax.management.NotificationListener)
,
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void removeConnectionNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
This implementation does nothing. Since local connections never change, they never emit notifications.
removeConnectionNotificationListener
in interface MBeanServerConnectionFactory
listener
- a listener to receive connection status
notifications.
javax.management.ListenerNotFoundException
- if the listener is not
registered with this JMXConnector
.MBeanServerConnectionFactory.removeConnectionNotificationListener(NotificationListener,
NotificationFilter, Object)
,
MBeanServerConnectionFactory.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
,
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void removeConnectionNotificationListener(javax.management.NotificationListener l, javax.management.NotificationFilter f, java.lang.Object handback) throws javax.management.ListenerNotFoundException
This implementation does nothing. Since local connections never change, they never emit notifications.
removeConnectionNotificationListener
in interface MBeanServerConnectionFactory
l
- a listener to receive connection status notifications.f
- a filter to select which notifications are to be
delivered to the listener. Can be null.handback
- an object to be given to the listener along
with each notification. Can be null.
javax.management.ListenerNotFoundException
- if the listener is not
registered with this JMXConnector
, or is not
registered with the given filter and handback.MBeanServerConnectionFactory.removeConnectionNotificationListener(NotificationListener)
,
MBeanServerConnectionFactory.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
,
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public final java.lang.String getConnectionId() throws java.io.IOException
Returns the connection ID identifying this local connection, as passed to this object's constructor.
getConnectionId
in interface MBeanServerConnectionFactory
java.io.IOException
- if the connection ID cannot be obtained,
for instance because the connection is closed or broken.public static MBeanServerConnectionFactory newInstance(javax.management.MBeanServer s)
LocalMBeanServerConnectionFactory
.
This is equivalent to new LocalMBeanServerConnectionFactory(s,cid)
.
s
- A local MBeanServer for which to obtain a
MBeanServerConnectionFactory.getConnectionId()
|
Open Source build 01-ea opendmk-1.0-b01-ea 2010.09.25_15:22:04_BST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |