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.
Dispatching a request to the correct servant.
Adding and Removing Servants
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.