|
Joram 5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.amqp.JoramMOMHandler
public class JoramMOMHandler
Constructor Summary | |
---|---|
JoramMOMHandler()
|
Method Summary | |
---|---|
AMQP.Access.RequestOk |
accessRequest(java.lang.String realm,
boolean exclusive,
boolean passive,
boolean active,
boolean write,
boolean read,
int channelNumber)
Request an access ticket for the named realm and the given role and exclusivity flags |
void |
basicAck(long deliveryTag,
boolean multiple,
int channelNumber)
Acknowledge one or several received messages. |
void |
basicCancel(java.lang.String consumerTag,
int channelNumber)
Cancel a consumer. |
void |
basicConsume(java.lang.String queue,
boolean noAck,
java.lang.String consumerTag,
boolean noLocal,
boolean exclusive,
int ticket,
boolean noWait,
int channelNumber,
fr.dyade.aaa.util.Queue queueOut)
Start a consumer. |
void |
basicGet(java.lang.String queue,
boolean noAck,
int ticket,
int channelNumber)
Retrieve a message from a queue. |
void |
basicPublish(PublishRequest publishRequest,
int channelNumber)
Publish a message |
void |
channelClose(int channelNumber)
|
void |
close()
Closes the MOMHandler |
void |
connectionClose()
|
void |
exchangeDeclare(java.lang.String exchangeName,
java.lang.String type,
boolean passive,
boolean durable,
boolean autoDelete,
java.util.Map arguments,
int ticket,
int channelNumber)
Declare an exchange. |
void |
exchangeDelete(java.lang.String exchangeName,
boolean ifUnused,
boolean nowait,
int ticket,
int channelNumber)
Delete an exchange |
java.util.Map |
getMOMProperties()
Gets MOM properties returned to the client on connection start. |
void |
queueBind(java.lang.String queue,
java.lang.String exchange,
boolean nowait,
java.lang.String routingKey,
java.util.Map arguments,
int ticket,
int channelNumber)
Bind a queue to an exchange. |
AMQP.Queue.DeclareOk |
queueDeclare(java.lang.String queueName,
boolean passive,
boolean durable,
boolean exclusive,
boolean autoDelete,
java.util.Map arguments,
int ticket,
int channelNumber)
Declare a queue |
AMQP.Queue.DeleteOk |
queueDelete(java.lang.String queue,
boolean ifUnused,
boolean ifEmpty,
boolean nowait,
int ticket,
int channelNumber)
Delete a queue, without regard for whether it is in use or has messages on it |
void |
queuePurge(java.lang.String queue,
boolean nowait,
int ticket,
int channelNumber)
|
void |
queueUnbind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map arguments,
int ticket,
int channelNumber)
|
void |
setConsumer(Consumer consumer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JoramMOMHandler()
Method Detail |
---|
public void setConsumer(Consumer consumer)
setConsumer
in interface MOMHandler
public AMQP.Access.RequestOk accessRequest(java.lang.String realm, boolean exclusive, boolean passive, boolean active, boolean write, boolean read, int channelNumber) throws java.lang.Exception
MOMHandler
accessRequest
in interface MOMHandler
realm
- the name of the realmexclusive
- true if we are requesting exclusive accesspassive
- true if we are requesting passive accessactive
- true if we are requesting active accesswrite
- true if we are requesting write accessread
- true if we are requesting read accesschannelNumber
- the channel the request came from
java.io.IOException
- if an error is encountered e.g. we don't have permission
java.lang.Exception
public void basicAck(long deliveryTag, boolean multiple, int channelNumber) throws java.lang.Exception
MOMHandler
basicAck
in interface MOMHandler
deliveryTag
- the delivery tagmultiple
- true if we are acknowledging multiple messages with the same delivery tagchannelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic void basicCancel(java.lang.String consumerTag, int channelNumber) throws java.lang.Exception
MOMHandler
basicCancel
in interface MOMHandler
consumerTag
- a client -or server- generated consumer tag to establish contextchannelNumber
- the channel the request came from
java.lang.Exception
public void basicConsume(java.lang.String queue, boolean noAck, java.lang.String consumerTag, boolean noLocal, boolean exclusive, int ticket, boolean noWait, int channelNumber, fr.dyade.aaa.util.Queue queueOut) throws java.lang.Exception
MOMHandler
basicConsume
in interface MOMHandler
queue
- the name of the queuenoAck
- true if no handshake is requiredconsumerTag
- a client-generated consumer tag to establish contextnoLocal
- flag set to true unless server local buffering is requiredexclusive
- true if this is an exclusive consumerticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
public void basicGet(java.lang.String queue, boolean noAck, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
basicGet
in interface MOMHandler
queue
- the name of the queuenoAck
- true if no handshake is requiredticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic void basicPublish(PublishRequest publishRequest, int channelNumber) throws java.lang.Exception
MOMHandler
basicPublish
in interface MOMHandler
channelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic void close()
MOMHandler
MOMHandler
close
in interface MOMHandler
public void exchangeDeclare(java.lang.String exchangeName, java.lang.String type, boolean passive, boolean durable, boolean autoDelete, java.util.Map arguments, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
exchangeDeclare
in interface MOMHandler
exchangeName
- the name of the exchangetype
- the exchange typepassive
- true if we are passively declaring a exchange (asserting the exchange already exists)durable
- true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete
- true if the server should delete the exchange when it is no longer in usearguments
- other properties (construction arguments) for the exchangeticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
public void exchangeDelete(java.lang.String exchangeName, boolean ifUnused, boolean nowait, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
exchangeDelete
in interface MOMHandler
ifUnused
- true to indicate that the exchange is only to be deleted if it is unusedticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
public java.util.Map getMOMProperties()
MOMHandler
getMOMProperties
in interface MOMHandler
public void queueBind(java.lang.String queue, java.lang.String exchange, boolean nowait, java.lang.String routingKey, java.util.Map arguments, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
queueBind
in interface MOMHandler
queue
- the name of the queueexchange
- the name of the exchangeroutingKey
- the routine key to use for the bindingarguments
- other properties (binding parameters)ticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic void queueUnbind(java.lang.String queue, java.lang.String exchange, java.lang.String routingKey, java.util.Map arguments, int ticket, int channelNumber) throws java.lang.Exception
queueUnbind
in interface MOMHandler
java.lang.Exception
public AMQP.Queue.DeclareOk queueDeclare(java.lang.String queueName, boolean passive, boolean durable, boolean exclusive, boolean autoDelete, java.util.Map arguments, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
queueDeclare
in interface MOMHandler
queueName
- the name of the queuepassive
- true if we are passively declaring a queue (asserting the queue already exists)durable
- true if we are declaring a durable queue (the queue will survive a server restart)exclusive
- true if we are declaring an exclusive queueautoDelete
- true if we are declaring an autodelete queue (server will delete it when no longer in use)arguments
- other properties (construction arguments) for the queueticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic AMQP.Queue.DeleteOk queueDelete(java.lang.String queue, boolean ifUnused, boolean ifEmpty, boolean nowait, int ticket, int channelNumber) throws java.lang.Exception
MOMHandler
queueDelete
in interface MOMHandler
queue
- the name of the queueifUnused
- true if the queue should be deleted only if not in useifEmpty
- true if the queue should be deleted only if emptyticket
- an access ticket for the appropriate realmchannelNumber
- the channel the request came from
java.lang.Exception
- if an error is encounteredpublic void queuePurge(java.lang.String queue, boolean nowait, int ticket, int channelNumber) throws java.lang.Exception
queuePurge
in interface MOMHandler
java.lang.Exception
public void channelClose(int channelNumber) throws java.lang.Exception
channelClose
in interface MOMHandler
java.lang.Exception
public void connectionClose() throws java.lang.Exception
connectionClose
in interface MOMHandler
java.lang.Exception
|
Joram 5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |