import {Ice} from 'ice'; import '../Ice/Identity'; import '../Ice/Process'; declare module './Ice.ns' { namespace Ice { /** * This exception is raised if an adapter cannot be found. */ class AdapterNotFoundException extends Ice.UserException {} /** * This exception is raised if the replica group provided by the * server is invalid. */ class InvalidReplicaGroupIdException extends Ice.UserException {} /** * This exception is raised if a server tries to set endpoints for * an adapter that is already active. */ class AdapterAlreadyActiveException extends Ice.UserException {} /** * This exception is raised if an object cannot be found. */ class ObjectNotFoundException extends Ice.UserException {} /** * This exception is raised if a server cannot be found. */ class ServerNotFoundException extends Ice.UserException {} /** * The Ice locator interface. This interface is used by clients to * lookup adapters and objects. It is also used by servers to get the * locator registry proxy. * *

The {@link Locator} interface is intended to be used by * Ice internals and by locator implementations. Regular user code * should not attempt to use any functionality of this interface * directly. */ abstract class Locator extends Ice.Object { /** * Find an object by identity and return a proxy that contains * the adapter ID or endpoints which can be used to access the * object. * * @param id The identity. * * @return The proxy, or null if the object is not active. * * @throws ObjectNotFoundException Raised if the object cannot * be found. */ abstract findObjectById( id: Ice.Identity, current: Ice.Current, ): Ice.OperationResult; /** * Find an adapter by id and return a proxy that contains * its endpoints. * * @param id The adapter id. * * @return The adapter proxy, or null if the adapter is not active. * * @throws AdapterNotFoundException Raised if the adapter cannot be * found. */ abstract findAdapterById( id: string, current: Ice.Current, ): Ice.OperationResult; /** * Get the locator registry. * * @return The locator registry. */ abstract getRegistry( current: Ice.Current, ): Ice.OperationResult; } /** * The Ice locator interface. This interface is used by clients to * lookup adapters and objects. It is also used by servers to get the * locator registry proxy. * *

The {@link Locator} interface is intended to be used by * Ice internals and by locator implementations. Regular user code * should not attempt to use any functionality of this interface * directly. */ class LocatorPrx extends Ice.ObjectPrx { /** * Find an object by identity and return a proxy that contains * the adapter ID or endpoints which can be used to access the * object. * * @param id The identity. * * @return The proxy, or null if the object is not active. * * @throws ObjectNotFoundException Raised if the object cannot * be found. */ findObjectById( id: Ice.Identity, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Find an adapter by id and return a proxy that contains * its endpoints. * * @param id The adapter id. * * @return The adapter proxy, or null if the adapter is not active. * * @throws AdapterNotFoundException Raised if the adapter cannot be * found. */ findAdapterById( id: string, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Get the locator registry. * * @return The locator registry. */ getRegistry( ctx?: Ice.Context, ): Ice.AsyncResult; } /** * The Ice locator registry interface. This interface is used by * servers to register adapter endpoints with the locator. * *

The {@link LocatorRegistry} interface is intended to be used * by Ice internals and by locator implementations. Regular user * code should not attempt to use any functionality of this interface * directly. */ abstract class LocatorRegistry extends Ice.Object { /** * Set the adapter endpoints with the locator registry. * * @param id The adapter id. * * @param proxy The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows * registered adapters to set their active proxy and the * adapter is not registered with the locator. * * @throws AdapterAlreadyActiveException Raised if an adapter with the same * id is already active. */ abstract setAdapterDirectProxy( id: string, proxy: Ice.ObjectPrx | null, current: Ice.Current, ): Ice.OperationResult; /** * Set the adapter endpoints with the locator registry. * * @param adapterId The adapter id. * * @param replicaGroupId The replica group id. * * @param p The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows registered adapters to * set their active proxy and the adapter is not registered with * the locator. * * @throws AdapterAlreadyActiveException Raised if an adapter with the same * id is already active. * * @throws InvalidReplicaGroupIdException Raised if the given * replica group doesn't match the one registered with the * locator registry for this object adapter. */ abstract setReplicatedAdapterDirectProxy( adapterId: string, replicaGroupId: string, p: Ice.ObjectPrx | null, current: Ice.Current, ): Ice.OperationResult; /** * Set the process proxy for a server. * * @param id The server id. * * @param proxy The process proxy. * * @throws ServerNotFoundException Raised if the server cannot * be found. */ abstract setServerProcessProxy( id: string, proxy: ProcessPrx | null, current: Ice.Current, ): Ice.OperationResult; } /** * The Ice locator registry interface. This interface is used by * servers to register adapter endpoints with the locator. * *

The {@link LocatorRegistry} interface is intended to be used * by Ice internals and by locator implementations. Regular user * code should not attempt to use any functionality of this interface * directly. */ class LocatorRegistryPrx extends Ice.ObjectPrx { /** * Set the adapter endpoints with the locator registry. * * @param id The adapter id. * * @param proxy The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows * registered adapters to set their active proxy and the * adapter is not registered with the locator. * * @throws AdapterAlreadyActiveException Raised if an adapter with the same * id is already active. */ setAdapterDirectProxy( id: string, proxy: Ice.ObjectPrx | null, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Set the adapter endpoints with the locator registry. * * @param adapterId The adapter id. * * @param replicaGroupId The replica group id. * * @param p The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows registered adapters to * set their active proxy and the adapter is not registered with * the locator. * * @throws AdapterAlreadyActiveException Raised if an adapter with the same * id is already active. * * @throws InvalidReplicaGroupIdException Raised if the given * replica group doesn't match the one registered with the * locator registry for this object adapter. */ setReplicatedAdapterDirectProxy( adapterId: string, replicaGroupId: string, p: Ice.ObjectPrx | null, ctx?: Ice.Context, ): Ice.AsyncResult; /** * Set the process proxy for a server. * * @param id The server id. * * @param proxy The process proxy. * * @throws ServerNotFoundException Raised if the server cannot * be found. */ setServerProcessProxy( id: string, proxy: ProcessPrx | null, ctx?: Ice.Context, ): Ice.AsyncResult; } /** * This inferface should be implemented by services implementing the * Ice::Locator interface. It should be advertised through an Ice * object with the identity `Ice/LocatorFinder'. This allows clients * to retrieve the locator proxy with just the endpoint information of * the service. */ abstract class LocatorFinder extends Ice.Object { /** * Get the locator proxy implemented by the process hosting this * finder object. The proxy might point to several replicas. * * @return The locator proxy. */ abstract getLocator( current: Ice.Current, ): Ice.OperationResult; } /** * This inferface should be implemented by services implementing the * Ice::Locator interface. It should be advertised through an Ice * object with the identity `Ice/LocatorFinder'. This allows clients * to retrieve the locator proxy with just the endpoint information of * the service. */ class LocatorFinderPrx extends Ice.ObjectPrx { /** * Get the locator proxy implemented by the process hosting this * finder object. The proxy might point to several replicas. * * @return The locator proxy. */ getLocator(ctx?: Ice.Context): Ice.AsyncResult; } } } export {Ice} from './Ice.ns';