01 /*
02 *
03 * Licensed to the Apache Software Foundation (ASF) under one
04 * or more contributor license agreements. See the NOTICE file
05 * distributed with this work for additional information
06 * regarding copyright ownership. The ASF licenses this file
07 * to you under the Apache License, Version 2.0 (the
08 * "License"); you may not use this file except in compliance
09 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.framing;
22
23 import org.apache.mina.common.ByteBuffer;
24
25
26 public interface AMQMethodFactory
27 {
28
29 // Connection Methods
30
31 ConnectionCloseBody createConnectionClose();
32
33 // Access Methods
34
35 AccessRequestBody createAccessRequest(boolean active, boolean exclusive, boolean passive, boolean read, AMQShortString realm, boolean write);
36
37
38 // Tx Methods
39
40 TxSelectBody createTxSelect();
41
42 TxCommitBody createTxCommit();
43
44 TxRollbackBody createTxRollback();
45
46 // Channel Methods
47
48 ChannelOpenBody createChannelOpen();
49
50 ChannelCloseBody createChannelClose(int replyCode, AMQShortString replyText);
51
52 ChannelFlowBody createChannelFlow(boolean active);
53
54
55 // Exchange Methods
56
57
58 ExchangeBoundBody createExchangeBound(AMQShortString exchangeName,
59 AMQShortString queueName,
60 AMQShortString routingKey);
61
62 ExchangeDeclareBody createExchangeDeclare(AMQShortString name, AMQShortString type, int ticket);
63
64
65 // Queue Methods
66
67 QueueDeclareBody createQueueDeclare(AMQShortString name, FieldTable arguments, boolean autoDelete, boolean durable, boolean exclusive, boolean passive, int ticket);
68
69 QueueBindBody createQueueBind(AMQShortString queueName, AMQShortString exchangeName, AMQShortString routingKey, FieldTable arguments, int ticket);
70
71 QueueDeleteBody createQueueDelete(AMQShortString queueName, boolean ifEmpty, boolean ifUnused, int ticket);
72
73
74 // Message Methods
75
76 // In different versions of the protocol we change the class used for message transfer
77 // abstract this out so the appropriate methods are created
78 AMQMethodBody createRecover(boolean requeue);
79
80 AMQMethodBody createConsumer(AMQShortString tag, AMQShortString queueName, FieldTable arguments, boolean noAck, boolean exclusive, boolean noLocal, int ticket);
81
82 AMQMethodBody createConsumerCancel(AMQShortString consumerTag);
83
84 AMQMethodBody createAcknowledge(long deliveryTag, boolean multiple);
85
86 AMQMethodBody createRejectBody(long deliveryTag, boolean requeue);
87
88 AMQMethodBody createMessageQos(int prefetchCount, int prefetchSize);
89
90 }
|