Examples of AMQStateManager

  • org.apache.qpid.server.protocol.v0_8.state.AMQStateManager
    The state manager is responsible for managing the state of the protocol session.

    For each AMQProtocolHandler there is a separate state manager.

  • org.apache.qpid.server.state.AMQStateManager
    The state manager is responsible for managing the state of the protocol session.

    For each AMQProtocolHandler there is a separate state manager.


  • Examples of org.apache.qpid.client.state.AMQStateManager

         */
        public AMQProtocolHandler(AMQConnection con)
        {
            _connection = con;
            _protocolSession = new AMQProtocolSession(this, _connection);
            _stateManager = new AMQStateManager(_protocolSession);
            _codecFactory = new AMQCodecFactory(false, _protocolSession);
            _failoverHandler = new FailoverHandler(this);
        }
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

        public AMQException getLastException()
        {
            // if the Connection has closed then we should throw any exception that
            // has occurred that we were not waiting for
            AMQStateManager manager = getAMQConnection().getProtocolHandler()
                    .getStateManager();
           
            Exception e = manager.getLastException();
            if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED)
                    && e != null)
            {
                if (e instanceof AMQException)
                {
                    return (AMQException) e;
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

         */
        public AMQProtocolHandler(AMQConnection con)
        {
            _connection = con;
            _protocolSession = new AMQProtocolSession(this, _connection);
            _stateManager = new AMQStateManager(_protocolSession);
            _codecFactory = new AMQCodecFactory(false, _protocolSession);
            _failoverHandler = new FailoverHandler(this);
        }
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

        public AMQException getLastException()
        {
            // if the Connection has closed then we should throw any exception that
            // has occurred that we were not waiting for
            AMQStateManager manager = getProtocolHandler().getStateManager();

            Exception e = manager.getLastException();
            if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED)
                    && e != null)
            {
                if (e instanceof AMQException)
                {
                    return (AMQException) e;
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

         */
        public AMQProtocolHandler(AMQConnection con)
        {
            _connection = con;
            _protocolSession = new AMQProtocolSession(this, _connection);
            _stateManager = new AMQStateManager(_protocolSession);
            _codecFactory = new AMQCodecFactory(false, _protocolSession);
            _poolReference.setThreadFactory(new ThreadFactory()
            {

                public Thread newThread(final Runnable runnable)
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

        public AMQException getLastException()
        {
            // if the Connection has closed then we should throw any exception that
            // has occurred that we were not waiting for
            AMQStateManager manager = _connection.getProtocolHandler()
                    .getStateManager();
           
            Exception e = manager.getLastException();
            if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED)
                    && e != null)
            {
                if (e instanceof AMQException)
                {
                    return (AMQException) e;
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

                ((AMQConnection) _connection).setConnectionListener(this);

                _connection.setExceptionListener(this);

                // Change the StateManager for one that doesn't respond with Close-OKs
                AMQStateManager oldStateManager = ((AMQConnection) _connection).getProtocolHandler().getStateManager();

                _session = _connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);

                _connection.start();

                // Test connection
                checkSendingMessage();

                // Set StateManager to manager that ignores Close-oks
                AMQProtocolSession protocolSession = ((AMQConnection) _connection).getProtocolHandler().getProtocolSession();
                AMQStateManager newStateManager = new NoCloseOKStateManager(protocolSession);
                newStateManager.changeState(oldStateManager.getCurrentState());

                ((AMQConnection) _connection).getProtocolHandler().setStateManager(newStateManager);

                final int TEST_CHANNEL = 1;
                _logger.info("Testing Channel(" + TEST_CHANNEL + ") Creation");
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

        public AMQException getLastException()
        {
            // if the Connection has closed then we should throw any exception that
            // has occurred that we were not waiting for
            AMQStateManager manager = getProtocolHandler().getStateManager();

            Exception e = manager.getLastException();
            if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED)
                    && e != null)
            {
                if (e instanceof AMQException)
                {
                    return (AMQException) e;
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

                super.checkNotClosed();
            }
            catch (IllegalStateException ise)
            {
                // if the Connection has closed then we should throw any exception that has occurred that we were not waiting for
                AMQStateManager manager = _connection.getProtocolHandler().getStateManager();

                if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED) && manager.getLastException() != null)
                {
                    ise.setLinkedException(manager.getLastException());
                    ise.initCause(ise.getLinkedException());
                }

                throw ise;
            }
    View Full Code Here

    Examples of org.apache.qpid.client.state.AMQStateManager

                super.checkNotClosed();
            }
            catch (IllegalStateException ise)
            {
                // if the Connection has closed then we should throw any exception that has occured that we were not waiting for
                AMQStateManager manager = _connection.getProtocolHandler().getStateManager();

                if (manager.getCurrentState().equals(AMQState.CONNECTION_CLOSED) && manager.getLastException() != null)
                {
                    ise.setLinkedException(manager.getLastException());
                }

                throw ise;
            }
        }
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.