(or allows to be raised) any of to be raised) any of the follo
Znav | ||||
---|---|---|---|---|
|
...
int runWithSession(int argc, char* argv[])
This method must be overridden by a subclass and represents the "main loop" of the application. It is called after the communicator has been initialized and the Glacier2 session has been established. The argument vector passed to this method contains the arguments passed toApplication::main
with all Ice-related options removed. The implementation ofrunWithSession
must return zero to indicate success and non-zero to indicate failure; the value returned byrunWithSession
becomes the return value ofApplication::main
.runWithSession
can callrestart
to restart the session. This destroys the current session, creates a new session (by callingcreateSession
), and callsrunWithSession
again. TheApplication
base class also restarts the session ifrunWithSession
raises (or allows to be raised) any of the following exceptions:Ice::ConnectionLostException
Ice::ConnectionRefusedException
Ice::RequestFailedException
Ice::TimeoutException
Ice::UnknownLocalException
Glacier2::SessionPrx createSession()
This method must be overridden by a subclass to create the application's Glacier2 session. A successful call tocreateSession
is followed by a call torunWithSession
. The application terminates ifcreateSession
raises (or allows to be raised) anIce::LocalException
.
...