Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 (or allows to be raised) any of to be raised) any of the follo

Znav
nextSecuring a Glacier2 Router
prevCallbacks through Glacier2

...

  • 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 to Application::main with all Ice-related options removed. The implementation of runWithSession must return zero to indicate success and non-zero to indicate failure; the value returned by runWithSession becomes the return value of Application::main.

    runWithSession can call restart to restart the session. This destroys the current session, creates a new session (by calling createSession), and calls runWithSession again. The Application base class also restarts the session if runWithSession raises (or allows to be raised) any of the following exceptions:

    • Ice::ConnectionLostException
    • Ice::ConnectionRefusedException
    • Ice::RequestFailedException
    • Ice::TimeoutException
    • Ice::UnknownLocalException

    All other exceptions cause the current session to be destroyed without restarting.
  • Glacier2::SessionPrx createSession()
    This method must be overridden by a subclass to create the application's Glacier2 session. A successful call to createSession is followed by a call to runWithSession. The application terminates if createSession raises (or allows to be raised) an Ice::LocalException.

...