# Ice::Locator

## Overview

### interface Locator

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

#### Derived Classes and Interfaces

::IceGrid::Locator

## Operation Index

findObjectById
  Find an object by identity and return its proxy.
findAdapterById
  Find an adapter by id and return its proxy (a dummy direct proxy created by the adapter).
getRegistry
  Get the locator registry.

## Operations

### Object* findObjectById(Identity id) throws ObjectNotFoundException

Find an object by identity and return its proxy.

#### Parameters

id
  The identity.

#### Return Value

The proxy, or null if the object is not active.

#### Exceptions

ObjectNotFoundException
  Raised if the object cannot be found.

### Object* findAdapterById(string id) throws AdapterNotFoundException

Find an adapter by id and return its proxy (a dummy direct proxy created by the adapter).

#### Parameters

id
  The adapter id.

#### Return Value

The adapter proxy, or null if the adapter is not active.

#### Exceptions

AdapterNotFoundException
  Raised if the adapter cannot be found.

### LocatorRegistry* getRegistry()

Get the locator registry.

#### Return Value

The locator registry.