Package org.apache.qpid.amqp_1_0.transport

Examples of org.apache.qpid.amqp_1_0.transport.Container


            _typeRegistry.registerSecurityLayer();
        }

        public MessageMetaData_1_0 createMetaData(ByteBuffer buf)
        {
            ValueHandler valueHandler = new ValueHandler(_typeRegistry);

            ArrayList<Section> sections = new ArrayList<Section>(3);
            ArrayList<ByteBuffer> encodedSections = new ArrayList<ByteBuffer>(3);

            while(buf.hasRemaining())
            {
                try
                {
                    ByteBuffer encodedBuf = buf.duplicate();
                    Object parse = valueHandler.parse(buf);
                    sections.add((Section) parse);
                    encodedBuf.limit(buf.position());
                    encodedSections.add(encodedBuf);

                }
View Full Code Here


            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    _user = _saslServerProvider.getAuthenticatedPrincipal(_saslServer);
                    getLock().notifyAll();
                }

                if (_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

        }
        else if (mechanisms.contains(SASL_EXTERNAL))
        {
            init.setMechanism(SASL_EXTERNAL);
        }
        _saslFrameOutput.send(new SASLFrame(init), null);
    }
View Full Code Here

            if (_saslServer.isComplete())
            {
                SaslOutcome outcome = new SaslOutcome();

                outcome.setCode(SaslCode.OK);
                _saslFrameOutput.send(new SASLFrame(outcome), null);
                synchronized (getLock())
                {
                    _saslComplete = true;
                    _authenticated = true;
                    _user = _saslServerProvider.getAuthenticatedPrincipal(_saslServer);
                    getLock().notifyAll();
                }
                if (_onSaslCompleteTask != null)
                {
                    _onSaslCompleteTask.run();
                }

            }
            else
            {
                SaslChallenge challengeBody = new SaslChallenge();
                challengeBody.setChallenge(new Binary(challenge));
                _saslFrameOutput.send(new SASLFrame(challengeBody), null);

            }
        }
        catch (SaslException e)
        {
            SaslOutcome outcome = new SaslOutcome();

            outcome.setCode(SaslCode.AUTH);
            _saslFrameOutput.send(new SASLFrame(outcome), null);
            synchronized (getLock())
            {
                _saslComplete = true;
                _authenticated = false;
                getLock().notifyAll();
View Full Code Here

        for (String name : mechanismNames)
        {
            mechanismsList.add(Symbol.valueOf(name));
        }
        mechanisms.setSaslServerMechanisms(mechanismsList.toArray(new Symbol[mechanismsList.size()]));
        _saslFrameOutput.send(new SASLFrame(mechanisms), null);
    }
View Full Code Here

                        final ExceptionListener exceptionListener = _connection.getExceptionListener();
                        if(exceptionListener != null)
                        {
                            if(error != null)
                            {
                                SessionException se = new SessionException(
                                        error.getDescription(),
                                        error.getCondition().getValue().toString());

                                exceptionListener.onException(se);
                            }
                            else
                            {
                                exceptionListener.onException(new SessionException("Session remotely closed"));
                            }
                        }
                    }
                    catch (JMSException e)
                    {
View Full Code Here

    {
        checkClosed();
        checkValidDestination(destination);
        if(destination instanceof TemporaryDestination)
        {
            TemporaryDestination temporaryDestination = (TemporaryDestination) destination;
            if(temporaryDestination.getSession() != this)
            {
                throw new JMSException("Cannot consume from a temporary destination created on another session");
            }
            if(temporaryDestination.isDeleted())
            {
                throw new IllegalStateException("Destination is deleted");
            }
        }
        final MessageConsumerImpl messageConsumer;
View Full Code Here

    @Override
    public final Message_1_0 convert(M message, VirtualHost vhost)
    {

        SectionEncoder sectionEncoder = new SectionEncoderImpl(_typeRegistry);
        return new Message_1_0(convertToStoredMessage(message, sectionEncoder));
    }
View Full Code Here

    @Override
    public final Message_1_0 convert(M message, VirtualHost vhost)
    {

        SectionEncoder sectionEncoder = new SectionEncoderImpl(_typeRegistry);
        return new Message_1_0(convertToStoredMessage(message, sectionEncoder));
    }
View Full Code Here

    protected abstract void run();


    public Connection newConnection() throws ConnectionException
    {
        Container container = getContainerName() == null ? new Container() : new Container(getContainerName());
        return getUsername() == null ? new Connection(getHost(), getPort(), null, null, _frameSize, container,
                                                      _remoteHost == null ? getHost() : _remoteHost, _useSSL,
                                                      0)
                                     : new Connection(getHost(), getPort(), getUsername(), getPassword(), _frameSize,
                                                      container, _remoteHost == null ? getHost() : _remoteHost, _useSSL,
View Full Code Here

TOP

Related Classes of org.apache.qpid.amqp_1_0.transport.Container

Copyright © 2018 www.massapicom. 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.