IcePack::Admin

Overview

interface Admin

The IcePack administrative interface.

Warning

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

Operation Index

addApplication

Add an application to IcePack.

addObject

Add an object to the object registry.

addObjectWithType

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

addServer

Add a server to an IcePack node.

getAdapterEndpoints

Get the list of endpoints for an adapter.

getAllAdapterIds

Get all the adapter ids registered with IcePack.

getAllApplicationNames

Get all the IcePack applications currently registered.

getAllNodeNames

Get all the IcePack nodes currently registered.

getAllServerNames

Get all the server names registered with IcePack.

getApplicationDescriptor

Get an application descriptor.

getServerActivation

Get the server's activation mode.

getServerDescriptor

Get a server descriptor.

getServerPid

Get a server's system process id.

getServerState

Get a server's state.

getSliceChecksums

Returns the checksums for the IcePack Slice definitions.

pingNode

Ping an IcePack node to see if it is active.

removeApplication

Remove an application from IcePack.

removeNode

Remove the given node and associated servers from the IcePack registry.

removeObject

Remove an object from the object registry.

removeServer

Remove a server from an IcePack node.

sendSignal

Send signal to a server.

setServerActivation

Set the server's activation mode.

shutdown

Shut down the IcePack registry.

shutdownNode

Shutdown an IcePack node.

startServer

Start a server.

stopServer

Stop a server.

updateApplication

Update an application.

updateServer

Update a server.

writeMessage

Write message on server stdout or stderr @param name Must match the name of ServerDescription::name.

addApplication

void addApplication(ApplicationDescriptor descriptor)
    throws
	DeploymentException;

Add an application to IcePack. 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. IcePack 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;

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.

addServer

void addServer(ServerDescriptor server)
    throws
	DeploymentException;

Add a server to an IcePack node.

Parameters

descriptor

The server deployment descriptor.

Exceptions

DeploymentException

Raised if server deployment failed.

getAdapterEndpoints

string getAdapterEndpoints(string id)
    throws
	AdapterNotExistException,
	NodeUnreachableException;

Get the list of endpoints for an adapter.

Parameters

id

The adapter id.

Return Value

The stringified adapter endpoints.

Exceptions

AdapterNotExistException

Raised if the adapter is not found.

getAllAdapterIds

::Ice::StringSeq getAllAdapterIds();

Get all the adapter ids registered with IcePack.

Return Value

The adapter ids.

getAllApplicationNames

::Ice::StringSeq getAllApplicationNames();

Get all the IcePack applications currently registered.

Return Value

The application names.

getAllNodeNames

::Ice::StringSeq getAllNodeNames();

Get all the IcePack nodes currently registered.

Return Value

The node names.

getAllServerNames

::Ice::StringSeq getAllServerNames();

Get all the server names registered with IcePack.

Return Value

The server names.

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.

getServerActivation

ServerActivation getServerActivation(string name)
    throws
	ServerNotExistException,
	NodeUnreachableException;

Get the server's activation mode.

Parameters

name

Must match the name of ServerDescription::name.

Return Value

The server activation mode.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

getServerDescriptor

ServerDescriptor getServerDescriptor(string name)
    throws
	ServerNotExistException;

Get a server descriptor.

Parameters

name

The server name.

Return Value

s The server descriptor.

Exceptions

ServerNotExistException

Raised if the server doesn't exist.

getServerPid

int getServerPid(string name)
    throws
	ServerNotExistException,
	NodeUnreachableException;

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

Parameters

name

Must match the name of ServerDescription::name.

Return Value

The server process id.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

getServerState

ServerState getServerState(string name)
    throws
	ServerNotExistException,
	NodeUnreachableException;

Get a server's state.

Parameters

name

Must match the name of ServerDescription::name.

Return Value

The server state.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

getSliceChecksums

::Ice::SliceChecksumDict getSliceChecksums();

Returns the checksums for the IcePack Slice definitions.

Return Value

A dictionary mapping Slice type ids to their checksums.

pingNode

bool pingNode(string name)
    throws
	NodeNotExistException;

Ping an IcePack node to see if it is active.

Parameters

name

The node name.

Return Value

true if the node ping succeeded, false otherwise.

removeApplication

void removeApplication(string name)
    throws
	ApplicationNotExistException;

Remove an application from IcePack.

Parameters

name

The application name.

removeNode

void removeNode(string name)
    throws
	NodeNotExistException;

Remove the given node and associated servers from the IcePack registry.

Parameters

name

The node name.

removeObject

void removeObject(Object* obj)
    throws
	ObjectNotExistException;

Remove an object from the object registry.

Parameters

obj

The object to be removed from the registry.

Exceptions

ObjectNotExistException

Raised if the object cannot be found.

removeServer

void removeServer(string name)
    throws
	ServerNotExistException,
	DeploymentException;

Remove a server from an IcePack node.

Parameters

name

The server name.

Exceptions

ServerNotExistException

Raised if the server doesn't exist.

sendSignal

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

Send signal to a server.

Parameters

name

Must match the name of ServerDescription::name.

signal

The signal, for example SIGTERM or 15.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

BadSignalException

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

setServerActivation

void setServerActivation(string name,
    ServerActivation mode)
    throws
	ServerNotExistException,
	NodeUnreachableException;

Set the server's activation mode.

Parameters

name

Must match the name of ServerDescription::name.

Return Value

The server activation mode.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

shutdown

void shutdown();

Shut down the IcePack registry.

shutdownNode

void shutdownNode(string name)
    throws
	NodeNotExistException;

Shutdown an IcePack node.

Parameters

name

The node name.

startServer

bool startServer(string name)
    throws
	ServerNotExistException,
	NodeUnreachableException;

Start a server.

Parameters

name

Must match the name of ServerDescription::name.

Return Value

True if the server was successfully started, false otherwise.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

stopServer

void stopServer(string name)
    throws
	ServerNotExistException,
	NodeUnreachableException;

Stop a server.

Parameters

name

Must match the name of ServerDescription::name.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.

updateApplication

void updateApplication(ApplicationDescriptor descriptor)
    throws
	DeploymentException;

Update an application. An application is a set of servers.

Parameters

descriptor

The application descriptor.

Exceptions

DeploymentException

Raised if application deployment failed.

updateServer

void updateServer(ServerDescriptor server)
    throws
	ServerNotExistException,
	DeploymentException;

Update a server.

Parameters

descriptor

The server deployment descriptor.

Exceptions

DeploymentException

Raised if server deployment failed.

ServerNotExistException

Raised if the server doesn't exist.

writeMessage

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

Write message on server stdout or stderr

Parameters

name

Must match the name of ServerDescription::name.

message

The message.

fd

1 for stdout, 2 for stderr.

Exceptions

ServerNotExistException

Raised if the server is not found.

NodeUnreachableException

Raised if the node could not be reached.