Package com.adaptris.jmx.remote.jms
Class JmsJmxConnectorServer
- java.lang.Object
-
- javax.management.NotificationBroadcasterSupport
-
- javax.management.remote.JMXConnectorServer
-
- com.adaptris.jmx.remote.jms.JmsJmxConnectorServer
-
- All Implemented Interfaces:
javax.management.MBeanRegistration
,javax.management.NotificationBroadcaster
,javax.management.NotificationEmitter
,javax.management.remote.JMXAddressable
,javax.management.remote.JMXConnectorServerMBean
public class JmsJmxConnectorServer extends javax.management.remote.JMXConnectorServer
Implementation ofJMXConnectorServer
that provides JMX connectivity via JMS.As this implementation uses a JMS Provider to provide connectivity, clients aren't directly connected to this server; requests automatically appear on the given
Destination
that this is registered against. As a result, you will find that the standardJMXConnectorServer.getConnectionIds()
may return you an empty array as the correspondingJMXConnectorServer.connectionClosed(String, String, Object)
,JMXConnectorServer.connectionOpened(String, String, Object)
,JMXConnectorServer.connectionFailed(String, String, Object)
methods are never called.
-
-
Constructor Summary
Constructors Constructor Description JmsJmxConnectorServer(javax.management.remote.JMXServiceURL url, java.util.Map environment, javax.management.MBeanServer server, JmsJmxConnectionFactory factory)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
javax.management.remote.JMXServiceURL
getAddress()
java.util.Map
getAttributes()
boolean
isActive()
void
removeNotificationListener(javax.management.NotificationListener listener)
void
removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
void
sendNotification(javax.management.Notification notification)
void
start()
void
stop()
javax.management.remote.JMXConnector
toJMXConnector(java.util.Map<java.lang.String,?> env)
-
-
-
Constructor Detail
-
JmsJmxConnectorServer
public JmsJmxConnectorServer(javax.management.remote.JMXServiceURL url, java.util.Map environment, javax.management.MBeanServer server, JmsJmxConnectionFactory factory) throws java.io.IOException
Constructor.- Parameters:
url
- the JMXServiceURL.environment
- the initial environment forgetAttributes()
server
- theMBeanServer
that we should be attached to.factory
- theJmsJmxConnectionFactory
that will used to connection to the JMS Provider.- Throws:
java.io.IOException
- wrapping any other exception.
-
-
Method Detail
-
start
public void start() throws java.io.IOException
- Throws:
java.io.IOException
-
stop
public void stop() throws java.io.IOException
- Throws:
java.io.IOException
-
toJMXConnector
public javax.management.remote.JMXConnector toJMXConnector(java.util.Map<java.lang.String,?> env) throws java.io.IOException
Note that this will throw an UnsupportedOperationException
- Specified by:
toJMXConnector
in interfacejavax.management.remote.JMXConnectorServerMBean
- Overrides:
toJMXConnector
in classjavax.management.remote.JMXConnectorServer
- Throws:
java.io.IOException
-
isActive
public boolean isActive()
-
getAddress
public javax.management.remote.JMXServiceURL getAddress()
-
getAttributes
public java.util.Map getAttributes()
-
sendNotification
public void sendNotification(javax.management.Notification notification)
- Overrides:
sendNotification
in classjavax.management.NotificationBroadcasterSupport
-
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
- Specified by:
addNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Overrides:
addNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
java.lang.IllegalArgumentException
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Overrides:
removeNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
javax.management.ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationEmitter
- Overrides:
removeNotificationListener
in classjavax.management.NotificationBroadcasterSupport
- Throws:
javax.management.ListenerNotFoundException
-
-