1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
.TH ACE_Service_Manager 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Service_Manager \- Provide a standard \fBACE\fR service for managing all the services configured in an .
.SH SYNOPSIS
.br
.PP
\fC#include <Service_Manager.h>\fR
.PP
Inherits \fBACE_Service_Object\fR.
.PP
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Service_Manager\fR (void)"
.br
.RI "\fIConstructor.\fR"
.ti -1c
.RI "\fB~ACE_Service_Manager\fR (void)"
.br
.RI "\fIDestructor.\fR"
.in -1c
.SS Protected Methods
.in +1c
.ti -1c
.RI "virtual int \fBreconfigure_services\fR (void)"
.br
.RI "\fITrigger a reconfiguration of the Service Configurator by.\fR"
.ti -1c
.RI "virtual int \fBlist_services\fR (void)"
.br
.RI "\fIDetermine all the services offered by this daemon and return the information back to the client.\fR"
.ti -1c
.RI "virtual int \fBinit\fR (int argc, \fBACE_TCHAR\fR *argv[])"
.br
.RI "\fIInitializes object when dynamic linking occurs.\fR"
.ti -1c
.RI "virtual int \fBinfo\fR (\fBACE_TCHAR\fR **info_string, size_t length) const"
.br
.RI "\fIReturns information on a service object.\fR"
.ti -1c
.RI "virtual int \fBfini\fR (void)"
.br
.RI "\fITerminates object when dynamic unlinking occurs.\fR"
.ti -1c
.RI "virtual int \fBsuspend\fR (void)"
.br
.RI "\fITemporarily disable a service without removing it completely.\fR"
.ti -1c
.RI "virtual int \fBresume\fR (void)"
.br
.RI "\fIRe-enable a previously suspended service.\fR"
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Protected Attributes
.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Private Methods
.in +1c
.ti -1c
.RI "int \fBopen\fR (const \fBACE_INET_Addr\fR &sia)"
.br
.ti -1c
.RI "virtual ACE_HANDLE \fBget_handle\fR (void) const"
.br
.RI "\fIGet the I/O handle. Set the I/O handle.\fR"
.ti -1c
.RI "virtual int \fBhandle_input\fR (ACE_HANDLE fd)"
.br
.RI "\fICalled when input events occur (e.g., connection or data).\fR"
.ti -1c
.RI "virtual int \fBhandle_close\fR (ACE_HANDLE fd, \fBACE_Reactor_Mask\fR)"
.br
.RI "\fICalled when a <handle_*()> method returns -1 or when the <remove_handler> method is called on an . The <close_mask> indicates which event has triggered the <handle_close> method callback on a particular <handle>.\fR"
.ti -1c
.RI "virtual int \fBhandle_signal\fR (int signum, \fBsiginfo_t\fR *, \fBucontext_t\fR *)"
.br
.RI "\fICalled when object is signaled by OS (either via UNIX signals or when a Win32 object becomes signaled).\fR"
.ti -1c
.RI "virtual void \fBprocess_request\fR (\fBACE_TCHAR\fR *request)"
.br
.RI "\fIHandle one request.\fR"
.in -1c
.SS Private Attributes
.in +1c
.ti -1c
.RI "\fBACE_SOCK_Stream\fR \fBclient_stream_\fR"
.br
.RI "\fIConnection to the client (we only support one client connection at a time).\fR"
.ti -1c
.RI "\fBACE_SOCK_Acceptor\fR \fBacceptor_\fR"
.br
.RI "\fIAcceptor instance.\fR"
.ti -1c
.RI "int \fBdebug_\fR"
.br
.RI "\fIKeep track of the debugging level.\fR"
.ti -1c
.RI "int \fBsignum_\fR"
.br
.RI "\fIThe signal used to trigger reconfiguration.\fR"
.in -1c
.SS Static Private Attributes
.in +1c
.ti -1c
.RI "u_short \fBDEFAULT_PORT_\fR"
.br
.RI "\fIDefault port for the Acceptor to listen on.\fR"
.in -1c
.SH DETAILED DESCRIPTION
.PP
Provide a standard \fBACE\fR service for managing all the services configured in an .
.PP
.PP
This implementation is simple and just handles each client request one at a time. There are currently 3 types of requests: + List services: If the string "help" is sent, return a list of all the services supported by the Service Configurator. + Reconfigure: If the string "reconfigure" is sent trigger a reconfiguration, which will re-read the local <svc.conf> file. + Process directive: If neither "help" nor "reconfigure" is sent, simply treat the incoming string as a process directive and pass it along to . This allows remote configuration via command-line instructions like % echo suspend My_Remote_Service | telnet hostname 3911
.PP
Each request is associated with a new connection, which is closed when the request is processed. In addition, you must be using the singleton in order to trigger reconfigurations.
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS ACE_Service_Manager::ACE_Service_Manager (void)
.PP
Constructor.
.PP
.SS ACE_Service_Manager::~ACE_Service_Manager (void)
.PP
Destructor.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS void ACE_Service_Manager::dump (void) const\fC [protected]\fR
.PP
Dump the state of an object.
.PP
.SS virtual int ACE_Service_Manager::fini (void)\fC [protected, virtual]\fR
.PP
Terminates object when dynamic unlinking occurs.
.PP
Reimplemented from \fBACE_Shared_Object\fR.
.SS virtual ACE_HANDLE ACE_Service_Manager::get_handle (void) const\fC [private, virtual]\fR
.PP
Get the I/O handle. Set the I/O handle.
.PP
Reimplemented from \fBACE_Event_Handler\fR.
.SS virtual int ACE_Service_Manager::handle_close (ACE_HANDLE fd, \fBACE_Reactor_Mask\fR close_mask)\fC [private, virtual]\fR
.PP
Called when a <handle_*()> method returns -1 or when the <remove_handler> method is called on an . The <close_mask> indicates which event has triggered the <handle_close> method callback on a particular <handle>.
.PP
Reimplemented from \fBACE_Event_Handler\fR.
.SS virtual int ACE_Service_Manager::handle_input (ACE_HANDLE fd)\fC [private, virtual]\fR
.PP
Called when input events occur (e.g., connection or data).
.PP
Reimplemented from \fBACE_Event_Handler\fR.
.SS virtual int ACE_Service_Manager::handle_signal (int signum, \fBsiginfo_t\fR *, \fBucontext_t\fR *)\fC [private, virtual]\fR
.PP
Called when object is signaled by OS (either via UNIX signals or when a Win32 object becomes signaled).
.PP
Reimplemented from \fBACE_Event_Handler\fR.
.SS virtual int ACE_Service_Manager::info (\fBACE_TCHAR\fR ** info_string, size_t length) const\fC [protected, virtual]\fR
.PP
Returns information on a service object.
.PP
Reimplemented from \fBACE_Shared_Object\fR.
.SS virtual int ACE_Service_Manager::init (int argc, \fBACE_TCHAR\fR * argv[])\fC [protected, virtual]\fR
.PP
Initializes object when dynamic linking occurs.
.PP
Reimplemented from \fBACE_Shared_Object\fR.
.SS int ACE_Service_Manager::list_services (void)\fC [protected, virtual]\fR
.PP
Determine all the services offered by this daemon and return the information back to the client.
.PP
.SS int ACE_Service_Manager::open (const \fBACE_INET_Addr\fR & sia)\fC [private]\fR
.PP
.SS void ACE_Service_Manager::process_request (\fBACE_TCHAR\fR * request)\fC [private, virtual]\fR
.PP
Handle one request.
.PP
.SS int ACE_Service_Manager::reconfigure_services (void)\fC [protected, virtual]\fR
.PP
Trigger a reconfiguration of the Service Configurator by.
.PP
.SS virtual int ACE_Service_Manager::resume (void)\fC [protected, virtual]\fR
.PP
Re-enable a previously suspended service.
.PP
Reimplemented from \fBACE_Service_Object\fR.
.SS virtual int ACE_Service_Manager::suspend (void)\fC [protected, virtual]\fR
.PP
Temporarily disable a service without removing it completely.
.PP
Reimplemented from \fBACE_Service_Object\fR.
.SH MEMBER DATA DOCUMENTATION
.PP
.SS ACE_Service_Manager::ACE_ALLOC_HOOK_DECLARE\fC [protected]\fR
.PP
Declare the dynamic allocation hooks.
.PP
.SS u_short ACE_Service_Manager::DEFAULT_PORT_\fC [static, private]\fR
.PP
Default port for the Acceptor to listen on.
.PP
.SS \fBACE_SOCK_Acceptor\fR ACE_Service_Manager::acceptor_\fC [private]\fR
.PP
Acceptor instance.
.PP
.SS \fBACE_SOCK_Stream\fR ACE_Service_Manager::client_stream_\fC [private]\fR
.PP
Connection to the client (we only support one client connection at a time).
.PP
.SS int ACE_Service_Manager::debug_\fC [private]\fR
.PP
Keep track of the debugging level.
.PP
.SS int ACE_Service_Manager::signum_\fC [private]\fR
.PP
The signal used to trigger reconfiguration.
.PP
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|