Class AbstractConnectionFactory

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability, fix with 5.15.0 value
        See Also:
        Constant Field Values
      • logger

        private static Logger logger
      • DEBUG

        private static final boolean DEBUG
      • params

        protected FactoryParameters params
        Object containing the factory's parameters.
      • reliableClass

        protected String reliableClass
        Reliable class name, for example use by ssl.
      • identity

        protected Identity identity
        Authentication identity.
      • identityClassName

        protected String identityClassName
      • isSetIdentityClassName

        private boolean isSetIdentityClassName
      • dfltServerHost

        static final String dfltServerHost
        Default server's hostname for connection, default value is "localhost". This value can be adjusted through the JoramDfltServerHost property.
        See Also:
        Constant Field Values
      • dfltServerPort

        static final int dfltServerPort
        Default server's port for connection, default value is 16010. This value can be adjusted through the JoramDfltServerPort property.
        See Also:
        Constant Field Values
      • dfltRootLogin

        static final String dfltRootLogin
        Default administrator login name for connection, default value is "root". This value can be adjusted through the JoramDfltRootLogin property.
        See Also:
        Constant Field Values
      • dfltRootPassword

        static final String dfltRootPassword
        Default administrator login password for connection, default value is "root". This value can be adjusted through the JoramDfltRootPassword property.
        See Also:
        Constant Field Values
      • dfltLogin

        static final String dfltLogin
        Default login name for connection, default value is "anonymous". This value can be adjusted through the JoramDfltLogin property.
        See Also:
        Constant Field Values
      • dfltPassword

        static final String dfltPassword
        Default login password for connection, default value is "anonymous". This value can be adjusted through the JoramDfltPassword property.
        See Also:
        Constant Field Values
      • cnxJMXBeanBaseName

        private String cnxJMXBeanBaseName
    • Constructor Detail

      • AbstractConnectionFactory

        public AbstractConnectionFactory​(String host,
                                         int port)
        Constructs a ConnectionFactory dedicated to a given server.
        Parameters:
        host - Name or IP address of the server's host.
        port - Server's listening port.
      • AbstractConnectionFactory

        public AbstractConnectionFactory​(String url)
        Constructs a ConnectionFactory dedicated to a given server.
        Parameters:
        url - joram ha url.
      • AbstractConnectionFactory

        public AbstractConnectionFactory()
        Constructs an empty ConnectionFactory. Needed by ObjectFactory.
    • Method Detail

      • setIdentityClassName

        public void setIdentityClassName​(String identityClassName)
        set indentity class name
        Parameters:
        identityClassName - default Identity.SIMPLE_IDENTITY_CLASS (user/passwd).
      • initIdentity

        protected void initIdentity​(String user,
                                    String passwd)
                             throws jakarta.jms.JMSException
        initialize the user identity.
        Parameters:
        user - user name
        passwd - user password
        Throws:
        jakarta.jms.JMSException
      • setReliableClass

        public void setReliableClass​(String reliableClass)
      • getDefaultServerHost

        public static String getDefaultServerHost()
        Returns default server's hostname for connection. Default value "localhost" can be adjusted by setting the JoramDfltServerHost property.
      • getDefaultServerPort

        public static int getDefaultServerPort()
        Returns default server's port for connection. Default value 16010 can be adjusted by setting the JoramDfltServerPort property.
      • getDefaultRootLogin

        public static String getDefaultRootLogin()
        Returns default administrator login name for connection. Default value "root" can be adjusted by setting the JoramDfltRootLogin property.
      • getDefaultRootPassword

        public static String getDefaultRootPassword()
        Returns the default administrator login password for connection. Default value "root" can be adjusted by setting the JoramDfltRootPassword property.
      • getDefaultLogin

        public static String getDefaultLogin()
        Returns default login name for connection. Default value "anonymous" can be adjusted by setting the JoramDfltLogin property.
      • getDefaultPassword

        public static String getDefaultPassword()
        Returns the default login password for connection. Default value "anonymous" can be adjusted by setting the JoramDfltPassword property.
      • getParameters

        public FactoryParameters getParameters()
        Returns the factory's configuration parameters.
      • setCnxJMXBeanBaseName

        public void setCnxJMXBeanBaseName​(String base)
      • createRequestChannel

        protected abstract RequestChannel createRequestChannel​(FactoryParameters params,
                                                               Identity identity,
                                                               String reliableClass)
                                                        throws jakarta.jms.JMSException
        Creates the RequestChannel object specific to the protocol used.
        Parameters:
        params - Connection configuration parameters.
        identity - Client's identity.
        reliableClass - The protocol specific class.
        Returns:
        The RequestChannel object specific to the protocol used.
        Throws:
        jakarta.jms.JMSException - A problem occurs during the connection.
      • createConnection

        public jakarta.jms.Connection createConnection()
                                                throws jakarta.jms.JMSException
        API method, creates a connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        ConnectionFactory.createConnection()
      • createConnection

        public jakarta.jms.Connection createConnection​(String name,
                                                       String password)
                                                throws jakarta.jms.JMSException
        API method, creates a connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        ConnectionFactory.createConnection(String, String)
      • createQueueConnection

        public jakarta.jms.QueueConnection createQueueConnection()
                                                          throws jakarta.jms.JMSException
        API method, creates a queue connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created queue connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        QueueConnectionFactory.createQueueConnection()
      • createQueueConnection

        public jakarta.jms.QueueConnection createQueueConnection​(String name,
                                                                 String password)
                                                          throws jakarta.jms.JMSException
        API method, creates a queue connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created queue connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        QueueConnectionFactory.createQueueConnection(String, String)
      • createTopicConnection

        public jakarta.jms.TopicConnection createTopicConnection()
                                                          throws jakarta.jms.JMSException
        API method, creates a topic connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created topic connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        TopicConnectionFactory.createTopicConnection()
      • createTopicConnection

        public jakarta.jms.TopicConnection createTopicConnection​(String name,
                                                                 String password)
                                                          throws jakarta.jms.JMSException
        API method, creates a topic connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created topic connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        TopicConnectionFactory.createTopicConnection(String, String)
      • createXAConnection

        public jakarta.jms.XAConnection createXAConnection()
                                                    throws jakarta.jms.JMSException
        API method, creates an XA connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created XA connection..
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XAConnectionFactory.createXAConnection()
      • createXAConnection

        public jakarta.jms.XAConnection createXAConnection​(String name,
                                                           String password)
                                                    throws jakarta.jms.JMSException
        API method, creates an XA connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created XA connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XAConnectionFactory.createXAConnection(String, String)
      • createXAQueueConnection

        public jakarta.jms.XAQueueConnection createXAQueueConnection()
                                                              throws jakarta.jms.JMSException
        API method, creates an XA queue connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created XA queue connection..
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XAQueueConnectionFactory.createXAQueueConnection()
      • createXAQueueConnection

        public jakarta.jms.XAQueueConnection createXAQueueConnection​(String name,
                                                                     String password)
                                                              throws jakarta.jms.JMSException
        API method, creates an XA queue connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created XA queue connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XAQueueConnectionFactory.createXAQueueConnection(String, String)
      • createXATopicConnection

        public jakarta.jms.XATopicConnection createXATopicConnection()
                                                              throws jakarta.jms.JMSException
        API method, creates an XA topic connection with the default user identity. The connection is created in stopped mode.
        Returns:
        a newly created XA topic connection..
        Throws:
        jakarta.jms.JMSSecurityException - If the default identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XATopicConnectionFactory.createXATopicConnection()
      • createXATopicConnection

        public jakarta.jms.XATopicConnection createXATopicConnection​(String name,
                                                                     String password)
                                                              throws jakarta.jms.JMSException
        API method, creates an XA topic connection with the specified user identity. The connection is created in stopped mode.
        Parameters:
        name - the caller's user name.
        password - the caller's password.
        Returns:
        a newly created XA topic connection.
        Throws:
        jakarta.jms.JMSSecurityException - If the user identification is incorrect.
        IllegalStateException - If the server is not listening.
        jakarta.jms.JMSException
        See Also:
        XATopicConnectionFactory.createXATopicConnection(String, String)
      • toReference

        public void toReference​(Reference ref,
                                String prefix)
        Sets the clustered naming reference of a connection factory.
      • fromReference

        public void fromReference​(Reference ref,
                                  String prefix)
        Restores the administered object from a clustered naming reference.
      • createContext

        public jakarta.jms.JMSContext createContext()
        JMS2.0 API method.
      • createContext

        public jakarta.jms.JMSContext createContext​(int mode)
        JMS2.0 API method.
      • createContext

        public jakarta.jms.JMSContext createContext​(String userName,
                                                    String password)
        JMS2.0 API method.
      • createContext

        public JMSContext createContext​(String userName,
                                        String password,
                                        int mode)
        JMS2.0 API method.
      • createXAContext

        public jakarta.jms.XAJMSContext createXAContext()
        JMS2.0 API method.
      • createXAContext

        public jakarta.jms.XAJMSContext createXAContext​(String userName,
                                                        String password)
        JMS2.0 API method.