- All Superinterfaces:
Object
Provides administrative access to an IceGrid deployment.
-
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) Adds an application to IceGrid.void
Adds an object to the object registry.void
addObjectWithType
(ObjectPrx obj, String type, Current current) Adds an object to the object registry and explicitly specifies its type.default CompletionStage<OutgoingResponse>
dispatch
(IncomingRequest request) Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.void
enableServer
(String id, boolean enabled, Current current) Enables or disables a server.getAdapterInfo
(String id, Current current) Gets adapter information for the replica group or adapter with the given ID.String[]
getAllAdapterIds
(Current current) Gets the IDs of all adapters registered with IceGrid.String[]
getAllApplicationNames
(Current current) Gets all the IceGrid applications currently registered.String[]
getAllNodeNames
(Current current) Gets the names of all IceGrid nodes currently registered.getAllObjectInfos
(String expr, Current current) Gets the object info of all the registered objects whose stringified identities match the given expression.String[]
getAllRegistryNames
(Current current) Gets the names of all the IceGrid registries currently registered.String[]
getAllServerIds
(Current current) Gets the IDs of all the servers registered with IceGrid.getApplicationInfo
(String name, Current current) Gets an application descriptor.getDefaultApplicationDescriptor
(Current current) Gets the default application descriptor.getNodeAdmin
(String name, Current current) Gets a proxy to the admin object of an IceGrid node.getNodeHostname
(String name, Current current) Get the hostname of a node.getNodeInfo
(String name, Current current) Gets the node information of a node.getNodeLoad
(String name, Current current) Gets the load averages of a node.int
getNodeProcessorSocketCount
(String name, Current current) Gets the number of physical processor sockets in the computer where an IceGrid node is deployed.getObjectInfo
(Identity id, Current current) Gets the object info for the object.getObjectInfosByType
(String type, Current current) Gets the object info of all the registered objects with a given type.getRegistryAdmin
(String name, Current current) Gets a proxy to the admin object of an IceGrid registry.getRegistryInfo
(String name, Current current) Gets the registry information of an IceGrid registry.getServerAdmin
(String id, Current current) Gets a proxy to the admin object of a server.getServerAdminCategory
(Current current) Gets the category for server admin objects.getServerInfo
(String id, Current current) Gets information about a server.int
getServerPid
(String id, Current current) Gets the system process ID of a server.getServerState
(String id, Current current) Gets the state of a server.static String
Gets the type ID of the associated Slice interface.void
instantiateServer
(String application, String node, ServerInstanceDescriptor desc, Current current) Instantiates a server template.boolean
isServerEnabled
(String id, Current current) Checks if the server is enabled or disabled.boolean
Pings an IceGrid node to see if it is active.boolean
pingRegistry
(String name, Current current) Pings an IceGrid registry to see if it is active.void
removeAdapter
(String id, Current current) Removes the adapter with the given ID.void
removeApplication
(String name, Current current) Removes an application from IceGrid.void
removeObject
(Identity id, Current current) Removes an object from the object registry.void
sendSignal
(String id, String signal, Current current) Sends a signal to a server.void
Shuts down the IceGrid registry.void
shutdownNode
(String name, Current current) Shuts down an IceGrid node.void
shutdownRegistry
(String name, Current current) Shuts down an IceGrid registry.startServerAsync
(String id, Current current) Starts a server and waits for its activation.stopServerAsync
(String id, Current current) Stops a server.void
syncApplication
(ApplicationDescriptor descriptor, Current current) Synchronizes a deployed application.void
syncApplicationWithoutRestart
(ApplicationDescriptor descriptor, Current current) Synchronizes a deployed application.void
updateApplication
(ApplicationUpdateDescriptor descriptor, Current current) Updates a deployed application.void
updateApplicationWithoutRestart
(ApplicationUpdateDescriptor descriptor, Current current) Updates a deployed application.void
updateObject
(ObjectPrx obj, Current current) Updates an object in the object registry.
-
Method Details
-
addApplication
void addApplication(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException Adds an application to IceGrid.- Parameters:
descriptor
- The application descriptor.current
- The Current object of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.DeploymentException
- Thrown when the application deployment failed.
-
syncApplication
void syncApplication(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException, ApplicationNotExistException Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor.- Parameters:
descriptor
- The new application descriptor.current
- The Current object of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
updateApplication
void updateApplication(ApplicationUpdateDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException, ApplicationNotExistException Updates a deployed application.- Parameters:
descriptor
- The update descriptor.current
- The Current object of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
syncApplicationWithoutRestart
void syncApplicationWithoutRestart(ApplicationDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException, ApplicationNotExistException Synchronizes a deployed application. This operation replaces the current descriptor with a 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 of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
updateApplicationWithoutRestart
void updateApplicationWithoutRestart(ApplicationUpdateDescriptor descriptor, Current current) throws AccessDeniedException, DeploymentException, ApplicationNotExistException Updates a deployed application. This operation succeeds only when 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 of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
removeApplication
void removeApplication(String name, Current current) throws AccessDeniedException, DeploymentException, ApplicationNotExistException Removes an application from IceGrid.- Parameters:
name
- The application name.current
- The Current object of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
instantiateServer
void instantiateServer(String application, String node, ServerInstanceDescriptor desc, Current current) throws AccessDeniedException, ApplicationNotExistException, DeploymentException Instantiates a server template.- 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 of the incoming request.- Throws:
AccessDeniedException
- Thrown when the session doesn't hold the exclusive lock or when another session is holding the lock.ApplicationNotExistException
- Thrown when the application doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
getApplicationInfo
ApplicationInfo getApplicationInfo(String name, Current current) throws ApplicationNotExistException Gets an application descriptor.- Parameters:
name
- The application name.current
- The Current object of the incoming request.- Returns:
- The application descriptor.
- Throws:
ApplicationNotExistException
- Thrown when the application doesn't exist.
-
getDefaultApplicationDescriptor
Gets the default application descriptor.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The default application descriptor.
- Throws:
DeploymentException
- Thrown when the default application descriptor is invalid or unreachable.
-
getAllApplicationNames
Gets all the IceGrid applications currently registered.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The application names.
-
getServerInfo
Gets information about a server.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
- The server information.
- Throws:
ServerNotExistException
- Thrown when the server doesn't exist.
-
getServerState
ServerState getServerState(String id, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException Gets the state of a server.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
- The server state.
- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
getServerPid
int getServerPid(String id, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException Gets the system process ID of a server. The process ID is operating system dependent.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
- The process ID.
- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
getServerAdminCategory
Gets 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 of the incoming request.- Returns:
- The category for server admin objects.
-
getServerAdmin
ObjectPrx getServerAdmin(String id, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException Gets a proxy to the admin object of a server.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
- A proxy to the admin object of the server. This proxy is never null.
- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
enableServer
void enableServer(String id, boolean enabled, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException Enables or disables 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 of the incoming request.- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
isServerEnabled
boolean isServerEnabled(String id, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException Checks if the server is enabled or disabled.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
true
if the server is enabled,false
otherwise.- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
startServerAsync
CompletionStage<Void> startServerAsync(String id, Current current) throws ServerNotExistException, ServerStartException, NodeUnreachableException, DeploymentException Starts a server and waits for its activation.- Parameters:
id
- The server id.current
- The Current object of the incoming request.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.ServerStartException
- Thrown when the server startup failed.
-
stopServerAsync
CompletionStage<Void> stopServerAsync(String id, Current current) throws ServerNotExistException, ServerStopException, NodeUnreachableException, DeploymentException Stops a server.- Parameters:
id
- The server ID.current
- The Current object of the incoming request.- Returns:
- A completion stage that the servant will complete when the invocation completes.
- Throws:
DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.ServerStopException
- Thrown when the server stop failed.
-
sendSignal
void sendSignal(String id, String signal, Current current) throws ServerNotExistException, NodeUnreachableException, DeploymentException, BadSignalException Sends a signal to a server.- Parameters:
id
- The server ID.signal
- The signal, for example SIGTERM or 15.current
- The Current object of the incoming request.- Throws:
BadSignalException
- Thrown when the signal is not recognized by the target server.DeploymentException
- Thrown when the deployment of the server failed.NodeUnreachableException
- Thrown when the node is unreachable.ServerNotExistException
- Thrown when the server doesn't exist.
-
getAllServerIds
Gets the IDs of all the servers registered with IceGrid.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The server IDs.
-
getAdapterInfo
Gets adapter information for the replica group or adapter with the given ID.- Parameters:
id
- The adapter or replica group ID.current
- The Current object of the incoming request.- Returns:
- A sequence of AdapterInfo. If
id
refers to an adapter, this sequence contains a single element. Ifid
refers to a replica group, this sequence contains adapter information for each member of the replica group. - Throws:
AdapterNotExistException
- Thrown when the adapter or replica group doesn't exist.
-
removeAdapter
Removes the adapter with the given ID.- Parameters:
id
- The adapter ID.current
- The Current object of the incoming request.- Throws:
AdapterNotExistException
- Thrown when the adapter doesn't exist.DeploymentException
- Thrown when the application deployment failed.
-
getAllAdapterIds
Gets the IDs of all adapters registered with IceGrid.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The adapter IDs.
-
addObject
Adds an object to the object registry. IceGrid gets the object type by callingice_id
onobj
. The object must be reachable.- Parameters:
obj
- A proxy to the object. This proxy is never null.current
- The Current object of the incoming request.- Throws:
DeploymentException
- Thrown when the object can't be added.ObjectExistsException
- Thrown when the object is already registered.
-
updateObject
void updateObject(ObjectPrx obj, Current current) throws ObjectNotRegisteredException, DeploymentException Updates 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
- A proxy to the object. This proxy is never null.current
- The Current object of the incoming request.- Throws:
DeploymentException
- Thrown when the object can't be updated.ObjectNotRegisteredException
- Thrown when the object isn't registered with the registry.
-
addObjectWithType
void addObjectWithType(ObjectPrx obj, String type, Current current) throws ObjectExistsException, DeploymentException Adds an object to the object registry and explicitly specifies its type.- Parameters:
obj
- The object to be added to the registry. The proxy is never null.type
- The type name.current
- The Current object of the incoming request.- Throws:
DeploymentException
- Thrown when the application deployment failed.ObjectExistsException
- Thrown when the object is already registered.
-
removeObject
void removeObject(Identity id, Current current) throws ObjectNotRegisteredException, DeploymentException Removes 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 remove.current
- The Current object of the incoming request.- Throws:
DeploymentException
- Thrown when the object can't be removed.ObjectNotRegisteredException
- Thrown when the object isn't registered with the registry.
-
getObjectInfo
Gets the object info for the object.- Parameters:
id
- The identity of the object.current
- The Current object of the incoming request.- Returns:
- The object info.
- Throws:
ObjectNotRegisteredException
- Thrown when the object isn't registered with the registry.
-
getObjectInfosByType
Gets the object info of all the registered objects with a given type.- Parameters:
type
- The type name.current
- The Current object of the incoming request.- Returns:
- The object infos.
-
getAllObjectInfos
Gets 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 of the incoming request.- Returns:
- All the object infos with a stringified identity matching the given expression.
-
pingNode
Pings an IceGrid node to see if it is active.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Returns:
true
if the node ping succeeded,false
otherwise.- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.
-
getNodeLoad
LoadInfo getNodeLoad(String name, Current current) throws NodeNotExistException, NodeUnreachableException Gets the load averages of a node.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Returns:
- The node load information.
- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
getNodeInfo
NodeInfo getNodeInfo(String name, Current current) throws NodeNotExistException, NodeUnreachableException Gets the node information of a node.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Returns:
- The node information.
- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
getNodeAdmin
ObjectPrx getNodeAdmin(String name, Current current) throws NodeNotExistException, NodeUnreachableException Gets a proxy to the admin object of an IceGrid node.- Parameters:
name
- The IceGrid node name.current
- The Current object of the incoming request.- Returns:
- A proxy to the IceGrid node's admin object. This proxy is never null.
- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
getNodeProcessorSocketCount
int getNodeProcessorSocketCount(String name, Current current) throws NodeNotExistException, NodeUnreachableException Gets the number of physical processor sockets in the computer where an IceGrid node is deployed. Note that this operation returns 1 on operating systems where this can't be automatically determined and where theIceGrid.Node.ProcessorSocketCount
property for the node is not set.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Returns:
- The number of processor sockets or 1 if the number of sockets can't be determined.
- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
shutdownNode
void shutdownNode(String name, Current current) throws NodeNotExistException, NodeUnreachableException Shuts down an IceGrid node.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
getNodeHostname
String getNodeHostname(String name, Current current) throws NodeNotExistException, NodeUnreachableException Get the hostname of a node.- Parameters:
name
- The node name.current
- The Current object of the incoming request.- Returns:
- The node hostname.
- Throws:
NodeNotExistException
- Thrown when the node doesn't exist.NodeUnreachableException
- Thrown when the node is unreachable.
-
getAllNodeNames
Gets the names of all IceGrid nodes currently registered.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The node names.
-
pingRegistry
Pings an IceGrid registry to see if it is active.- Parameters:
name
- The registry name.current
- The Current object of the incoming request.- Returns:
true
if the registry ping succeeded,false
otherwise.- Throws:
RegistryNotExistException
- Thrown when the registry doesn't exist.
-
getRegistryInfo
RegistryInfo getRegistryInfo(String name, Current current) throws RegistryNotExistException, RegistryUnreachableException Gets the registry information of an IceGrid registry.- Parameters:
name
- The registry name.current
- The Current object of the incoming request.- Returns:
- The registry information.
- Throws:
RegistryNotExistException
- Thrown when the registry doesn't exist.RegistryUnreachableException
- Thrown when the registry is unreachable.
-
getRegistryAdmin
Gets a proxy to the admin object of an IceGrid registry.- Parameters:
name
- The registry name.current
- The Current object of the incoming request.- Returns:
- A proxy to the admin object of an IceGrid registry. This proxy is never null.
- Throws:
RegistryNotExistException
- Thrown when the registry doesn't exist.
-
shutdownRegistry
void shutdownRegistry(String name, Current current) throws RegistryNotExistException, RegistryUnreachableException Shuts down an IceGrid registry.- Parameters:
name
- The registry name.current
- The Current object of the incoming request.- Throws:
RegistryNotExistException
- Thrown when the registry doesn't exist.RegistryUnreachableException
- Thrown when the registry is unreachable.
-
getAllRegistryNames
Gets the names of all the IceGrid registries currently registered.- Parameters:
current
- The Current object of the incoming request.- Returns:
- The registry names.
-
shutdown
Shuts down the IceGrid registry.- Parameters:
current
- The Current object of the incoming request.
-
ice_staticId
Gets the type ID of the associated Slice interface.- Returns:
- the string "::IceGrid::Admin"
-
dispatch
Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.- Specified by:
dispatch
in interfaceObject
- Parameters:
request
- the incoming request- Returns:
- the outgoing response
- Throws:
UserException
- if aUserException
is thrown, Ice will marshal it as the response payload.
-