diff options
author | Andrew Stitcher <astitcher@apache.org> | 2008-07-24 04:42:51 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2008-07-24 04:42:51 +0000 |
commit | 3e0f90a2ac7d708ef693a255a9ed4feafffb2131 (patch) | |
tree | 5588d53e47269a81a3b1181be02da9929faf1321 /cpp/src/qpid/client/ConnectionHandler.cpp | |
parent | 2fc957e3d28fa3b084ef334b702bb5116f60c462 (diff) | |
download | qpid-python-3e0f90a2ac7d708ef693a255a9ed4feafffb2131.tar.gz |
Refactor to change client connector state machine to be held in ConnectionHandler
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679268 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp')
-rw-r--r-- | cpp/src/qpid/client/ConnectionHandler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index 05f6bb9733..22ebec76bf 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -186,3 +186,14 @@ void ConnectionHandler::closeOk() } setState(CLOSED); } + +bool ConnectionHandler::isOpen() const +{ + return getState() == OPEN; +} + +bool ConnectionHandler::isClosed() const +{ + int s = getState(); + return s == CLOSING || s == CLOSED || s == FAILED; +} |