Class AMQP.Basic.Publish
- java.lang.Object
-
- org.ow2.joram.mom.amqp.marshalling.AbstractMarshallingMethod
-
- org.ow2.joram.mom.amqp.marshalling.AMQP.Basic.Publish
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AMQP.Basic
public static class AMQP.Basic.Publish extends AbstractMarshallingMethod
This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description StringexchangeSpecifies the name of the exchange to publish to.booleanimmediateThis flag tells the server how to react if the message cannot be routed to a queue consumer immediately.static intINDEXbooleanmandatoryThis flag tells the server how to react if the message cannot be routed to a queue.intreserved1StringroutingKeySpecifies the routing key for the message.private static longserialVersionUID-
Fields inherited from class org.ow2.joram.mom.amqp.marshalling.AbstractMarshallingMethod
channelNumber
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetClassId()StringgetClassName()intgetMethodId()StringgetMethodName()voidreadFrom(AMQPInputStream in)StringtoString()voidwriteTo(AMQPOutputStream out)-
Methods inherited from class org.ow2.joram.mom.amqp.marshalling.AbstractMarshallingMethod
read, toFrame
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
reserved1
public int reserved1
-
exchange
public String exchange
Specifies the name of the exchange to publish to. The exchange name can be empty, meaning the default exchange. If the exchange name is specified, and that exchange does not exist, the server will raise a channel exception.
-
routingKey
public String routingKey
Specifies the routing key for the message. The routing key is used for routing messages depending on the exchange configuration.
-
mandatory
public boolean mandatory
This flag tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server will return an unroutable message with a Return method. If this flag is zero, the server silently drops the message.
-
immediate
public boolean immediate
This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. If this flag is set, the server will return an undeliverable message with a Return method. If this flag is zero, the server will queue the message, but with no guarantee that it will ever be consumed.
-
INDEX
public static final int INDEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Publish
public Publish(int reserved1, String exchange, String routingKey, boolean mandatory, boolean immediate)This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.
-
Publish
public Publish()
-
-
Method Detail
-
getMethodId
public int getMethodId()
- Specified by:
getMethodIdin classAbstractMarshallingMethod
-
getMethodName
public String getMethodName()
- Specified by:
getMethodNamein classAbstractMarshallingMethod
-
getClassId
public int getClassId()
- Specified by:
getClassIdin classAbstractMarshallingMethod
-
getClassName
public String getClassName()
- Specified by:
getClassNamein classAbstractMarshallingMethod
-
readFrom
public void readFrom(AMQPInputStream in) throws IOException
- Specified by:
readFromin classAbstractMarshallingMethod- Throws:
IOException
-
writeTo
public void writeTo(AMQPOutputStream out) throws IOException
- Specified by:
writeToin classAbstractMarshallingMethod- Throws:
IOException
-
-