Creating the admin Object

The administrative facility is disabled by default. To enable it, you must set the property Ice.Admin.Enabled to a numeric value greater than 0, or leave Ice.Admin.Enabled unset and specify endpoints for the Ice.Admin administrative object adapter using the property Ice.Admin.Endpoints. When Ice.Admin.Enabled is set to 0 or a negative value, the administrative facility is disabled, and Ice.Admin.Endpoints is ignored.

When the administrative facility is enabled, and

Ice creates automatically the admin object during communicator initialization, and hosts all its enabled facets in the built-in Ice.Admin object adapter.

This admin object and its facets are created at the end of communicator initialization, after the initialization of all plugins. Ice gives this object the identity instance-name/admin, where instance-name is the value of the the Ice.Admin.InstanceName property. If Ice.Admin.InstanceName is not set or empty, Ice generates a UUID for instance-name.

If Ice does not create the admin object during communicator initialization as described above, you need to create the admin object after communicator initialization by calling getAdmin or createAdmin on the communicator:

Slice
local interface Communicator
{
    // ...
    Object* getAdmin();
    Object* createAdmin(ObjectAdapter adminAdapter, Identity adminId);
    // ...
}

getAdmin is typically used to create the admin object when both Ice.Admin.Enpoints and Ice.Admin.DelayCreation are set. The resulting admin object's enabled facets are hosted in the Ice.Admin object adapter. The identity of this admin object is instance-name/admin, where instance-name corresponds to the value of Ice.Admin.InstanceName or a UUID, as described above.

createAdmin is used to create the admin object and host all its enabled facets in the object adapter of your choice (the adminAdapter parameter), with the identity of your choice (the adminId parameter). If adminAdapter is null and Ice.Admin.Endpoints specifies endpoints for the Ice.Admin object adapter, createAdmin creates and activates the Ice.Admin object adapter and hosts all the admin object's facets in that adapter. Note that only one admin object can be created for a given communicator. createAdmin will fail and raise an exception if there is already an admin object.

The administrative facility introduces additional security considerations, therefore the endpoints for the object adapter where the admin object's facets are hosted must be chosen with caution.

See Also