Class AMQP.Exchange.Declare
- java.lang.Object
-
- org.ow2.joram.mom.amqp.marshalling.AbstractMarshallingMethod
-
- org.ow2.joram.mom.amqp.marshalling.AMQP.Exchange.Declare
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AMQP.Exchange
public static class AMQP.Exchange.Declare extends AbstractMarshallingMethod
This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description MapargumentsA set of arguments for the declaration.booleandurableIf set when creating a new exchange, the exchange will be marked as durable.Stringexchangestatic intINDEXbooleannoWaitbooleanpassiveIf set, the server will reply with Declare-Ok if the exchange already exists with the same name, and raise an error if not.intreserved1booleanreserved2booleanreserved3private static longserialVersionUIDStringtypeEach exchange belongs to one of a set of exchange types implemented by the server.-
Fields inherited from class org.ow2.joram.mom.amqp.marshalling.AbstractMarshallingMethod
channelNumber
-
-
Constructor Summary
Constructors Constructor Description Declare()Declare(int reserved1, String exchange, String type, boolean passive, boolean durable, boolean reserved2, boolean reserved3, boolean noWait, Map arguments)This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
-
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
-
type
public String type
Each exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.
-
passive
public boolean passive
If set, the server will reply with Declare-Ok if the exchange already exists with the same name, and raise an error if not. The client can use this to check whether an exchange exists without modifying the server state. When set, all other method fields except name and no-wait are ignored. A declare with both passive and no-wait has no effect. Arguments are compared for semantic equivalence.
-
durable
public boolean durable
If set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
-
reserved2
public boolean reserved2
-
reserved3
public boolean reserved3
-
noWait
public boolean noWait
-
arguments
public Map arguments
A set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation.
-
INDEX
public static final int INDEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Declare
public Declare(int reserved1, String exchange, String type, boolean passive, boolean durable, boolean reserved2, boolean reserved3, boolean noWait, Map arguments)This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
-
Declare
public Declare()
-
-
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, SyntaxErrorException
- Specified by:
readFromin classAbstractMarshallingMethod- Throws:
IOExceptionSyntaxErrorException
-
writeTo
public void writeTo(AMQPOutputStream out) throws IOException
- Specified by:
writeToin classAbstractMarshallingMethod- Throws:
IOException
-
-