Package org.apache.qpidity.api

Examples of org.apache.qpidity.api.Message


    }

    @Override
    public InputStream getInputStream(Object message)
    {
        Message msg = (Message)message;
        try{
            final ByteBuffer buf = msg.readData();
            return new InputStream() {
                public synchronized int read() throws IOException {
                    if (!buf.hasRemaining()) {
                        return -1;
                    }
View Full Code Here


    /*
     *  when this mehtod is called, it is assumed that we have exclusive access
     *  to the session.
     */
    public Message receive(long timeout){
        Message m;
        session.messageFlow(destination,Session.MESSAGE_FLOW_UNIT_MESSAGE, 1);
        session.messageFlow(destination,Session.MESSAGE_FLOW_UNIT_BYTE, 0xFFFFFFFF);
        try{
            m = queue.poll(timeout, TimeUnit.MILLISECONDS);
        }catch(Exception e){
View Full Code Here

                                 destination,
                                 Session.TRANSFER_CONFIRM_MODE_REQUIRED,
                                 Session.TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE,
                                 new MessagePartListenerAdapter(listener), null, Option.NO_OPTION);

        Message reply = listener.receive(timeout);

        if (reply != null) {
            processSyncResponse(msgCtx, reply);

        } else {
View Full Code Here

TOP

Related Classes of org.apache.qpidity.api.Message

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.