Package com.zeroc.IceGrid
Interface Admin
- All Superinterfaces:
Object
The IceGrid administrative interface.
Allowing access to this interface is a security risk! Please see the IceGrid documentation for further information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
Object.Ice_invokeResult
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addApplication
(ApplicationDescriptor descriptor, Current current) Add an application to IceGrid.void
Add an object to the object registry.void
addObjectWithType
(ObjectPrx obj, String type, Current current) Add an object to the object registry and explicitly specify its type.void
enableServer
(String id, boolean enabled, Current current) Enable or disable a server.getAdapterInfo
(String id, Current current) Get the adapter information for the replica group or adapter with the given id.String[]
getAllAdapterIds
(Current current) Get all the adapter ids registered with IceGrid.String[]
getAllApplicationNames
(Current current) Get all the IceGrid applications currently registered.String[]
getAllNodeNames
(Current current) Get all the IceGrid nodes currently registered.getAllObjectInfos
(String expr, Current current) Get the object info of all the registered objects whose stringified identities match the given expression.String[]
getAllRegistryNames
(Current current) Get all the IceGrid registries currently registered.String[]
getAllServerIds
(Current current) Get all the server ids registered with IceGrid.getApplicationInfo
(String name, Current current) Get an application descriptor.getDefaultApplicationDescriptor
(Current current) Get the default application descriptor.getNodeAdmin
(String name, Current current) Get a proxy to the IceGrid node's admin object.getNodeHostname
(String name, Current current) Get the hostname of this node.getNodeInfo
(String name, Current current) Get the node information for the node with the given name.getNodeLoad
(String name, Current current) Get the load averages of the node.int
getNodeProcessorSocketCount
(String name, Current current) Get the number of physical processor sockets for the machine running the node with the given name.getObjectInfo
(Identity id, Current current) Get the object info for the object with the given identity.getObjectInfosByType
(String type, Current current) Get the object info of all the registered objects with the given type.getRegistryAdmin
(String name, Current current) Get a proxy to the IceGrid registry's admin object.getRegistryInfo
(String name, Current current) Get the registry information for the registry with the given name.getServerAdmin
(String id, Current current) Get a proxy to the server's admin object.getServerAdminCategory
(Current current) Get the category for server admin objects.getServerInfo
(String id, Current current) Get the server information for the server with the given id.int
getServerPid
(String id, Current current) Get a server's system process id.getServerState
(String id, Current current) Get a server's state.getSliceChecksums
(Current current) Returns the checksums for the IceGrid Slice definitions.default String
Returns the Slice type ID of the most-derived interface supported by this object.default String[]
Returns the Slice type IDs of the interfaces supported by this object.static String
Returns the Slice type ID of the interface supported by this object.void
instantiateServer
(String application, String node, ServerInstanceDescriptor desc, Current current) Instantiate a server template from an application on the given node.boolean
isServerEnabled
(String id, Current current) Check if the server is enabled or disabled.patchApplicationAsync
(String name, boolean shutdown, Current current) Patch the given application data.patchServerAsync
(String id, boolean shutdown, Current current) Patch a server.boolean
Ping an IceGrid node to see if it is active.boolean
pingRegistry
(String name, Current current) Ping an IceGrid registry to see if it is active.void
removeAdapter
(String id, Current current) Remove the adapter with the given id.void
removeApplication
(String name, Current current) Remove an application from IceGrid.void
removeObject
(Identity id, Current current) Remove an object from the object registry.void
sendSignal
(String id, String signal, Current current) Send signal to a server.void
Shut down the IceGrid registry.void
shutdownNode
(String name, Current current) Shutdown an IceGrid node.void
shutdownRegistry
(String name, Current current) Shutdown an IceGrid registry.startServerAsync
(String id, Current current) Start a server and wait for its activation.stopServerAsync
(String id, Current current) Stop a server.void
syncApplication
(ApplicationDescriptor descriptor, Current current) Synchronize a deployed application with the given application descriptor.void
syncApplicationWithoutRestart
(ApplicationDescriptor descriptor, Current current) Synchronize a deployed application with the given application descriptor.void
updateApplication
(ApplicationUpdateDescriptor descriptor, Current current) Update a deployed application with the given update application descriptor.void
updateApplicationWithoutRestart
(ApplicationUpdateDescriptor descriptor, Current current) Update a deployed application with the given update application descriptor only if no server restarts are necessary for the update of the application.void
updateObject
(ObjectPrx obj, Current current) Update an object in the object registry.Methods inherited from interface com.zeroc.Ice.Object
ice_dispatch, ice_isA, ice_ping
-
Method Details
-
addApplication
void addApplication(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException Add an application to IceGrid.- Parameters:
descriptor
- The application descriptor.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.DeploymentException
- Raised if application deployment failed.
-
syncApplication
void syncApplication(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException 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.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if application deployment failed.
-
updateApplication
void updateApplication(ApplicationUpdateDescriptor descriptor, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Update a deployed application with the given update application descriptor.- Parameters:
descriptor
- The update descriptor.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if application deployment failed.
-
syncApplicationWithoutRestart
void syncApplicationWithoutRestart(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Synchronize a deployed application with the given application descriptor. This operation will replace the current descriptor with this new descriptor only if no server restarts are necessary for the update of the application. If some servers need to be restarted, the synchronization is rejected with a DeploymentException.- Parameters:
descriptor
- The application descriptor.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if application deployment failed.
-
updateApplicationWithoutRestart
void updateApplicationWithoutRestart(ApplicationUpdateDescriptor descriptor, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Update a deployed application with the given update application descriptor only if no server restarts are necessary for the update of the application. If some servers need to be restarted, the synchronization is rejected with a DeploymentException.- Parameters:
descriptor
- The update descriptor.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if application deployment failed.
-
removeApplication
void removeApplication(String name, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Remove an application from IceGrid.- Parameters:
name
- The application name.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if application deployment failed.
-
instantiateServer
void instantiateServer(String application, String node, ServerInstanceDescriptor desc, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Instantiate a server template from an application on the given node.- Parameters:
application
- The application name.node
- The name of the node where the server will be deployed.desc
- The descriptor of the server instance to deploy.current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock or if another session is holding the lock.ApplicationNotExistException
- Raised if the application doesn't exist.DeploymentException
- Raised if server instantiation failed.
-
patchApplicationAsync
CompletionStage<Void> patchApplicationAsync(String name, boolean shutdown, Current current) throws ApplicationNotExistException, PatchException Patch the given application data.- Parameters:
name
- The application name.shutdown
- If true, the servers depending on the data to patch will be shut down if necessary.current
- The Current object for the invocation.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
ApplicationNotExistException
- Raised if the application doesn't exist.PatchException
- Raised if the patch failed.
-
getApplicationInfo
ApplicationInfo getApplicationInfo(String name, Current current) throws ApplicationNotExistException Get an application descriptor.- Parameters:
name
- The application name.current
- The Current object for the invocation.- Returns:
- The application descriptor.
- Throws:
ApplicationNotExistException
- Raised if the application doesn't exist.
-
getDefaultApplicationDescriptor
Get the default application descriptor.- Parameters:
current
- The Current object for the invocation.- Returns:
- The default application descriptor.
- Throws:
DeploymentException
- Raised if the default application descriptor can't be accessed or is invalid.
-
getAllApplicationNames
Get all the IceGrid applications currently registered.- Parameters:
current
- The Current object for the invocation.- Returns:
- The application names.
-
getServerInfo
Get the server information for the server with the given id.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- The server information.
- Throws:
ServerNotExistException
- Raised if the server doesn't exist.
-
getServerState
ServerState getServerState(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException Get a server's state.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- The server state.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
getServerPid
int getServerPid(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException Get a server's system process id. The process id is operating system dependent.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- The server's process id.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
getServerAdminCategory
Get the category for server admin objects. You can manufacture a server admin proxy from the admin proxy by changing its identity: use the server ID as name and the returned category as category.- Parameters:
current
- The Current object for the invocation.- Returns:
- The category for server admin objects.
-
getServerAdmin
ObjectPrx getServerAdmin(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException Get a proxy to the server's admin object.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- A proxy to the server's admin object
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
enableServer
void enableServer(String id, boolean enabled, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException 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 shut down and restarted, the server will be enabled by default.- Parameters:
id
- The server id.enabled
- True to enable the server, false to disable it.current
- The Current object for the invocation.- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
isServerEnabled
boolean isServerEnabled(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException Check if the server is enabled or disabled.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- True if the server is enabled.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
startServerAsync
CompletionStage<Void> startServerAsync(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException, ServerStartException Start a server and wait for its activation.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.ServerStartException
- Raised if the server couldn't be started.
-
stopServerAsync
CompletionStage<Void> stopServerAsync(String id, Current current) throws DeploymentException, NodeUnreachableException, ServerNotExistException, ServerStopException Stop a server.- Parameters:
id
- The server id.current
- The Current object for the invocation.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.ServerStopException
- Raised if the server couldn't be stopped.
-
patchServerAsync
CompletionStage<Void> patchServerAsync(String id, boolean shutdown, Current current) throws DeploymentException, NodeUnreachableException, PatchException, ServerNotExistException Patch a server.- Parameters:
id
- The server id.shutdown
- If true, servers depending on the data to patch will be shut down if necessary.current
- The Current object for the invocation.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.PatchException
- Raised if the patch failed.ServerNotExistException
- Raised if the server doesn't exist.
-
sendSignal
void sendSignal(String id, String signal, Current current) throws BadSignalException, DeploymentException, NodeUnreachableException, ServerNotExistException Send signal to a server.- Parameters:
id
- The server id.signal
- The signal, for example SIGTERM or 15.current
- The Current object for the invocation.- Throws:
BadSignalException
- Raised if the signal is not recognized by the target server.DeploymentException
- Raised if the server couldn't be deployed on the node.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
getAllServerIds
Get all the server ids registered with IceGrid.- Parameters:
current
- The Current object for the invocation.- Returns:
- The server ids.
-
getAdapterInfo
Get the adapter information for the replica group or adapter with the given id.- Parameters:
id
- The adapter id.current
- The Current object for the invocation.- Returns:
- A sequence of adapter information structures. If the given id refers to an adapter, this sequence will contain only one element. If the given id refers to a replica group, the sequence will contain the adapter information of each member of the replica group.
- Throws:
AdapterNotExistException
- Raised if the adapter or replica group doesn't exist.
-
removeAdapter
Remove the adapter with the given id.- Parameters:
id
- The adapter id.current
- The Current object for the invocation.- Throws:
AdapterNotExistException
- Raised if the adapter doesn't exist.DeploymentException
- Raised if application deployment failed.
-
getAllAdapterIds
Get all the adapter ids registered with IceGrid.- Parameters:
current
- The Current object for the invocation.- Returns:
- The adapter ids.
-
addObject
Add an object to the object registry. IceGrid will get the object type by callingice_id
on the given proxy. The object must be reachable.- Parameters:
obj
- The object to be added to the registry.current
- The Current object for the invocation.- Throws:
DeploymentException
- Raised if the object can't be added. This might be raised if the invocation on the proxy to get the object type failed.ObjectExistsException
- Raised if the object is already registered.
-
updateObject
void updateObject(ObjectPrx obj, Current current) throws DeploymentException, ObjectNotRegisteredException Update an object in the object registry. Only objects added with this interface can be updated with this operation. Objects added with deployment descriptors should be updated with the deployment mechanism.- Parameters:
obj
- The object to be updated to the registry.current
- The Current object for the invocation.- Throws:
DeploymentException
- Raised if the object can't be updated. This might happen if the object was added with a deployment descriptor.ObjectNotRegisteredException
- Raised if the object isn't registered with the registry.
-
addObjectWithType
void addObjectWithType(ObjectPrx obj, String type, Current current) throws DeploymentException, 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.current
- The Current object for the invocation.- Throws:
DeploymentException
- Raised if application deployment failed.ObjectExistsException
- Raised if the object is already registered.
-
removeObject
void removeObject(Identity id, Current current) throws DeploymentException, ObjectNotRegisteredException Remove an object from the object registry. Only objects added with this interface can be removed with this operation. Objects added with deployment descriptors should be removed with the deployment mechanism.- Parameters:
id
- The identity of the object to be removed from the registry.current
- The Current object for the invocation.- Throws:
DeploymentException
- Raised if the object can't be removed. This might happen if the object was added with a deployment descriptor.ObjectNotRegisteredException
- Raised if the object isn't registered with the registry.
-
getObjectInfo
Get the object info for the object with the given identity.- Parameters:
id
- The identity of the object.current
- The Current object for the invocation.- Returns:
- The object info.
- Throws:
ObjectNotRegisteredException
- Raised if the object isn't registered with the registry.
-
getObjectInfosByType
Get the object info of all the registered objects with the given type.- Parameters:
type
- The type of the object.current
- The Current object for the invocation.- Returns:
- The object infos.
-
getAllObjectInfos
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.current
- The Current object for the invocation.- Returns:
- All the object infos with a stringified identity matching the given expression.
-
pingNode
Ping an IceGrid node to see if it is active.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Returns:
- true if the node ping succeeded, false otherwise.
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.
-
getNodeLoad
LoadInfo getNodeLoad(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get the load averages of the node.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Returns:
- The node load information.
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
getNodeInfo
NodeInfo getNodeInfo(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get the node information for the node with the given name.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Returns:
- The node information.
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
getNodeAdmin
ObjectPrx getNodeAdmin(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get a proxy to the IceGrid node's admin object.- Parameters:
name
- The IceGrid node namecurrent
- The Current object for the invocation.- Returns:
- A proxy to the IceGrid node's admin object
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
getNodeProcessorSocketCount
int getNodeProcessorSocketCount(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get the number of physical processor sockets for the machine running the node with the given name. Note that this method will return 1 on operating systems where this can't be automatically determined and where the IceGrid.Node.ProcessorSocketCount property for the node is not set.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Returns:
- The number of processor sockets or 1 if the number of sockets can't determined.
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
shutdownNode
void shutdownNode(String name, Current current) throws NodeNotExistException, NodeUnreachableException Shutdown an IceGrid node.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
getNodeHostname
String getNodeHostname(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get the hostname of this node.- Parameters:
name
- The node name.current
- The Current object for the invocation.- Returns:
- The node hostname.
- Throws:
NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
getAllNodeNames
Get all the IceGrid nodes currently registered.- Parameters:
current
- The Current object for the invocation.- Returns:
- The node names.
-
pingRegistry
Ping an IceGrid registry to see if it is active.- Parameters:
name
- The registry name.current
- The Current object for the invocation.- Returns:
- true if the registry ping succeeded, false otherwise.
- Throws:
RegistryNotExistException
- Raised if the registry doesn't exist.
-
getRegistryInfo
RegistryInfo getRegistryInfo(String name, Current current) throws RegistryNotExistException, RegistryUnreachableException Get the registry information for the registry with the given name.- Parameters:
name
- The registry name.current
- The Current object for the invocation.- Returns:
- The registry information.
- Throws:
RegistryNotExistException
- Raised if the registry doesn't exist.RegistryUnreachableException
- Raised if the registry could not be reached.
-
getRegistryAdmin
Get a proxy to the IceGrid registry's admin object.- Parameters:
name
- The registry namecurrent
- The Current object for the invocation.- Returns:
- A proxy to the IceGrid registry's admin object
- Throws:
RegistryNotExistException
- Raised if the registry doesn't exist.
-
shutdownRegistry
void shutdownRegistry(String name, Current current) throws RegistryNotExistException, RegistryUnreachableException Shutdown an IceGrid registry.- Parameters:
name
- The registry name.current
- The Current object for the invocation.- Throws:
RegistryNotExistException
- Raised if the registry doesn't exist.RegistryUnreachableException
- Raised if the registry could not be reached.
-
getAllRegistryNames
Get all the IceGrid registries currently registered.- Parameters:
current
- The Current object for the invocation.- Returns:
- The registry names.
-
shutdown
Shut down the IceGrid registry.- Parameters:
current
- The Current object for the invocation.
-
getSliceChecksums
Returns the checksums for the IceGrid Slice definitions.- Parameters:
current
- The Current object for the invocation.- Returns:
- A dictionary mapping Slice type ids to their checksums.
-
ice_ids
Description copied from interface:Object
Returns the Slice type IDs of the interfaces supported by this object. -
ice_id
Description copied from interface:Object
Returns the Slice type ID of the most-derived interface supported by this object. -
ice_staticId
Description copied from interface:Object
Returns the Slice type ID of the interface supported by this object.- Returns:
- The return value is always ::Ice::Object.
-