|
| | Application (const Application &)=delete |
| | Application (Ice::SignalPolicy=Ice::SignalPolicy::HandleSignals) |
| | Initializes an instance that calls Ice::Communicator::shutdown if a signal is received.
|
| virtual Glacier2::SessionPrxPtr | createSession ()=0 |
| | Creates a new Glacier2 session.
|
| Application & | operator= (const Application &)=delete |
| virtual int | runWithSession (int argc, char *argv[])=0 |
| | Called once the communicator has been initialized and the Glacier2 session has been established.
|
| virtual void | sessionDestroyed () |
| | Called when the session refresh thread detects that the session has been destroyed.
|
| | Application (SignalPolicy policy=SignalPolicy::HandleSignals) |
| | The constructor configures the signal handling behavior.
|
| virtual void | interruptCallback (int signal) |
| | Override this method to provide a custom application interrupt hook.
|
| int | main (const StringSeq &args, const InitializationData &initData=InitializationData(), int version=30711) |
| | Call this main() from the global main().
|
| int | main (const StringSeq &args, const std::string &configFile, int version=30711) |
| | Call this main() from the global main().
|
| int | main (int argc, const char *const argv[], const InitializationData &initData=InitializationData(), int version=30711) |
| | Call this main() from the global main().
|
| int | main (int argc, const char *const argv[], const std::string &configFile, int version=30711) |
| | Call this main() from the global main().
|
| virtual | ~Application () |
|
| static Ice::ObjectPrxPtr | addWithUUID (const Ice::ObjectPtr &servant) |
| | Adds a servant to the callback object adapter's Active Servant Map with a UUID.
|
| static std::string | categoryForClient () |
| | Returns the category to be used in the identities of all of the client's callback objects.
|
| static Ice::Identity | createCallbackIdentity (const std::string &) |
| | Create a new Ice identity for callback objects with the given identity name field.
|
| static Ice::ObjectAdapterPtr | objectAdapter () |
| | Creates an object adapter for callback objects.
|
| static void | restart () |
| | Called to restart the application's Glacier2 session.
|
| static Glacier2::RouterPrxPtr | router () |
| | Returns the Glacier2 router proxy.
|
| static Glacier2::SessionPrxPtr | session () |
| | Returns the Glacier2 session proxy.
|
| static const char * | appName () |
| | Obtains the application name, i.e., argv[0].
|
| static void | callbackOnInterrupt () |
| | Configures the application to invoke interruptCallback when a signal occurs, thereby giving the subclass responsibility for handling the signal.
|
| static CommunicatorPtr | communicator () |
| | Obtains the application's Communicator instance.
|
| static void | destroyOnInterrupt () |
| | Configures the application to destroy the communicator when one of the monitored signals is raised.
|
| static void | holdInterrupt () |
| | Configures the application to ignore (but remember) a signal.
|
| static void | ignoreInterrupt () |
| | Configures the application to ignore signals.
|
| static bool | interrupted () |
| | Indicates whether a signal handler was triggered.
|
| static void | releaseInterrupt () |
| | Processes a stored signal (if any) using the current signal handling configuration.
|
| static void | shutdownOnInterrupt () |
| | Configures the application to shut down the communicator when one of the monitored signals is raised.
|
An extension of Ice::Application that makes it easy to write Glacier2 applications.
Applications must create a derived class that implements the createSession and runWithSession methods.
The base class invokes createSession to create a new Glacier2 session and then invokes runWithSession in which the subclass performs its application logic. The base class automatically destroys the session when runWithSession returns.
If runWithSession calls restart or raises any of the exceptions Ice::ConnectionRefusedException, Ice::ConnectionLostException, Ice::UnknownLocalException, Ice::RequestFailedException, or Ice::TimeoutException, the base class destroys the current session and restarts the application with another call to createSession followed by runWithSession.
The application can optionally override the sessionDestroyed callback method if it needs to take action when connectivity with the Glacier2 router is lost.
A program can contain only one instance of this class.