Class JmsJmxConnectionFactoryImpl

    • Field Detail

      • log

        protected static final org.slf4j.Logger log
      • initialEnvironment

        protected transient java.util.Map<java.lang.String,​?> initialEnvironment
      • jmsEnvironment

        protected transient java.util.Map<java.lang.String,​java.lang.String> jmsEnvironment
      • lock

        protected transient java.lang.Object lock
    • Constructor Detail

      • JmsJmxConnectionFactoryImpl

        protected JmsJmxConnectionFactoryImpl​(java.util.Map<java.lang.String,​?> env,
                                              javax.management.remote.JMXServiceURL url)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • validateProtocol

        protected void validateProtocol​(java.lang.String protocol)
                                 throws java.net.MalformedURLException
        Validate the protocol
        Parameters:
        protocol - the protocol from the JMXServiceURL
        Throws:
        java.net.MalformedURLException - if the protocol is invalid
      • validProtocols

        protected abstract java.util.Collection<java.lang.String> validProtocols()
      • createQueueDestination

        protected final javax.jms.Queue createQueueDestination​(java.lang.String qName)
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createTopicDestination

        protected final javax.jms.Topic createTopicDestination​(java.lang.String tName)
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createTemporaryDestination

        public javax.jms.Destination createTemporaryDestination​(javax.jms.Session s)
                                                         throws javax.jms.JMSException
        Description copied from interface: JmsJmxConnectionFactory
        Create a temporary destination (either a queue or a topic).
        Specified by:
        createTemporaryDestination in interface JmsJmxConnectionFactory
        Parameters:
        s - the session
        Returns:
        a TemporaryQueue or TemporaryTopic.
        Throws:
        javax.jms.JMSException - if there was an error creating the temporary destination.
      • createDefaultEnvironment

        protected java.util.Map<java.lang.String,​java.lang.String> createDefaultEnvironment()
      • buildJmsEnvironment

        protected java.util.Map<java.lang.String,​java.lang.String> buildJmsEnvironment​(java.util.Map<java.lang.String,​?> initial,
                                                                                             java.util.Map<java.lang.String,​java.lang.String> defaultEnv)
      • createInvokerProxy

        public com.adaptris.jmx.remote.jms.JmsInvokerProxy createInvokerProxy()
                                                                       throws javax.jms.JMSException
        Description copied from interface: JmsJmxConnectionFactory
        Create the invoker proxy.
        Specified by:
        createInvokerProxy in interface JmsJmxConnectionFactory
        Returns:
        a JmsInvokerProxy instance.
        Throws:
        javax.jms.JMSException - if there was an problem creating the invoker proxy.
      • getTargetDestination

        public javax.jms.Destination getTargetDestination()
                                                   throws javax.jms.JMSException
        Description copied from interface: JmsJmxConnectionFactory
        Get the target dstination where you want to send requests and other things to.
        Specified by:
        getTargetDestination in interface JmsJmxConnectionFactory
        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

        protected java.net.URI getBrokerURI​(javax.management.remote.JMXServiceURL serviceURL)
                                     throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • parseParameters

        public static java.util.Map<java.lang.String,​java.lang.String> parseParameters​(java.net.URI uri)
                                                                                      throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • rebuildQuery

        protected static java.lang.String rebuildQuery​(java.util.Map<java.lang.String,​java.lang.String> params,
                                                       java.util.Set<java.lang.String> ignoreKeys)
                                                throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • removeQuery

        public static java.net.URI removeQuery​(java.net.URI uri)
                                        throws java.net.URISyntaxException
        Removes any URI query from the given uri
        Throws:
        java.net.URISyntaxException
      • maskUserInfo

        protected static java.net.URI maskUserInfo​(java.net.URI uri)
                                            throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • newURI

        protected static java.net.URI newURI​(java.net.URI uri,
                                             java.lang.String query)
                                      throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • wrapJmsException

        protected static javax.jms.JMSException wrapJmsException​(java.lang.Throwable e)