Ice Reference Documentation
<<< Previous | Slice Documentation | Next >>>

# `IceGrid::Admin`

## Overview

    interface Admin

The IceGrid administrative interface.

| Allowing access to this interface is a security risk! Please see the IceGrid documentation for further information.

### Operation Index

`addApplication`

  Add an application to IceGrid.

`addObject`

  Add an object to the object registry.

`addObjectWithType`

  Add an object to the object registry and explicitly specify its type.

`enableServer`

  Enable or disable a server.

`getAdapterEndpoints`

  Get the list of endpoints for an adapter.

`getAllAdapterIds`

  Get all the adapter ids registered with IceGrid.

`getAllApplicationNames`

  Get all the IceGrid applications currently registered.

`getAllNodeNames`

  Get all the IceGrid nodes currently registered.

`getAllObjectInfos`

  Get the object info of all the registered objects whose stringified identities match the given expression.

`getAllServerIds`

  Get all the server ids registered with IceGrid.

`getApplicationDescriptor`

  Get an application descriptor.

`getDefaultApplicationDescriptor`

  Get the default application descriptor.

`getNodeHostname`

  Get the hostname of this node.

`getNodeInfo`

  Get the node information for the node with the given name.

`getNodeLoad`

  Get the load averages of the node.

`getObjectInfo`

  Get the object info for the object with the given identity.

`getServerInfo`

  Get the server information for the server with the given id.

`getServerPid`

  Get a server's system process id.

`getServerState`

  Get a server's state.

`getSliceChecksums`

  Returns the checksums for the IceGrid Slice definitions.

`instantiateServer`

  Instantiate a server template from an application.

`isServerEnabled`

  Check if the server is enabled or disabled.

`patchApplication`

  Patch the given application data.

`patchServer`

  Patch a server.

`pingNode`

  Ping an IceGrid node to see if it is active.

`removeAdapter`

  Remove the adapter with the given id.

`removeApplication`

  Remove an application from IceGrid.

`removeObject`

  Remove an object from the object registry.

`sendSignal`

  Send signal to a server.

`shutdown`

  Shut down the IceGrid registry.

`shutdownNode`

  Shutdown an IceGrid node.

`startServer`

  Start a server and wait for its activation.

`stopServer`

  Stop a server.

`syncApplication`

  Synchronize a deployed application with the given application descriptor.

`updateApplication`

  Update a deployed application with the given update application descriptor.

`updateObject`

  Update an object in the object registry.

`writeMessage`

  Write message on server stdout or stderr @param id The id of the server.

## `addApplication`

    void addApplication(ApplicationDescriptor descriptor)
        throws
    	DeploymentException;

Add an application to IceGrid. An application is a set of servers.

### Parameters

`descriptor`

  The application descriptor.

### Exceptions

`DeploymentException`

  Raised if application deployment failed.

## `addObject`

    void addObject(Object* obj)
        throws
    	ObjectExistsException,
    	DeploymentException;

Add an object to the object registry. IceGrid will get the object type by calling `ice_id` on the given proxy. The object must be reachable.

### Parameters

`obj`

  The object to be added to the registry.

### Exceptions

`ObjectExistsException`

  Raised if the object is already registered.

## `addObjectWithType`

    void addObjectWithType(Object* obj,
        string type)
        throws
    	ObjectExistsException,
    	DeploymentException;

Add an object to the object registry and explicitly specify its type.

### Parameters

`obj`

  The object to be added to the registry.

`type`

  The object type.

### Exceptions

`ObjectExistsException`

  Raised if the object is already registered.

## `enableServer`

    [ "ami" ]
    void enableServer(string id,
        bool enabled)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Enable or disable a server. A disabled server can't be started on demand or administratively. The enable state of the server is not persistent, if the node is shutdown and restarted, the server will be enabled by default.

### Parameters

`id`

  The id of the server.

`enabled`

  True to enable the server, false to disable it.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getAdapterEndpoints`

    StringObjectProxyDict getAdapterEndpoints(string adapterId)
        throws
    	AdapterNotExistException,
    	NodeUnreachableException;

Get the list of endpoints for an adapter.

### Parameters

`adapterId`

  The adapter id.

### Return Value

A dictionary of adapter direct proxy classified by server id.

### Exceptions

`AdapterNotExistException`

  Raised if the adapter doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getAllAdapterIds`

    ::Ice::StringSeq getAllAdapterIds();

Get all the adapter ids registered with IceGrid.

### Return Value

The adapter ids.

## `getAllApplicationNames`

    ::Ice::StringSeq getAllApplicationNames();

Get all the IceGrid applications currently registered.

### Return Value

The application names.

## `getAllNodeNames`

    ::Ice::StringSeq getAllNodeNames();

Get all the IceGrid nodes currently registered.

### Return Value

The node names.

## `getAllObjectInfos`

    ObjectInfoSeq getAllObjectInfos(string expr);

Get the object info of all the registered objects whose stringified identities match the given expression.

### Parameters

`expr`

  The expression to match against the stringified identities of registered objects. The expression may contain a trailing wildcard (`*`) character.

### Return Value

All the object infos with a stringified identity matching the given expression.

## `getAllServerIds`

    ::Ice::StringSeq getAllServerIds();

Get all the server ids registered with IceGrid.

### Return Value

The server ids.

## `getApplicationDescriptor`

    ApplicationDescriptor getApplicationDescriptor(string name)
        throws
    	ApplicationNotExistException;

Get an application descriptor.

### Parameters

`name`

  The application name.

### Return Value

s The application descriptor.

### Exceptions

`ApplicationNotExistException`

  Raised if the application doesn't exist.

## `getDefaultApplicationDescriptor`

    ApplicationDescriptor getDefaultApplicationDescriptor()
        throws
    	DeploymentException;

Get the default application descriptor.

## `getNodeHostname`

    string getNodeHostname(string name)
        throws
    	NodeNotExistException,
    	NodeUnreachableException;

Get the hostname of this node.

### Parameters

`name`

  The node name.

### Exceptions

`NodeNotExistException`

  Raised if the node doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getNodeInfo`

    NodeInfo getNodeInfo(string name)
        throws
    	NodeNotExistException,
    	NodeUnreachableException;

Get the node information for the node with the given name.

### Parameters

`name`

  The node name.

### Return Value

The node information.

### Exceptions

`NodeNotExistException`

  Raised if the node doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getNodeLoad`

    [ "ami" ]
    LoadInfo getNodeLoad(string name)
        throws
    	NodeNotExistException,
    	NodeUnreachableException;

Get the load averages of the node.

### Parameters

`name`

  The node name.

### Return Value

The node load information.

### Exceptions

`NodeNotExistException`

  Raised if the node doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getObjectInfo`

    ObjectInfo getObjectInfo(::Ice::Identity id)
        throws
    	ObjectNotRegisteredException;

Get the object info for the object with the given identity.

### Parameters

`id`

  The identity of the object.

### Return Value

The object info.

### Exceptions

`ObjectNotRegisteredException`

  Raised if the object doesn't exist.

## `getServerInfo`

    ServerInfo getServerInfo(string id)
        throws
    	ServerNotExistException;

Get the server information for the server with the given id.

### Parameters

`id`

  The server id.

### Return Value

s The server information.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

## `getServerPid`

    int getServerPid(string id)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Get a server's system process id. The process id is operating system dependent.

### Parameters

`id`

  The id of the server.

### Return Value

The server process id.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getServerState`

    ServerState getServerState(string id)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Get a server's state.

### Parameters

`id`

  The id of the server.

### Return Value

The server state.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `getSliceChecksums`

    ::Ice::SliceChecksumDict getSliceChecksums();

Returns the checksums for the IceGrid Slice definitions.

### Return Value

A dictionary mapping Slice type ids to their checksums.

## `instantiateServer`

    void instantiateServer(string application,
        string node,
        ServerInstanceDescriptor desc)
        throws
    	ApplicationNotExistException,
    	DeploymentException;

Instantiate a server template from an application.

## `isServerEnabled`

    bool isServerEnabled(string id)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Check if the server is enabled or disabled.

### Parameters

`id`

  The id of the server.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `patchApplication`

    [ "ami", "amd" ]
    void patchApplication(string name,
        bool shutdown)
        throws
    	ApplicationNotExistException,
    	PatchException;

Patch the given application data. If the patch argument is an empty string, all the application servers depending on patch data will be patched.

### Parameters

`name`

  The application name.

`shutdown`

  If true, the servers depending on the data to patch will be shutdown if necessary.

### Exceptions

`PatchException`

  Raised if the patch failed.

`ApplicationNotExistException`

  Raised if the application doesn't exist.

## `patchServer`

    [ "ami", "amd" ]
    void patchServer(string id,
        bool shutdown)
        throws
    	ServerNotExistException,
    	NodeUnreachableException,
    	PatchException;

Patch a server.

### Parameters

`id`

  The id of the server.

`shutdown`

  If true, servers depending on the data to patch will be shutdown if necessary.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

`PatchException`

  Raised if the patch failed.

## `pingNode`

    bool pingNode(string name)
        throws
    	NodeNotExistException;

Ping an IceGrid node to see if it is active.

### Parameters

`name`

  The node name.

### Return Value

true if the node ping succeeded, false otherwise.

### Exceptions

`NodeNotExistException`

  Raised if the node doesn't exist.

## `removeAdapter`

    void removeAdapter(string adapterId)
        throws
    	AdapterNotExistException,
    	DeploymentException;

Remove the adapter with the given id.

### Exceptions

`AdapterNotExistException`

  Raised if the adapter doesn't exist.

## `removeApplication`

    void removeApplication(string name)
        throws
    	ApplicationNotExistException;

Remove an application from IceGrid.

### Parameters

`name`

  The application name.

### Exceptions

`ApplicationNotExistException`

  Raised if the application doesn't exist.

## `removeObject`

    void removeObject(::Ice::Identity id)
        throws
    	ObjectNotRegisteredException,
    	DeploymentException;

Remove an object from the object registry.

### Parameters

`id`

  The identity of the object to be removed from the registry.

### Exceptions

`ObjectNotRegisteredException`

  Raised if the object doesn't exist.

## `sendSignal`

    void sendSignal(string id,
        string signal)
        throws
    	ServerNotExistException,
    	NodeUnreachableException,
    	BadSignalException;

Send signal to a server.

### Parameters

`id`

  The id of the server.

`signal`

  The signal, for example SIGTERM or 15.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

`BadSignalException`

  Raised if the signal is not recognized by the target server.

## `shutdown`

    void shutdown();

Shut down the IceGrid registry.

## `shutdownNode`

    [ "ami" ]
    void shutdownNode(string name)
        throws
    	NodeNotExistException,
    	NodeUnreachableException;

Shutdown an IceGrid node.

### Parameters

`name`

  The node name.

### Exceptions

`NodeNotExistException`

  Raised if the node doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `startServer`

    [ "ami" ]
    void startServer(string id)
        throws
    	ServerNotExistException,
    	ServerStartException,
    	NodeUnreachableException;

Start a server and wait for its activation.

### Parameters

`id`

  The id of the server.

### Return Value

True if the server was successfully started, false otherwise.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `stopServer`

    [ "ami" ]
    void stopServer(string id)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Stop a server.

### Parameters

`id`

  The id of the server.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

## `syncApplication`

    void syncApplication(ApplicationDescriptor descriptor)
        throws
    	DeploymentException,
    	ApplicationNotExistException;

Synchronize a deployed application with the given application descriptor. This operation will replace the current descriptor with this new descriptor.

### Parameters

`descriptor`

  The application descriptor.

### Exceptions

`DeploymentException`

  Raised if application deployment failed.

`ApplicationNotExistException`

  Raised if the application doesn't exist.

## `updateApplication`

    void updateApplication(ApplicationUpdateDescriptor descriptor)
        throws
    	DeploymentException,
    	ApplicationNotExistException;

Update a deployed application with the given update application descriptor.

### Parameters

`descriptor`

  The update descriptor.

### Exceptions

`DeploymentException`

  Raised if application deployment failed.

`ApplicationNotExistException`

  Raised if the application doesn't exist.

## `updateObject`

    void updateObject(Object* obj)
        throws
    	ObjectNotRegisteredException,
    	DeploymentException;

Update an object in the object registry.

### Parameters

`obj`

  The object to be updated to the registry.

### Exceptions

`ObjectNotRegisteredException`

  Raised if the object doesn't exist.

## `writeMessage`

    void writeMessage(string id,
        string message,
        int fd)
        throws
    	ServerNotExistException,
    	NodeUnreachableException;

Write message on server stdout or stderr

### Parameters

`id`

  The id of the server.

`message`

  The message.

`fd`

  1 for stdout, 2 for stderr.

### Exceptions

`ServerNotExistException`

  Raised if the server doesn't exist.

`NodeUnreachableException`

  Raised if the node could not be reached.

<<< Previous | Home | Next >>>
`IceGrid::AdaptiveLoadBalancingPolicy` | Up | `IceGrid::ApplicationDescriptor`