Object Adapter Activation and Deactivation
3 min read
3 min read
3 min read
3 min read
3 min read
Activation
An object adapter that was just created is in the Holding state. In this state, the object adapter accepts transport connections but neither validates them at the Ice level nor reads requests from them, and it discards UDP requests. You typically add servants to the Active Servant Map in this state, then call activate to move the object adapter to the Active state, in which it reads and dispatches the requests received over the connections it accepts. For example:
adapter->activate();activate is a blocking call: it returns only once the object adapter is activated.
adapter.activate();adapter.activate();adapter.activate()try adapter.activate()Deactivation
You usually don't need to deactivate or destroy an object adapter yourself: shutting down the communicator deactivates its object adapters, and destroying the communicator destroys them. To deactivate or destroy an object adapter while its communicator keeps running, call one of these methods:
deactivateThe object adapter stops accepting connections, and closes each connection it accepted once the dispatches in progress on this connection have completed and sent their replies; requests that arrive over these connections in the meantime are not dispatched. A deactivated object adapter cannot be reactivated. Until destroyed, a deactivated object adapter keeps dispatching the requests received over bidirectional connections and collocated invocations.destroyThe object adapter deactivates, waits for the dispatches in progress to complete, removes its servants, and stops dispatching the requests received over bidirectional connections. You can then create a new object adapter with the same name.
See ObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapter in the API reference for more details.