import {Ice} from 'ice'; import '../Ice/BuiltinSequences'; import '../Ice/Identity'; import {Glacier2} from '../Glacier2/SSLInfo'; declare module './Glacier2.ns' { namespace Glacier2 { /** * This exception is raised if an attempt to create a new session failed. */ class CannotCreateSessionException extends Ice.UserException { constructor(reason?: string); /** * The reason why session creation has failed. */ reason: string; } /** * A client-visible session object, which is tied to the lifecycle of a {@link Router}. * * @see Router * @see SessionManager */ abstract class Session extends Ice.Object { /** * Destroy the session. This is called automatically when the router is destroyed. */ abstract destroy(current: Ice.Current): Ice.OperationResult; } /** * A client-visible session object, which is tied to the lifecycle of a {@link Router}. * * @see Router * @see SessionManager */ class SessionPrx extends Ice.ObjectPrx { /** * Destroy the session. This is called automatically when the router is destroyed. */ destroy(ctx?: Ice.Context): Ice.AsyncResult; } /** * An object for managing the set of identity constraints for specific * parts of object identity on a * {@link Session}. * * @see Session * @see SessionControl */ abstract class StringSet extends Ice.Object { /** * Add a sequence of strings to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of strings to be added. */ abstract add( additions: Ice.StringSeq, current: Ice.Current, ): Ice.OperationResult; /** * Remove a sequence of strings from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of strings to be removed. */ abstract remove( deletions: Ice.StringSeq, current: Ice.Current, ): Ice.OperationResult; /** * Returns a sequence of strings describing the constraints in this * set. * * @return The sequence of strings for this set. */ abstract get(current: Ice.Current): Ice.OperationResult; } /** * An object for managing the set of identity constraints for specific * parts of object identity on a * {@link Session}. * * @see Session * @see SessionControl */ class StringSetPrx extends Ice.ObjectPrx { /** * Add a sequence of strings to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of strings to be added. */ add(additions: Ice.StringSeq, ctx?: Ice.Context): Ice.AsyncResult; /** * Remove a sequence of strings from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of strings to be removed. */ remove( deletions: Ice.StringSeq, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Returns a sequence of strings describing the constraints in this * set. * * @return The sequence of strings for this set. */ get(ctx?: Ice.Context): Ice.AsyncResult; } /** * An object for managing the set of object identity constraints on a * {@link Session}. * * @see Session * @see SessionControl */ abstract class IdentitySet extends Ice.Object { /** * Add a sequence of Ice identities to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of Ice identities to be added. */ abstract add( additions: Ice.IdentitySeq, current: Ice.Current, ): Ice.OperationResult; /** * Remove a sequence of identities from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of Ice identities to be removed. */ abstract remove( deletions: Ice.IdentitySeq, current: Ice.Current, ): Ice.OperationResult; /** * Returns a sequence of identities describing the constraints in this * set. * * @return The sequence of Ice identities for this set. */ abstract get(current: Ice.Current): Ice.OperationResult; } /** * An object for managing the set of object identity constraints on a * {@link Session}. * * @see Session * @see SessionControl */ class IdentitySetPrx extends Ice.ObjectPrx { /** * Add a sequence of Ice identities to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of Ice identities to be added. */ add(additions: Ice.IdentitySeq, ctx?: Ice.Context): Ice.AsyncResult; /** * Remove a sequence of identities from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of Ice identities to be removed. */ remove( deletions: Ice.IdentitySeq, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Returns a sequence of identities describing the constraints in this * set. * * @return The sequence of Ice identities for this set. */ get(ctx?: Ice.Context): Ice.AsyncResult; } /** * An administrative session control object, which is tied to the * lifecycle of a {@link Session}. * * @see Session */ abstract class SessionControl extends Ice.Object { /** * Access the object that manages the allowable categories * for object identities for this session. * * @return A StringSet object. */ abstract categories( current: Ice.Current, ): Ice.OperationResult; /** * Access the object that manages the allowable adapter identities * for objects for this session. * * @return A StringSet object. */ abstract adapterIds( current: Ice.Current, ): Ice.OperationResult; /** * Access the object that manages the allowable object identities * for this session. * * @return An IdentitySet object. */ abstract identities( current: Ice.Current, ): Ice.OperationResult; /** * Get the session timeout. * * @return The timeout. */ abstract getSessionTimeout( current: Ice.Current, ): Ice.OperationResult; /** * Destroy the associated session. */ abstract destroy(current: Ice.Current): Ice.OperationResult; } /** * An administrative session control object, which is tied to the * lifecycle of a {@link Session}. * * @see Session */ class SessionControlPrx extends Ice.ObjectPrx { /** * Access the object that manages the allowable categories * for object identities for this session. * * @return A StringSet object. */ categories(ctx?: Ice.Context): Ice.AsyncResult; /** * Access the object that manages the allowable adapter identities * for objects for this session. * * @return A StringSet object. */ adapterIds(ctx?: Ice.Context): Ice.AsyncResult; /** * Access the object that manages the allowable object identities * for this session. * * @return An IdentitySet object. */ identities(ctx?: Ice.Context): Ice.AsyncResult; /** * Get the session timeout. * * @return The timeout. */ getSessionTimeout(ctx?: Ice.Context): Ice.AsyncResult; /** * Destroy the associated session. */ destroy(ctx?: Ice.Context): Ice.AsyncResult; } /** * The session manager for username/password authenticated users that * is responsible for managing {@link Session} objects. New session objects * are created by the {@link Router} object calling on an application-provided * session manager. If no session manager is provided by the application, * no client-visible sessions are passed to the client. * * @see Router * @see Session */ abstract class SessionManager extends Ice.Object { /** * Create a new session. * * @param userId The user id for the session. * * @param control A proxy to the session control object. * * @return A proxy to the newly created session. * * @throws CannotCreateSessionException Raised if the session * cannot be created. */ abstract create( userId: string, control: SessionControlPrx | null, current: Ice.Current, ): Ice.OperationResult; } /** * The session manager for username/password authenticated users that * is responsible for managing {@link Session} objects. New session objects * are created by the {@link Router} object calling on an application-provided * session manager. If no session manager is provided by the application, * no client-visible sessions are passed to the client. * * @see Router * @see Session */ class SessionManagerPrx extends Ice.ObjectPrx { /** * Create a new session. * * @param userId The user id for the session. * * @param control A proxy to the session control object. * * @return A proxy to the newly created session. * * @throws CannotCreateSessionException Raised if the session * cannot be created. */ create( userId: string, control: SessionControlPrx | null, ctx?: Ice.Context, ): Ice.AsyncResult; } /** * The session manager for SSL authenticated users that is * responsible for managing {@link Session} objects. New session objects are * created by the {@link Router} object calling on an application-provided * session manager. If no session manager is provided by the * application, no client-visible sessions are passed to the client. * * @see Router * @see Session */ abstract class SSLSessionManager extends Ice.Object { /** * Create a new session. * * @param info The SSL info. * * @param control A proxy to the session control object. * * @return A proxy to the newly created session. * * @throws CannotCreateSessionException Raised if the session * cannot be created. */ abstract create( info: SSLInfo, control: SessionControlPrx | null, current: Ice.Current, ): Ice.OperationResult; } /** * The session manager for SSL authenticated users that is * responsible for managing {@link Session} objects. New session objects are * created by the {@link Router} object calling on an application-provided * session manager. If no session manager is provided by the * application, no client-visible sessions are passed to the client. * * @see Router * @see Session */ class SSLSessionManagerPrx extends Ice.ObjectPrx { /** * Create a new session. * * @param info The SSL info. * * @param control A proxy to the session control object. * * @return A proxy to the newly created session. * * @throws CannotCreateSessionException Raised if the session * cannot be created. */ create( info: SSLInfo, control: SessionControlPrx | null, ctx?: Ice.Context, ): Ice.AsyncResult; } } } export {Glacier2} from './Glacier2.ns';