Package org.apache.qpid.proton.amqp.transport

Examples of org.apache.qpid.proton.amqp.transport.ErrorCondition


      }
      catch (Exception e)
      {
         e.printStackTrace();
         Rejected rejected = new Rejected();
         ErrorCondition condition = new ErrorCondition();
         condition.setCondition(Symbol.valueOf("failed"));
         condition.setDescription(e.getMessage());
         rejected.setError(condition);
         delivery.disposition(rejected);
      }
   }
View Full Code Here


                            Detach detach = new Detach();
                            detach.setHandle(localHandle);
                            // TODO - need an API for detaching rather than closing the link
                            detach.setClosed(true);

                            ErrorCondition localError = link.getCondition();
                            if( localError.getCondition() !=null )
                            {
                                detach.setError(localError);
                            }

View Full Code Here

                   && !hasSendableMessages(session)
                   && !_isCloseSent)
                {
                    int channel = freeLocalChannel(transportSession);
                    End end = new End();
                    ErrorCondition localError = endpoint.getCondition();
                    if( localError.getCondition() !=null )
                    {
                        end.setError(localError);
                    }

                    writeFrame(channel, end, null, null);
View Full Code Here

        {
            if(!hasSendableMessages(null))
            {
                Close close = new Close();

                ErrorCondition localError = _connectionEndpoint.getCondition();
                if( localError.getCondition() !=null )
                {
                    close.setError(localError);
                }

                _isCloseSent = true;
View Full Code Here

        {
            _remoteSessions[channel] = null;
            transportSession.receivedEnd();
            SessionImpl session = transportSession.getSession();
            session.setRemoteState(EndpointState.CLOSED);
            ErrorCondition errorCondition = end.getError();
            if(errorCondition != null)
            {
                session.getRemoteCondition().copyFrom(errorCondition);
            }
        }
View Full Code Here

    public ErrorCondition newInstance(Object described)
    {
        List l = (List) described;

        ErrorCondition o = new ErrorCondition();

        if(l.isEmpty())
        {
            throw new DecodeException("The condition field cannot be omitted");
        }

        switch(3 - l.size())
        {

            case 0:
                o.setInfo( (Map) l.get( 2 ) );
            case 1:
                o.setDescription( (String) l.get( 1 ) );
            case 2:
                o.setCondition( (Symbol) l.get( 0 ) );
        }


        return o;
    }
View Full Code Here

                            Detach detach = new Detach();
                            detach.setHandle(localHandle);
                            // TODO - need an API for detaching rather than closing the link
                            detach.setClosed(true);

                            ErrorCondition localError = link.getCondition();
                            if( localError.getCondition() !=null )
                            {
                                detach.setError(localError);
                            }

View Full Code Here

                   && !hasSendableMessages(session)
                   && !_isCloseSent)
                {
                    int channel = freeLocalChannel(transportSession);
                    End end = new End();
                    ErrorCondition localError = endpoint.getCondition();
                    if( localError.getCondition() !=null )
                    {
                        end.setError(localError);
                    }

                    writeFrame(channel, end, null, null);
View Full Code Here

        {
            if(!hasSendableMessages(null))
            {
                Close close = new Close();

                ErrorCondition localError = _connectionEndpoint.getCondition();
                if( localError.getCondition() !=null )
                {
                    close.setError(localError);
                }

                _isCloseSent = true;
View Full Code Here

        {
            _remoteSessions[channel] = null;
            transportSession.receivedEnd();
            SessionImpl session = transportSession.getSession();
            session.setRemoteState(EndpointState.CLOSED);
            ErrorCondition errorCondition = end.getError();
            if(errorCondition != null)
            {
                session.getRemoteCondition().copyFrom(errorCondition);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.qpid.proton.amqp.transport.ErrorCondition

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.