Examples of Detach


Examples of org.apache.qpid.amqp_1_0.type.transport.Detach

    public Detach construct(Object underlying)
    {
        if(underlying instanceof List)
        {
            List list = (List) underlying;
            Detach obj = new Detach();
            int position = 0;
            final int size = list.size();

            if(position < size)
            {
                Object val = list.get(position);
                position++;

                if(val != null)
                {

                    try
                    {
                        obj.setHandle( (UnsignedInteger) val );
                    }
                    catch(ClassCastException e)
                    {

                        // TODO Error
                    }

                }


            }
            else
            {
                return obj;
            }

            if(position < size)
            {
                Object val = list.get(position);
                position++;

                if(val != null)
                {

                    try
                    {
                        obj.setClosed( (Boolean) val );
                    }
                    catch(ClassCastException e)
                    {

                        // TODO Error
                    }

                }


            }
            else
            {
                return obj;
            }

            if(position < size)
            {
                Object val = list.get(position);
                position++;

                if(val != null)
                {

                    try
                    {
                        obj.setError( (org.apache.qpid.amqp_1_0.type.transport.Error) val );
                    }
                    catch(ClassCastException e)
                    {

                        // TODO Error
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Detach

            iter.remove();
        }

        for(LinkEndpoint linkEndpoint : _endpoint.getLocalLinkEndpoints())
        {
            linkEndpoint.remoteDetached(new Detach());
        }

        _connection.sessionEnded(this);

    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Detach

        Error error = new Error();
        error.setCondition(LinkError.DETACH_FORCED);
        error.setDescription("Force detach the link because the session is remotely ended.");
        for(UnsignedInteger handle : handles)
        {
            Detach detach = new Detach();
            detach.setClosed(false);
            detach.setHandle(handle);
            detach.setError(error);
            detach(handle, detach);
        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Detach

        Error error = new Error();
        error.setCondition(LinkError.DETACH_FORCED);
        error.setDescription("Force detach the link because the session is remotely ended.");
        for(UnsignedInteger handle : handles)
        {
            Detach detach = new Detach();
            detach.setClosed(false);
            detach.setHandle(handle);
            detach.setError(error);
            detach(handle, detach);
        }
    }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Detach

            iter.remove();
        }

        for(LinkEndpoint linkEndpoint : _endpoint.getLocalLinkEndpoints())
        {
            linkEndpoint.remoteDetached(new Detach());
        }

        _connection.sessionEnded(this);

    }
View Full Code Here

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

                            UnsignedInteger localHandle = transportLink.getLocalHandle();
                            transportLink.clearLocalHandle();
                            transportSession.freeLocalHandle(localHandle);


                            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);
                            }


                            writeFrame(transportSession.getLocalChannel(), detach, null, null);
                            endpoint.clearModified();
View Full Code Here

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

                            UnsignedInteger localHandle = transportLink.getLocalHandle();
                            transportLink.clearLocalHandle();
                            transportSession.freeLocalHandle(localHandle);


                            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);
                            }


                            writeFrame(transportSession.getLocalChannel(), detach, null, null);
                            endpoint.clearModified();
View Full Code Here

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

                            UnsignedInteger localHandle = transportLink.getLocalHandle();
                            transportLink.clearLocalHandle();
                            transportSession.freeLocalHandle(localHandle);


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

                            EndpointError localError = link.getLocalError();
                            if( localError !=null ) {
                                ErrorCondition error = new ErrorCondition();
                                error.setCondition(Symbol.getSymbol(localError.getName()));
                                error.setDescription(localError.getDescription());
                                detach.setError(error);
                            }


                            int frameBytes = writeFrame(buffer, transportSession.getLocalChannel(), detach, null, null);
                            written += frameBytes;
View Full Code Here

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

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

        Detach o = new Detach();

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

        switch(3 - l.size())
        {

            case 0:
                o.setError( (ErrorCondition) l.get( 2 ) );
            case 1:
                Boolean closed = (Boolean) l.get(1);
                o.setClosed(closed == null ? false : closed);
            case 2:
                o.setHandle( (UnsignedInteger) l.get( 0 ) );
        }


        return o;
    }
View Full Code Here

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

                            UnsignedInteger localHandle = transportLink.getLocalHandle();
                            transportLink.clearLocalHandle();
                            transportSession.freeLocalHandle(localHandle);


                            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);
                            }


                            writeFrame(transportSession.getLocalChannel(), detach, null, null);
                            endpoint.clearModified();
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.