Package com.zeroc.IceGrid
Interface AdminSession
Used by administrative clients to view,
update, and receive observer updates from the IceGrid
registry. Admin sessions are created either via the
Registry
object or via the registry admin SessionManager
object.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
Object.Ice_invokeResult
-
Method Summary
Modifier and TypeMethodDescriptionvoid
finishUpdate
(Current current) Finish updating the registry and release the exclusive lock.Get the admin interface.getAdminCallbackTemplate
(Current current) Get a "template" proxy for admin callback objects.getReplicaName
(Current current) Get the name of the registry replica hosting this session.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
Keep the session alive.openNodeStdErr
(String name, int count, Current current) Open the given node stderr file for reading.openNodeStdOut
(String name, int count, Current current) Open the given node stdout file for reading.openRegistryStdErr
(String name, int count, Current current) Open the given registry stderr file for reading.openRegistryStdOut
(String name, int count, Current current) Open the given registry stdout file for reading.openServerLog
(String id, String path, int count, Current current) Open the given server log file for reading.openServerStdErr
(String id, int count, Current current) Open the given server stderr file for reading.openServerStdOut
(String id, int count, Current current) Open the given server stdout file for reading.void
setObservers
(RegistryObserverPrx registryObs, NodeObserverPrx nodeObs, ApplicationObserverPrx appObs, AdapterObserverPrx adptObs, ObjectObserverPrx objObs, Current current) Set the observer proxies that receive notifications when the state of the registry or nodes changes.void
setObserversByIdentity
(Identity registryObs, Identity nodeObs, Identity appObs, Identity adptObs, Identity objObs, Current current) Set the observer identities that receive notifications the state of the registry or nodes changes.int
startUpdate
(Current current) Acquires an exclusive lock to start updating the registry applications.Methods inherited from interface com.zeroc.Ice.Object
ice_dispatch, ice_isA, ice_ping
-
Method Details
-
keepAlive
Keep the session alive. Clients should call this operation regularly to prevent the server from reaping the session.- Parameters:
current
- The Current object for the invocation.- See Also:
-
getAdmin
Get the admin interface. The admin object returned by this operation can only be accessed by the session.- Parameters:
current
- The Current object for the invocation.- Returns:
- The admin interface proxy.
-
getAdminCallbackTemplate
Get a "template" proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.- Parameters:
current
- The Current object for the invocation.- Returns:
- A template proxy. The returned proxy is null when the Admin session was established using Glacier2.
-
setObservers
void setObservers(RegistryObserverPrx registryObs, NodeObserverPrx nodeObs, ApplicationObserverPrx appObs, AdapterObserverPrx adptObs, ObjectObserverPrx objObs, Current current) throws ObserverAlreadyRegisteredException Set the observer proxies that receive notifications when the state of the registry or nodes changes.- Parameters:
registryObs
- The registry observer.nodeObs
- The node observer.appObs
- The application observer.adptObs
- The adapter observer.objObs
- The object observer.current
- The Current object for the invocation.- Throws:
ObserverAlreadyRegisteredException
- Raised if an observer is already registered with this registry.
-
setObserversByIdentity
void setObserversByIdentity(Identity registryObs, Identity nodeObs, Identity appObs, Identity adptObs, Identity objObs, Current current) throws ObserverAlreadyRegisteredException Set the observer identities that receive notifications the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.- Parameters:
registryObs
- The registry observer identity.nodeObs
- The node observer identity.appObs
- The application observer.adptObs
- The adapter observer.objObs
- The object observer.current
- The Current object for the invocation.- Throws:
ObserverAlreadyRegisteredException
- Raised if an observer is already registered with this registry.
-
startUpdate
Acquires an exclusive lock to start updating the registry applications.- Parameters:
current
- The Current object for the invocation.- Returns:
- The current serial.
- Throws:
AccessDeniedException
- Raised if the exclusive lock can't be acquired. This might happen if the lock is currently acquired by another session.
-
finishUpdate
Finish updating the registry and release the exclusive lock.- Parameters:
current
- The Current object for the invocation.- Throws:
AccessDeniedException
- Raised if the session doesn't hold the exclusive lock.
-
getReplicaName
Get the name of the registry replica hosting this session.- Parameters:
current
- The Current object for the invocation.- Returns:
- The replica name of the registry.
-
openServerLog
FileIteratorPrx openServerLog(String id, String path, int count, Current current) throws DeploymentException, FileNotAvailableException, NodeUnreachableException, ServerNotExistException Open the given server log file for reading. The file can be read with the returned file iterator.- Parameters:
id
- The server id.path
- The path of the log file. A log file can be opened only if it's declared in the server or service deployment descriptor.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.FileNotAvailableException
- Raised if the file can't be read.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
openServerStdErr
FileIteratorPrx openServerStdErr(String id, int count, Current current) throws DeploymentException, FileNotAvailableException, NodeUnreachableException, ServerNotExistException Open the given server stderr file for reading. The file can be read with the returned file iterator.- Parameters:
id
- The server id.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.FileNotAvailableException
- Raised if the file can't be read.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
openServerStdOut
FileIteratorPrx openServerStdOut(String id, int count, Current current) throws DeploymentException, FileNotAvailableException, NodeUnreachableException, ServerNotExistException Open the given server stdout file for reading. The file can be read with the returned file iterator.- Parameters:
id
- The server id.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
DeploymentException
- Raised if the server couldn't be deployed on the node.FileNotAvailableException
- Raised if the file can't be read.NodeUnreachableException
- Raised if the node could not be reached.ServerNotExistException
- Raised if the server doesn't exist.
-
openNodeStdErr
FileIteratorPrx openNodeStdErr(String name, int count, Current current) throws FileNotAvailableException, NodeNotExistException, NodeUnreachableException Open the given node stderr file for reading. The file can be read with the returned file iterator.- Parameters:
name
- The node name.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
FileNotAvailableException
- Raised if the file can't be read.NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
openNodeStdOut
FileIteratorPrx openNodeStdOut(String name, int count, Current current) throws FileNotAvailableException, NodeNotExistException, NodeUnreachableException Open the given node stdout file for reading. The file can be read with the returned file iterator.- Parameters:
name
- The node name.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
FileNotAvailableException
- Raised if the file can't be read.NodeNotExistException
- Raised if the node doesn't exist.NodeUnreachableException
- Raised if the node could not be reached.
-
openRegistryStdErr
FileIteratorPrx openRegistryStdErr(String name, int count, Current current) throws FileNotAvailableException, RegistryNotExistException, RegistryUnreachableException Open the given registry stderr file for reading. The file can be read with the returned file iterator.- Parameters:
name
- The registry name.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
FileNotAvailableException
- Raised if the file can't be read.RegistryNotExistException
- Raised if the registry doesn't exist.RegistryUnreachableException
- Raised if the registry could not be reached.
-
openRegistryStdOut
FileIteratorPrx openRegistryStdOut(String name, int count, Current current) throws FileNotAvailableException, RegistryNotExistException, RegistryUnreachableException Open the given registry stdout file for reading. The file can be read with the returned file iterator.- Parameters:
name
- The registry name.count
- Specifies where to start reading the file. If negative, the file is read from the begining. If 0 or positive, the file is read from the lastcount
lines.current
- The Current object for the invocation.- Returns:
- An iterator to read the file.
- Throws:
FileNotAvailableException
- Raised if the file can't be read.RegistryNotExistException
- Raised if the registry doesn't exist.RegistryUnreachableException
- Raised if the registry could not be reached.
-
ice_ids
Description copied from interface:Object
Returns the Slice type IDs of the interfaces supported by this object.- Specified by:
ice_ids
in interfaceObject
- Specified by:
ice_ids
in interfaceSession
- Parameters:
current
- TheCurrent
object for the invocation.- Returns:
- The Slice type IDs of the interfaces supported by this object, in base-to-derived
order. The first element of the returned array is always
::Ice::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.
-