---
title: "Locator Semantics for Servers"
url: https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-servers
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Locator Semantics for Servers

This page is written for C++, C#, Java, Python, and Swift.

A location service must know the endpoints of any [object adapter](https://docs.zeroc.com/ice/3.8/runtime/dispatch.md) whose adapter ID can be used in an indirect proxy. For example, suppose a client uses the following proxy:

```text
Object1@PublicAdapter
```

The communicator in the client includes the adapter ID `PublicAdapter` in its [locate request](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients.md) and expects to receive the associated endpoints. The only way the location service can know these endpoints is if it is given them. When you consider that an object adapter's endpoints may not specify fixed ports, and therefore the endpoint addresses may change each time the object adapter is activated, it is clear that the best source of endpoint information is the object adapter itself. As a result, an object adapter that is [properly configured](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-configuration-for-a-server.md) registers its adapter ID, its replica group ID when it has one, and its [published endpoints](https://docs.zeroc.com/ice/3.8/runtime/dispatch/object-adapter-endpoints.md) with the locator registry during activation. The locator registry is an `Ice::LocatorRegistry` whose proxy the object adapter obtains by calling `getRegistry` on the locator.

## Registering and Unregistering Endpoints

An object adapter registers with the locator registry when it has an adapter ID and a locator, and publishes at least one endpoint. It registers the first time you call `activate`; calling `activate` after `hold` does not register it again. Calling `setPublishedEndpoints` registers the new endpoints right away, whether or not the object adapter is active. Deactivating the object adapter unregisters its endpoints.

## See Also

- [Object Adapters](https://docs.zeroc.com/ice/3.8/runtime/dispatch.md)
- [Locator Semantics for Clients](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients.md)
- [Locator Configuration for a Server](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-configuration-for-a-server.md)
- [IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid.md)
- [Terminology](https://docs.zeroc.com/ice/3.8/basics/terminology.md)
- [Object Adapter Replication](https://docs.zeroc.com/ice/3.8/services/icegrid/object-adapter-replication.md)
