Package com.adaptris.jmx.remote.jms
Class JmsJmxConnectionFactoryImpl
java.lang.Object
com.adaptris.jmx.remote.jms.JmsJmxConnectionFactoryImpl
- All Implemented Interfaces:
JmsJmxConnectionFactory,javax.jms.ConnectionFactory
Base class for
JmsJmxConnectionFactory instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumprotected class -
Field Summary
FieldsFields inherited from interface com.adaptris.jmx.remote.jms.JmsJmxConnectionFactory
ATTR_BROKER_PASSWORD, ATTR_BROKER_USERNAME, ATTR_CLIENT_ID, ATTR_DESTINATION, ATTR_DESTINATION_TYPE, ATTR_RETRY_INTERVAL_MS, ATTR_TIMEOUT_MS, DEFAULT_RETRY_INTERVAL_MS, DEFAULT_TIMEOUT_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJmsJmxConnectionFactoryImpl(Map<String, ?> env, JMXServiceURL url) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOpenedConnection(javax.jms.Connection c) protected voidaddTemporaryQueue(javax.jms.TemporaryQueue t) protected voidaddTemporaryTopic(javax.jms.TemporaryTopic t) com.adaptris.jmx.remote.jms.JmsInvokerProxy<?>Create the invoker proxy.protected final javax.jms.QueuecreateQueueDestination(String qName) Create the invoker proxy.javax.jms.DestinationcreateTemporaryDestination(javax.jms.Session s) Create a temporary destination (either a queue or a topic).protected final javax.jms.TopiccreateTopicDestination(String tName) voiddestroy()Destroy any resources that may need destroying.protected URIgetBrokerURI(JMXServiceURL serviceURL) javax.jms.DestinationGet the target dstination where you want to send requests and other things to.protected static URImaskUserInfo(URI uri) protected static URIparseParameters(URI uri) protected static Stringstatic URIremoveQuery(URI uri) Removes any URI query from the given uriprotected voidvalidateProtocol(String protocol) Validate the protocolprotected abstract Collection<String>protected static javax.jms.JMSExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.jms.ConnectionFactory
createConnection, createConnection
-
Field Details
-
log
protected static final org.slf4j.Logger log -
initialEnvironment
-
jmsEnvironment
-
defaultConnection
-
destinationFactory
-
lock
-
-
Constructor Details
-
JmsJmxConnectionFactoryImpl
- Throws:
IOException
-
-
Method Details
-
validateProtocol
Validate the protocol- Parameters:
protocol- the protocol from theJMXServiceURL- Throws:
MalformedURLException- if the protocol is invalid
-
validProtocols
-
createQueueDestination
- Throws:
javax.jms.JMSException
-
createTopicDestination
- Throws:
javax.jms.JMSException
-
createTemporaryDestination
public javax.jms.Destination createTemporaryDestination(javax.jms.Session s) throws javax.jms.JMSException Description copied from interface:JmsJmxConnectionFactoryCreate a temporary destination (either a queue or a topic).- Specified by:
createTemporaryDestinationin interfaceJmsJmxConnectionFactory- Parameters:
s- the session- Returns:
- a
TemporaryQueueorTemporaryTopic. - Throws:
javax.jms.JMSException- if there was an error creating the temporary destination.
-
connect
protected JmsJmxConnectionFactoryImpl.JmxJmsConnection connect(javax.jms.ConnectionFactory factory, String loggingString) -
createDefaultEnvironment
-
buildJmsEnvironment
-
destroy
public void destroy()Description copied from interface:JmsJmxConnectionFactoryDestroy any resources that may need destroying.- Specified by:
destroyin interfaceJmsJmxConnectionFactory
-
createInvokerProxy
public com.adaptris.jmx.remote.jms.JmsInvokerProxy<?> createInvokerProxy() throws javax.jms.JMSExceptionDescription copied from interface:JmsJmxConnectionFactoryCreate the invoker proxy.- Specified by:
createInvokerProxyin interfaceJmsJmxConnectionFactory- Returns:
- a
JmsInvokerProxyinstance. - Throws:
javax.jms.JMSException- if there was an problem creating the invoker proxy.
-
createServiceExporter
Description copied from interface:JmsJmxConnectionFactoryCreate the invoker proxy.- Specified by:
createServiceExporterin interfaceJmsJmxConnectionFactory- Returns:
- a
ExtendedJmsInvokerServiceExporterinstance. - Throws:
javax.jms.JMSException- if there was an problem creating the ServiceExport proxy.
-
getTargetDestination
public javax.jms.Destination getTargetDestination() throws javax.jms.JMSExceptionDescription copied from interface:JmsJmxConnectionFactoryGet the target dstination where you want to send requests and other things to.- Specified by:
getTargetDestinationin interfaceJmsJmxConnectionFactory- Returns:
- the destination.
- Throws:
javax.jms.JMSException
-
addOpenedConnection
protected void addOpenedConnection(javax.jms.Connection c) -
addTemporaryTopic
protected void addTemporaryTopic(javax.jms.TemporaryTopic t) -
addTemporaryQueue
protected void addTemporaryQueue(javax.jms.TemporaryQueue t) -
getBrokerURI
- Throws:
URISyntaxException
-
parseParameters
- Throws:
URISyntaxException
-
rebuildQuery
protected static String rebuildQuery(Map<String, String> params, Set<String> ignoreKeys) throws URISyntaxException- Throws:
URISyntaxException
-
removeQuery
Removes any URI query from the given uri- Throws:
URISyntaxException
-
maskUserInfo
- Throws:
URISyntaxException
-
newURI
- Throws:
URISyntaxException
-
wrapJmsException
-