Interface AdminSession

All Superinterfaces:
Object, Session

public interface AdminSession extends Session
Represents an administrative session between an admin tool and an IceGrid registry.
See Also:
  • Method Details

    • keepAlive

      void keepAlive(Current current)
      Keeps the session alive.
      Parameters:
      current - The Current object of the incoming request.
    • getAdmin

      AdminPrx getAdmin(Current current)
      Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      A proxy to the IceGrid admin object. This proxy is never null.
    • getAdminCallbackTemplate

      ObjectPrx getAdminCallbackTemplate(Current current)
      Gets 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 of the incoming request.
      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
      Sets 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 of the incoming request.
      Throws:
      ObserverAlreadyRegisteredException - Thrown when 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
      Sets the observer identities that receive notifications when 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 of the incoming request.
      Throws:
      ObserverAlreadyRegisteredException - Thrown when an observer is already registered with this registry.
    • startUpdate

      int startUpdate(Current current) throws AccessDeniedException
      Acquires an exclusive lock to start updating the registry applications.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      The current serial.
      Throws:
      AccessDeniedException - Thrown when the exclusive lock can't be acquired. This might happen if the lock is currently acquired by another session.
    • finishUpdate

      void finishUpdate(Current current) throws AccessDeniedException
      Finishes updating the registry and releases the exclusive lock.
      Parameters:
      current - The Current object of the incoming request.
      Throws:
      AccessDeniedException - Thrown when the session doesn't hold the exclusive lock.
    • getReplicaName

      String getReplicaName(Current current)
      Gets the name of the registry replica hosting this session.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      The replica name of the registry.
    • openServerLog

      Opens a server log file for reading.
      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 beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      DeploymentException - Thrown when the server couldn't be deployed on the node.
      FileNotAvailableException - Thrown when the file can't be read.
      NodeUnreachableException - Thrown when the node is unreachable.
      ServerNotExistException - Thrown when the server doesn't exist.
    • openServerStdErr

      Opens a server stderr file for reading.
      Parameters:
      id - The server ID.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      DeploymentException - Thrown when the server couldn't be deployed on the node.
      FileNotAvailableException - Thrown when the file can't be read.
      NodeUnreachableException - Thrown when the node is unreachable.
      ServerNotExistException - Thrown when the server doesn't exist.
    • openServerStdOut

      Opens a server stdout file for reading.
      Parameters:
      id - The server id.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      DeploymentException - Thrown when the server couldn't be deployed on the node.
      FileNotAvailableException - Thrown when the file can't be read.
      NodeUnreachableException - Thrown when the node is unreachable.
      ServerNotExistException - Thrown when the server doesn't exist.
    • openNodeStdErr

      Opens a node stderr file for reading.
      Parameters:
      name - The node name.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      FileNotAvailableException - Thrown when the file can't be read.
      NodeNotExistException - Thrown when the node doesn't exist.
      NodeUnreachableException - Thrown when the node is unreachable.
    • openNodeStdOut

      Opens a node stdout file for reading.
      Parameters:
      name - The node name.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      FileNotAvailableException - Thrown when the file can't be read.
      NodeNotExistException - Thrown when the node doesn't exist.
      NodeUnreachableException - Thrown when the node is unreachable.
    • openRegistryStdErr

      Opens a registry stderr file for reading.
      Parameters:
      name - The registry name.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      FileNotAvailableException - Thrown when the file can't be read.
      RegistryNotExistException - Thrown when the registry doesn't exist.
      RegistryUnreachableException - Thrown when the registry is unreachable.
    • openRegistryStdOut

      Opens a registry stdout file for reading.
      Parameters:
      name - The registry name.
      count - Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.
      current - The Current object of the incoming request.
      Returns:
      An iterator to read the file. This proxy is never null.
      Throws:
      FileNotAvailableException - Thrown when the file can't be read.
      RegistryNotExistException - Thrown when the registry doesn't exist.
      RegistryUnreachableException - Thrown when the registry is unreachable.
    • ice_staticId

      static String ice_staticId()
      Gets the type ID of the associated Slice interface.
      Returns:
      the string "::IceGrid::AdminSession"
    • dispatch

      default CompletionStage<OutgoingResponse> dispatch(IncomingRequest request) throws UserException
      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 interface Object
      Specified by:
      dispatch in interface Session
      Parameters:
      request - the incoming request
      Returns:
      the outgoing response
      Throws:
      UserException - if a UserException is thrown, Ice will marshal it as the response payload.