Commit a94565ab authored by Guillaume Surrel's avatar Guillaume Surrel
Browse files

Reworked message deliveries.

parent 1403f1e2
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2009 - 2011 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.ow2.joram.mom.amqp;
import org.ow2.joram.mom.amqp.structures.Deliver;
/**
* Interface used for message deliveries.
*/
public interface DeliveryListener {
public abstract void deliver(Deliver deliver, Queue queue);
public boolean deliver(String consumerTag, int channelNumber, Queue queue, short serverId, long proxyId);
}
}
\ No newline at end of file
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2009 - 2011 ScalAgent Distributed Technologies
* Copyright (C) 2011 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -22,44 +22,19 @@
*/
package org.ow2.joram.mom.amqp.structures;
import java.io.Serializable;
/**
* A {@link ConsumeMessage} is sent to the proxy on <code>Basic.Consume</code>
* method, in order to request a message on the specified queue. This message
* will be requeued as long as there are more messages on the queue.
* A {@link GetDeliveries} is sent to the proxy each time the proxy is
* susceptible to have new deliveries to transmit to the client.
*/
public class ConsumeMessage implements Serializable {
private static final long serialVersionUID = 1L;
public String queueName;
public class GetDeliveries {
public String consumerTag;
public int channelNumber;
public boolean noAck;
public short consumerServerId;
public int channelId;
public ConsumeMessage(String queueName, String consumerTag, int channelNumber, boolean noAck) {
super();
this.queueName = queueName;
public GetDeliveries(String consumerTag, int channelId) {
this.consumerTag = consumerTag;
this.channelNumber = channelNumber;
this.noAck = noAck;
this.channelId = channelId;
}
public ConsumeMessage(String queueName, String consumerTag, int channelNumber, boolean noAck,
short consumerServerId) {
super();
this.queueName = queueName;
this.consumerTag = consumerTag;
this.channelNumber = channelNumber;
this.noAck = noAck;
this.consumerServerId = consumerServerId;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment