1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TreeHouse\Queue\Amqp; |
4
|
|
|
|
5
|
|
|
interface EnvelopeInterface |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* Get the application id of the message. |
9
|
|
|
* |
10
|
|
|
* @return string The application id of the message. |
11
|
|
|
*/ |
12
|
|
|
public function getAppId(); |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Get the body of the message. |
16
|
|
|
* |
17
|
|
|
* @return string The contents of the message body. |
18
|
|
|
*/ |
19
|
|
|
public function getBody(); |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* Get the content encoding of the message. |
23
|
|
|
* |
24
|
|
|
* @return string The content encoding of the message. |
25
|
|
|
*/ |
26
|
|
|
public function getContentEncoding(); |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Get the message content type. |
30
|
|
|
* |
31
|
|
|
* @return string The content type of the message. |
32
|
|
|
*/ |
33
|
|
|
public function getContentType(); |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Get the message correlation id. |
37
|
|
|
* |
38
|
|
|
* @return string The correlation id of the message. |
39
|
|
|
*/ |
40
|
|
|
public function getCorrelationId(); |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Get the delivery mode of the message. |
44
|
|
|
* |
45
|
|
|
* @return int The delivery mode of the message. |
46
|
|
|
*/ |
47
|
|
|
public function getDeliveryMode(); |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Get the delivery tag of the message. |
51
|
|
|
* |
52
|
|
|
* @return string The delivery tag of the message. |
53
|
|
|
*/ |
54
|
|
|
public function getDeliveryTag(); |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Get the exchange name on which the message was published. |
58
|
|
|
* |
59
|
|
|
* @return string The exchange name on which the message was published. |
60
|
|
|
*/ |
61
|
|
|
public function getExchangeName(); |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Get the expiration of the message. |
65
|
|
|
* |
66
|
|
|
* @return string The message expiration. |
67
|
|
|
*/ |
68
|
|
|
public function getExpiration(); |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Get a specific message header. |
72
|
|
|
* |
73
|
|
|
* @param string $headerKey Name of the header to get the value from. |
74
|
|
|
* |
75
|
|
|
* @return string|bool The contents of the specified header or false if not set. |
76
|
|
|
*/ |
77
|
|
|
public function getHeader($headerKey); |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Get the headers of the message. |
81
|
|
|
* |
82
|
|
|
* @return array An array of key value pairs associated with the message. |
83
|
|
|
*/ |
84
|
|
|
public function getHeaders(); |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Get the message id of the message. |
88
|
|
|
* |
89
|
|
|
* @return string The message id |
90
|
|
|
*/ |
91
|
|
|
public function getMessageId(); |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Get the priority of the message. |
95
|
|
|
* |
96
|
|
|
* @return string The message priority. |
97
|
|
|
*/ |
98
|
|
|
public function getPriority(); |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* Get the reply-to address of the message. |
102
|
|
|
* |
103
|
|
|
* @return string The contents of the reply to field. |
104
|
|
|
*/ |
105
|
|
|
public function getReplyTo(); |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Get the routing key of the message. |
109
|
|
|
* |
110
|
|
|
* @return string The message routing key. |
111
|
|
|
*/ |
112
|
|
|
public function getRoutingKey(); |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* Get the timestamp of the message. |
116
|
|
|
* |
117
|
|
|
* @return string The message timestamp. |
118
|
|
|
*/ |
119
|
|
|
public function getTimestamp(); |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* Get the message type. |
123
|
|
|
* |
124
|
|
|
* @return string The message type. |
125
|
|
|
*/ |
126
|
|
|
public function getType(); |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Get the message user id. |
130
|
|
|
* |
131
|
|
|
* @return string The message user id. |
132
|
|
|
*/ |
133
|
|
|
public function getUserId(); |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* Whether this is a redelivery of the message. |
137
|
|
|
* |
138
|
|
|
* If this message has been delivered and `nack()` was called, the message will be put back on the queue to be |
139
|
|
|
* redelivered, at which point the message will always return true when this method is called. |
140
|
|
|
* |
141
|
|
|
* @return bool true if this is a redelivery, false otherwise. |
142
|
|
|
*/ |
143
|
|
|
public function isRedelivery(); |
144
|
|
|
} |
145
|
|
|
|