### Selecting a Manager

Unless an RPC interface is implemented for more than one specific type of object, selecting a manager for an incoming call is a simple process. When registering an interface with a single manager, the server specifies the nil type UUID for the manager type.

Note: The API uses NULL to specify a synonym to the address of the nil UUID, which contains only zeros.

In the absence of any other manager, all calls, regardless of whether they request an object, go to the nil type manager.

The situation is more complex when a server registers multiple managers for an interface. The server runtime must select from among the managers for each incoming call to the interface. The DCE RPC dispatching mechanism requires a server to set a nonnil type UUID for a set of objects and for any interface that will access the objects in order to register a manager with the same type UUID.

To dispatch an incoming call to a manager, a server does the following:

1. If the call contains the nil object UUID, the server looks for a manager registered with the nil type UUID (the nil type manager).

a. If the nil type manager exists for the requested interface, the server dispatches the call to that manager.

b. Otherwise, the server rejects the call.

2. If the call contains a nonnil object UUID, the server looks to see whether it has set a type for the object (by assigning a nonnil type UUID).

If the object lacks a type, the server looks for the nil type manager.

a. If the nil type manager exists for the requested interface, the server dispatches the call to that manager.

b. Otherwise, the server rejects the call.

3. If the object has a type, the call requires a remote procedure of a manager whose type matches the object's type. In its absence, the RPC runtime rejects the call.

The following figure illustrates the decisions a server makes to select a manager to which to dispatch an incoming call.

Decisions for Selecting a Manager

##