//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.11
//
//
//
// Generated from file `Session.ice'
//
// Warning: do not edit this file.
//
//
//
export namespace IceGrid
{
abstract class SessionPrx extends Ice.ObjectPrx
{
/**
* Destroy the session. This is called automatically when the router is destroyed.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
*/
destroy(context?:Map):Ice.AsyncResult;
/**
* Keep the session alive. Clients should call this operation
* regularly to prevent the server from reaping the session.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
* @see Registry#getSessionTimeout
*/
keepAlive(context?:Map):Ice.AsyncResult;
/**
* Allocate an object. Depending on the allocation timeout, this
* operation might hang until the object is available or until the
* timeout is reached.
* @param id The identity of the object to allocate.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
* @see #setAllocationTimeout
* @see #releaseObject
*/
allocateObjectById(id:Ice.Identity, context?:Map):Ice.AsyncResult;
/**
* Allocate an object with the given type. Depending on the
* allocation timeout, this operation can block until an object
* becomes available or until the timeout is reached.
* @param type The type of the object.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
* @see #setAllocationTimeout
* @see #releaseObject
*/
allocateObjectByType(type:string, context?:Map):Ice.AsyncResult;
/**
* Release an object that was allocated using allocateObjectById or
* allocateObjectByType.
* @param id The identity of the object to release.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
*/
releaseObject(id:Ice.Identity, context?:Map):Ice.AsyncResult;
/**
* Set the allocation timeout. If no objects are available for an
* allocation request, a call to allocateObjectById or
* allocateObjectByType will block for the duration of this
* timeout.
* @param timeout The timeout in milliseconds.
* @param context The Context map to send with the invocation.
* @return The asynchronous result object for the invocation.
*/
setAllocationTimeout(timeout:number, context?:Map):Ice.AsyncResult;
/**
* Downcasts a proxy without confirming the target object's type via a remote invocation.
* @param prx The target proxy.
* @return A proxy with the requested type.
*/
static uncheckedCast(prx:Ice.ObjectPrx, facet?:string):SessionPrx;
/**
* Downcasts a proxy after confirming the target object's type via a remote invocation.
* @param prx The target proxy.
* @param facet A facet name.
* @param context The context map for the invocation.
* @return A proxy with the requested type and facet, or nil if the target proxy is nil or the target
* object does not support the requested type.
*/
static checkedCast(prx:Ice.ObjectPrx, facet?:string, contex?:Map):Ice.AsyncResult;
}
abstract class Session extends Ice.Object
{
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract destroy(current:Ice.Current):PromiseLike|void;
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract keepAlive(current:Ice.Current):PromiseLike|void;
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract allocateObjectById(id:Ice.Identity, current:Ice.Current):PromiseLike|Ice.ObjectPrx;
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract allocateObjectByType(type:string, current:Ice.Current):PromiseLike|Ice.ObjectPrx;
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract releaseObject(id:Ice.Identity, current:Ice.Current):PromiseLike|void;
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client SessionManager
* object.
* @param current The Current object for the invocation.
* @return The result or a promise like object that will be resolved with the result of the invocation.
* @see Registry
*/
abstract setAllocationTimeout(timeout:number, current:Ice.Current):PromiseLike|void;
/**
* Obtains the Slice type ID of this type.
* @return The return value is always "::IceGrid::Session".
*/
static ice_staticId():string;
}
}