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 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 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 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