Class DelegatingBrokerFactory

    • Constructor Detail

      • DelegatingBrokerFactory

        public DelegatingBrokerFactory​(BrokerFactory factory)
        Constructor; supply delegate.
    • Method Detail

      • getDelegate

        public BrokerFactory getDelegate()
        Return the direct delegate.
      • getInnermostDelegate

        public BrokerFactory getInnermostDelegate()
        Return the native delegate.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getSupportedProperties

        public Set<String> getSupportedProperties()
        Description copied from interface: BrokerFactory
        Return all of the supported properties as a set of keys. If a property has multiple keys, all keys will be returned.
        Specified by:
        getSupportedProperties in interface BrokerFactory
      • newBroker

        public Broker newBroker​(String user,
                                String pass,
                                boolean managed,
                                int connRetainMode,
                                boolean findExisting)
        Description copied from interface: BrokerFactory
        Return a broker using the given credentials and in the given transaction and connection retain mode, optionally finding existing broker in the global transaction.
        Specified by:
        newBroker in interface BrokerFactory
      • newBroker

        public Broker newBroker​(String user,
                                String pass,
                                boolean managed,
                                int connRetainMode,
                                boolean findExisting,
                                String cfName,
                                String cf2Name)
        Description copied from interface: BrokerFactory
        Return a new broker using the supplied
        • credentials
        • transaction management mode
        • connectionRetainMode
        • connectionFactories
        Specified by:
        newBroker in interface BrokerFactory
        Parameters:
        user - Username to use when obtaining a connection. Will be ignored if a connection factory is obtained from JNDI.
        pass - Password to use when obtaining a connection. Will be ignored if a connection factory is obtained from JNDI.
        managed - Whether managed transactions will be used by this Broker
        connRetainMode - ConnectionRetainMode
        findExisting - Whether the internal pool of brokers should be used.
        cfName - JTA ConnectionFactory to use
        cf2Name - Non-JTA ConnectionFactory to use.
        Returns:
        A Broker which matches the provided criteria.
      • addLifecycleListener

        public void addLifecycleListener​(Object listener,
                                         Class[] classes)
        Description copied from interface: BrokerFactory
        Register a listener for lifecycle-related events on the specified classes. If the classes are null, all events will be propagated to the listener. The listener will be passed on to all new brokers.
        Specified by:
        addLifecycleListener in interface BrokerFactory
      • addTransactionListener

        public void addTransactionListener​(Object listener)
        Description copied from interface: BrokerFactory
        Register a listener for transaction-related events on the specified classes. It will be registered with all Brokers created from this instance moving forward.
        Specified by:
        addTransactionListener in interface BrokerFactory
      • removeTransactionListener

        public void removeTransactionListener​(Object listener)
        Description copied from interface: BrokerFactory
        Remove a listener for transaction-related events. It will no longer be registered with new Brokers created from this instance.
        Specified by:
        removeTransactionListener in interface BrokerFactory
      • isClosed

        public boolean isClosed()
        Description copied from interface: BrokerFactory
        Returns true if this broker factory is closed.
        Specified by:
        isClosed in interface BrokerFactory
      • lock

        public void lock()
        Description copied from interface: BrokerFactory
        Synchronizes on an internal lock.
        Specified by:
        lock in interface BrokerFactory
      • assertOpen

        public void assertOpen()
        Description copied from interface: BrokerFactory
        assert that this broker is open. If the broker has been closed an IllegalStateException will be thrown with information on when the broker was closed.
        Specified by:
        assertOpen in interface BrokerFactory
      • postCreationCallback

        public void postCreationCallback()
        Description copied from interface: BrokerFactory
        This method is invoked AFTER a BrokerFactory has been instantiated.
        Specified by:
        postCreationCallback in interface BrokerFactory