-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from jeromegamez/introduce-enums
Replace `*Enum` classes with a native Enums
- Loading branch information
Showing
6 changed files
with
74 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,24 +9,21 @@ | |
* | ||
* @author Jakub Kulhan <[email protected]> | ||
*/ | ||
final class ChannelModeEnum | ||
enum ChannelMode | ||
{ | ||
|
||
/** | ||
* Regular AMQP guarantees of published messages delivery. | ||
*/ | ||
const REGULAR = 1; | ||
case Regular; | ||
|
||
/** | ||
* Messages are published after 'tx.commit'. | ||
*/ | ||
const TRANSACTIONAL = 2; | ||
case Transactional; | ||
|
||
/** | ||
* Broker sends asynchronously 'basic.ack's for delivered messages. | ||
*/ | ||
const CONFIRM = 3; | ||
|
||
|
||
|
||
case Confirm; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,37 +9,35 @@ | |
* | ||
* @author Jakub Kulhan <[email protected]> | ||
*/ | ||
final class ChannelStateEnum | ||
enum ChannelState | ||
{ | ||
|
||
/** | ||
* Channel is ready to receive messages. | ||
*/ | ||
const READY = 1; | ||
case Ready; | ||
|
||
/** | ||
* Channel got method that is followed by header/content frames and now waits for header frame. | ||
*/ | ||
const AWAITING_HEADER = 2; | ||
case AwaitingHeader; | ||
|
||
/** | ||
* Channel got method and header frame and now waits for body frame. | ||
*/ | ||
const AWAITING_BODY = 3; | ||
case AwaitingBody; | ||
|
||
/** | ||
* An error occurred on channel. | ||
*/ | ||
const ERROR = 4; | ||
case Error; | ||
|
||
/** | ||
* Channel is being closed. | ||
*/ | ||
const CLOSING = 5; | ||
case Closing; | ||
|
||
/** | ||
* Channel has received channel.close-ok frame. | ||
*/ | ||
const CLOSED = 6; | ||
|
||
case Closed; | ||
} |
Oops, something went wrong.