Package org.apache.qpid.typedmessage

Examples of org.apache.qpid.typedmessage.TypedBytesContentWriter


    }

    public ByteBuffer getData()
            throws JMSException
    {
        TypedBytesContentWriter writer = new TypedBytesContentWriter();

        final int size = _map.size();
        writer.writeIntImpl(size);
        for (Map.Entry<String, Object> entry : _map.entrySet())
        {
            writer.writeNullTerminatedStringImpl(entry.getKey());

            try
            {
                writer.writeObject(entry.getValue());
            }
            catch (TypedBytesFormatException e)
            {
                throw new MessageFormatException(e.getMessage());
            }
        }

        return writer.getData();
    }
View Full Code Here


    private TypedBytesContentWriter _typedBytesContentWriter;

    public JMSStreamMessage(AMQMessageDelegateFactory delegateFactory)
    {
        super(delegateFactory,false);
        _typedBytesContentWriter = new TypedBytesContentWriter();

    }
View Full Code Here

    }

    JMSStreamMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data) throws AMQException
    {
        super(delegateFactory, data!=null);
        _typedBytesContentWriter = new TypedBytesContentWriter();

    }
View Full Code Here

    @Override
    public void clearBody() throws JMSException
    {
        super.clearBody();
        _typedBytesContentReader = null;
        _typedBytesContentWriter = new TypedBytesContentWriter();

    }
View Full Code Here


    public JMSBytesMessage(AMQMessageDelegateFactory delegateFactory)
    {
        super(delegateFactory,false);
        _typedBytesContentWriter = new TypedBytesContentWriter();
    }
View Full Code Here

    @Override
    public void clearBody() throws JMSException
    {
        super.clearBody();
        _typedBytesContentReader = null;
        _typedBytesContentWriter = new TypedBytesContentWriter();

    }
View Full Code Here

    }

    public ByteBuffer getData()
            throws JMSException
    {
        TypedBytesContentWriter writer = new TypedBytesContentWriter();

        final int size = _map.size();
        writer.writeIntImpl(size);
        for (Map.Entry<String, Object> entry : _map.entrySet())
        {
            writer.writeNullTerminatedStringImpl(entry.getKey());

            try
            {
                writer.writeObject(entry.getValue());
            }
            catch (TypedBytesFormatException e)
            {
                throw new MessageFormatException(e.getMessage());
            }
        }

        return writer.getData();
    }
View Full Code Here

            try
            {
                ByteBuffer buf;
                if(onlyPrimitiveTypes((List)object))
                {
                    TypedBytesContentWriter writer = new TypedBytesContentWriter();
                    for(Object value : (List)object)
                    {
                        writer.writeObject(value);
                    }
                    buf = writer.getData();

                }
                else
                {
                    BBEncoder encoder = new BBEncoder(1024);
View Full Code Here

            try
            {
                ByteBuffer buf;
                if(onlyPrimitiveTypes((List)object))
                {
                    TypedBytesContentWriter writer = new TypedBytesContentWriter();
                    for(Object value : (List)object)
                    {
                        writer.writeObject(value);
                    }
                    buf = writer.getData();

                }
                else
                {
                    BBEncoder encoder = new BBEncoder(1024);
View Full Code Here

TOP

Related Classes of org.apache.qpid.typedmessage.TypedBytesContentWriter

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.