|
||||||||||
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(MBeanServerConnection local,
String localID)
Creates a LocalMBeanServerConnectionFactory from a local MBeanServerConnection. |
Method Summary | |
---|---|
void |
addConnectionNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
This implementation does nothing. |
String |
getConnectionId()
Returns the connection ID identifying this local connection, as passed to this object's constructor. |
MBeanServerConnection |
getMBeanServerConnection()
Return the local MBeanServerConnection as passed
to the constructor of this object. |
static MBeanServerConnectionFactory |
newInstance(MBeanServer s)
Creates a new instance of a LocalMBeanServerConnectionFactory . |
void |
removeConnectionNotificationListener(NotificationListener listener)
This implementation does nothing. |
void |
removeConnectionNotificationListener(NotificationListener l,
NotificationFilter f,
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(MBeanServerConnection local, 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 MBeanServerConnection getMBeanServerConnection() throws 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
IOException
- if a valid
MBeanServerConnection
cannot be created.JMXConnector.getMBeanServerConnection()
public void addConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, 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(NotificationListener listener) throws 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.
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(NotificationListener l, NotificationFilter f, Object handback) throws 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.
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 String getConnectionId() throws IOException
Returns the connection ID identifying this local connection, as passed to this object's constructor.
getConnectionId
in interface MBeanServerConnectionFactory
IOException
- if the connection ID cannot be obtained,
for instance because the connection is closed or broken.public static MBeanServerConnectionFactory newInstance(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 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 |