The Active Servant Map

2 min read

2 min read

2 min read

2 min read

2 min read

2 min read

Each object adapter maintains an active servant map (ASM): a table that associates each servant you add to it with an identity and a facet. The Dispatch Pipeline describes how an object adapter uses its ASM to dispatch a request.

Binding a request through the active servant map The client proxy contains endpoint 212.8.7.33 and identity Joe. The request reaches the server object adapter, whose active servant map associates Fred, Joe, and Carl with servants. The highlighted Joe entry selects the matching servant. Client Server Proxy 212.8.7.33 Joe Joe Endpoint 212.8.7.33 Object adapter ASM Servants Fred Joe Carl

Dispatching a request to the correct servant.

You add a servant to the ASM with addaddaddaddaddaddadd or addWithUUIDaddWithUUIDaddWithUUIDaddWithUUIDaddWithUUIDaddWithUUIDaddWithUUID, and remove it with removeremoveremoveremoveremoveremoveremove. addFacetaddFacetaddFacetaddFacetaddFacetaddFacetaddFacet, addFacetWithUUIDaddFacetWithUUIDaddFacetWithUUIDaddFacetWithUUIDaddFacetWithUUIDaddFacetWithUUIDaddFacetWithUUID and removeFacetremoveFacetremoveFacetremoveFacetremoveFacetremoveFacetremoveFacet do the same for a facet other than the default facet. See ObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapterObjectAdapter in the API reference for these methods.

Each identity and facet has at most one servant, but you can add the same servant with several identities. Removing a servant does not affect the dispatches in progress in this servant. Destroying the object adapter empties its ASM.

A servant in the ASM usually implements a skeleton generated by the Slice compiler, but it can be any dispatcher.