winss
|
A controller for supervised processes. More...
#include <controller.hpp>
Static Public Member Functions | |
static winss::SuperviseNotification | GetNotification (char c) |
Gets the notification for the given control char. More... | |
Static Public Attributes | |
static const char | kSvcUp = 'u' |
Up control char. More... | |
static const char | kSvcOnce = 'o' |
Up once code. More... | |
static const char | kSvcOnceAtMost = 'O' |
Up once at most control char. More... | |
static const char | kSvcDown = 'd' |
Down control char. More... | |
static const char | kSvcKill = 'k' |
Kill control char. More... | |
static const char | kSvcTerm = 't' |
Terminate control char. More... | |
static const char | kSvcExit = 'x' |
Exit control char. More... | |
static const char | kSuperviseStart = 's' |
Start event. More... | |
static const char | kSuperviseRun = 'u' |
Run event. More... | |
static const char | kSuperviseEnd = 'd' |
End event. More... | |
static const char | kSuperviseBroken = 'O' |
Broken event. More... | |
static const char | kSuperviseFinished = 'D' |
Finished event. More... | |
static const char | kSuperviseExit = 'x' |
Exit event. More... | |
A controller for supervised processes.
Brokers the communication to and from the supervised process for control and event notification.
winss::SuperviseController::SuperviseController | ( | winss::NotOwningPtr< winss::Supervise > | supervise, |
winss::NotOwningPtr< winss::OutboundPipeServer > | outbound, | ||
winss::NotOwningPtr< winss::InboundPipeServer > | inbound | ||
) |
Supervise controller constructor.
supervise | The supervisor. |
outbound | The outbound named pipe server. |
inbound | The inbound named pipe server. |
References winss::InboundPipeServerTmpl< TPipeInstance >::AddListener(), winss::SuperviseTmpl< TMutex, TProcess >::AddListener(), and winss::NotOwned().
|
delete |
No copy.
|
delete |
No move.
|
static |
Gets the notification for the given control char.
[in] | c | The control char. |
References winss::END, winss::EXIT, winss::FINISHED, kSuperviseEnd, kSuperviseExit, kSuperviseFinished, kSuperviseRun, kSuperviseStart, winss::RUN, winss::START, and winss::UNKNOWN.
Referenced by winss::SuperviseStateListener::HandleReceived().
|
virtual |
Supervisor listener handler.
[in] | notification | The event which occurred. |
[in] | state | The current state of the supervisor. |
Implements winss::SuperviseListener.
References winss::BROKEN, winss::END, winss::EXIT, winss::FINISHED, kSuperviseBroken, kSuperviseEnd, kSuperviseExit, kSuperviseFinished, kSuperviseRun, kSuperviseStart, winss::RUN, and winss::START.
|
delete |
No copy.
|
delete |
No move.
|
virtual |
Pipe server received handler.
[in] | data | The received data. |
Implements winss::PipeServerReceiveListener.
References kSvcDown, kSvcExit, kSvcKill, kSvcOnce, kSvcOnceAtMost, kSvcTerm, and kSvcUp.
|
static |
Broken event.
Referenced by Notify().
|
static |
End event.
Referenced by GetNotification(), and Notify().
|
static |
Exit event.
Referenced by GetNotification(), and Notify().
|
static |
Finished event.
Referenced by GetNotification(), and Notify().
|
static |
Run event.
Referenced by GetNotification(), and Notify().
|
static |
Start event.
Referenced by GetNotification(), and Notify().
|
static |
Down control char.
Referenced by Received().
|
static |
Exit control char.
Referenced by Received().
|
static |
Kill control char.
Referenced by Received().
|
static |
Up once code.
Referenced by Received().
|
static |
Up once at most control char.
Referenced by Received().
|
static |
Terminate control char.
Referenced by Received().
|
static |
Up control char.
Referenced by Received().