public class RemoteMBeanProxy
extends java.lang.Object
implements javax.management.DynamicMBean, javax.management.NotificationEmitter, javax.management.MBeanRegistration
Constructor and Description |
---|
RemoteMBeanProxy(javax.management.ObjectName remoteObjectName,
javax.management.remote.JMXConnector connector,
java.util.Map environment,
javax.security.auth.Subject delegate) |
RemoteMBeanProxy(javax.management.ObjectName remoteObjectName,
javax.management.remote.JMXServiceURL url,
java.util.Map environment,
javax.security.auth.Subject delegate) |
RemoteMBeanProxy(javax.management.ObjectName remoteObjectName,
javax.management.MBeanServerConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a notification listener to this emitter.
|
java.lang.Object |
getAttribute(java.lang.String attribute) |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes) |
protected javax.management.remote.JMXConnector |
getJMXConnector() |
javax.management.MBeanInfo |
getMBeanInfo() |
protected javax.management.MBeanServerConnection |
getMBeanServerConnection() |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
Returns the metadata information associated with this emitter.
|
protected javax.management.ObjectName |
getRemoteObjectName() |
java.lang.Object |
invoke(java.lang.String method,
java.lang.Object[] arguments,
java.lang.String[] params) |
void |
postDeregister()
Callback called just after the MBean has been successfully unregistered.
|
void |
postRegister(java.lang.Boolean registrationDone)
Callback called just after the MBean has been registered (successfully or not).
|
void |
preDeregister()
Callback called just before MBean unregistration from the MBeanServer.
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Callback called just before MBean registration in the MBeanServer.
|
void |
removeNotificationListener(javax.management.NotificationListener listener)
Removes a notification listener from this emitter.
|
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes a notification listener from this MBean.
|
void |
setAttribute(javax.management.Attribute attribute) |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes) |
public RemoteMBeanProxy(javax.management.ObjectName remoteObjectName, javax.management.remote.JMXServiceURL url, java.util.Map environment, javax.security.auth.Subject delegate) throws java.io.IOException
java.io.IOException
public RemoteMBeanProxy(javax.management.ObjectName remoteObjectName, javax.management.remote.JMXConnector connector, java.util.Map environment, javax.security.auth.Subject delegate) throws java.io.IOException
java.io.IOException
public RemoteMBeanProxy(javax.management.ObjectName remoteObjectName, javax.management.MBeanServerConnection connection)
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
javax.management.MBeanRegistration
preRegister
in interface javax.management.MBeanRegistration
server
- The MBeanServer on which the MBean will be registered.name
- The ObjectName
of the MBean.ObjectName
of the registered MBean, must not be nulljava.lang.Exception
- Any possible exception generated by this method will be caught
by the MBeanServer
and re-thrown as an MBeanRegistrationException
to the client.public void postRegister(java.lang.Boolean registrationDone)
javax.management.MBeanRegistration
postRegister
in interface javax.management.MBeanRegistration
registrationDone
- True if the registration was successful, false otherwise.public void preDeregister() throws java.lang.Exception
javax.management.MBeanRegistration
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
- Any possible exception generated by this method will be caught
by the MBeanServer
and re-thrown as an MBeanRegistrationException
to the client.public void postDeregister()
javax.management.MBeanRegistration
postDeregister
in interface javax.management.MBeanRegistration
protected javax.management.ObjectName getRemoteObjectName()
protected javax.management.MBeanServerConnection getMBeanServerConnection()
protected javax.management.remote.JMXConnector getJMXConnector()
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
public java.lang.Object getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
getAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
setAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes
in interface javax.management.DynamicMBean
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
public java.lang.Object invoke(java.lang.String method, java.lang.Object[] arguments, java.lang.String[] params) throws javax.management.MBeanException, javax.management.ReflectionException
invoke
in interface javax.management.DynamicMBean
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
javax.management.NotificationBroadcaster
getNotificationInfo
in interface javax.management.NotificationBroadcaster
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
javax.management.NotificationBroadcaster
addNotificationListener
in interface javax.management.NotificationBroadcaster
listener
- The notification listener which will handle the notifications emitted.filter
- Filters notifications that the listener should receive; may be null, if no filtering is required.handback
- An opaque object to be sent back to the listener when a notification is emitted.java.lang.IllegalArgumentException
NotificationBroadcaster.removeNotificationListener(NotificationListener)
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
javax.management.NotificationBroadcaster
removeNotificationListener
in interface javax.management.NotificationBroadcaster
listener
- The notification listener that was previously added to this emitter.javax.management.ListenerNotFoundException
- If the listener is not registered with the emitter.NotificationBroadcaster.addNotificationListener(NotificationListener, NotificationFilter, Object)
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
javax.management.NotificationEmitter
removeNotificationListener
in interface javax.management.NotificationEmitter
listener
- The listener that was previously added to this MBean.filter
- The filter that was specified when the listener was added.handback
- The handback that was specified when the listener was added.javax.management.ListenerNotFoundException
- If the triple listener, filter, handback is not registered with the emitter