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:
MBeanRegistration,NotificationBroadcaster,NotificationEmitter,JMXAddressable,JMXConnectorServerMBean
Implementation of
JMXConnectorServer 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
standard JMXConnectorServer.getConnectionIds() may return you an empty array as the corresponding
JMXConnectorServer.connectionClosed(String, String, Object), JMXConnectorServer.connectionOpened(String, String, Object),
JMXConnectorServer.connectionFailed(String, String, Object) methods are never called.
-
Field Summary
Fields inherited from class javax.management.remote.JMXConnectorServer
AUTHENTICATOR -
Constructor Summary
ConstructorsConstructorDescriptionJmsJmxConnectorServer(JMXServiceURL url, Map<String, ?> environment, MBeanServer server, JmsJmxConnectionFactory factory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) booleanisActive()voidvoidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) voidsendNotification(Notification notification) voidstart()voidstop()toJMXConnector(Map<String, ?> env) Methods inherited from class javax.management.remote.JMXConnectorServer
connectionClosed, connectionFailed, connectionOpened, getConnectionIds, getMBeanServer, getNotificationInfo, postDeregister, postRegister, preDeregister, preRegister, setMBeanServerForwarderMethods inherited from class javax.management.NotificationBroadcasterSupport
handleNotification
-
Constructor Details
-
JmsJmxConnectorServer
public JmsJmxConnectorServer(JMXServiceURL url, Map<String, ?> environment, MBeanServer server, JmsJmxConnectionFactory factory) throws IOExceptionConstructor.- Parameters:
url- the JMXServiceURL.environment- the initial environment forgetAttributes()server- theMBeanServerthat we should be attached to.factory- theJmsJmxConnectionFactorythat will used to connection to the JMS Provider.- Throws:
IOException- wrapping any other exception.
-
-
Method Details
-
start
- Throws:
IOException
-
stop
- Throws:
IOException
-
toJMXConnector
Note that this will throw an UnsupportedOperationException
- Specified by:
toJMXConnectorin interfaceJMXConnectorServerMBean- Overrides:
toJMXConnectorin classJMXConnectorServer- Throws:
IOException
-
isActive
public boolean isActive() -
getAddress
-
getAttributes
-
sendNotification
- Overrides:
sendNotificationin classNotificationBroadcasterSupport
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException - Specified by:
addNotificationListenerin interfaceNotificationBroadcaster- Overrides:
addNotificationListenerin classNotificationBroadcasterSupport- Throws:
IllegalArgumentException
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationBroadcaster- Overrides:
removeNotificationListenerin classNotificationBroadcasterSupport- Throws:
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationEmitter- Overrides:
removeNotificationListenerin classNotificationBroadcasterSupport- Throws:
ListenerNotFoundException
-