Ice Reference Documentation
<<< Previous | Slice Documentation | Next >>>

# `IceGrid::Session`

## Overview

    interface Session
        extends
    	::Glacier2::Session

### Operation Index

`addApplication`

  Add an application.

`finishUpdate`

  Finish to update the registry and release the exclusive lock.

`getAdmin`

  Get the admin interface.

`getQuery`

  Get the query interface.

`getTimeout`

  Get the session timeout configure for the node.

`keepAlive`

  Keep alive the session.

`removeApplication`

  Update an application.

`setObservers`

  Set the proxies of the observer objects that will receive notifications from the servers when the state of the registry or nodes changes.

`setObserversByIdentity`

  Set the identities of the observer objects that will receive notifications from the servers when the state of the registry or nodes changes.

`startUpdate`

  Acquires to registry exclusive lock to start updating the registry applications.

`syncApplication`

  Update an application.

`updateApplication`

  Update an application.

## `addApplication`

    void addApplication(ApplicationDescriptor application)
        throws
    	AccessDeniedException,
    	DeploymentException;

Add an application. This method must be called to update the registry applications using the lock mechanism.

### Exceptions

`AccessDeniedException`

  Raised if the session doesn't hold the exclusive lock.

## `finishUpdate`

    void finishUpdate()
        throws
    	AccessDeniedException;

Finish to update the registry and release the exclusive lock.

### Exceptions

`AccessDeniedException`

  Raised if the session doesn't hold the exclusive lock.

## `getAdmin`

    Admin* getAdmin();

Get the admin interface.

## `getQuery`

    Query* getQuery();

Get the query interface.

## `getTimeout`

    int getTimeout();

Get the session timeout configure for the node.

## `keepAlive`

    void keepAlive();

Keep alive the session. Clients should call this method regularily to ensure the server won't reap the session.

## `removeApplication`

    void removeApplication(string name)
        throws
    	AccessDeniedException,
    	ApplicationNotExistException;

Update an application. This method must be called to update the registry applications using the lock mechanism.

### Exceptions

`AccessDeniedException`

  Raised if the session doesn't hold the exclusive lock.

## `setObservers`

    void setObservers(RegistryObserver* registryObs,
        NodeObserver* nodeObs);

Set the proxies of the observer objects that will receive notifications from the servers when the state of the registry or nodes changes.

### Parameters

`registryObs`

  The registry observer.

`nodeObs`

  The node observer.

## `setObserversByIdentity`

    void setObserversByIdentity(::Ice::Identity registryObs,
        ::Ice::Identity nodeObs);

Set the identities of the observer objects that will receive notifications from the servers when the state of the registry or nodes changes. This method should be used by clients which are using a bi-directional connection to communicate with the session.

### Parameters

`registryObs`

  The registry observer identity.

`nodeObs`

  The node observer identity.

## `startUpdate`

    int startUpdate()
        throws
    	AccessDeniedException;

Acquires to registry exclusive lock to start updating the registry applications.

### Return Value

The current serial.

### Exceptions

`AccessDeniedException`

  Raised if the exclusive lock can't be acquired. This might be because it's already acquired by another session.

## `syncApplication`

    void syncApplication(ApplicationDescriptor app)
        throws
    	AccessDeniedException,
    	DeploymentException,
    	ApplicationNotExistException;

Update an application. This method must be called to update the registry applications using the lock mechanism.

### Exceptions

`AccessDeniedException`

  Raised if the session doesn't hold the exclusive lock.

## `updateApplication`

    void updateApplication(ApplicationUpdateDescriptor update)
        throws
    	AccessDeniedException,
    	DeploymentException,
    	ApplicationNotExistException;

Update an application. This method must be called to update the registry applications using the lock mechanism.

### Exceptions

`AccessDeniedException`

  Raised if the session doesn't hold the exclusive lock.

<<< Previous | Home | Next >>>
`IceGrid::ServiceInstanceDescriptor` | Up | `IceGrid::SessionManager`