---
title: "Object Adapter Properties"
url: https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties
language: php
docs_index: https://docs.zeroc.com/llms.txt
---

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

# Object Adapter Properties

Programming language: PHP. Other languages: [C++](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/matlab.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/swift.md).

These properties configure the runtime's [Ice.Admin object adapter](https://docs.zeroc.com/ice/3.8/property-reference/ice-admin-properties/php.md) in MATLAB, PHP, and Ruby. Replace the `adapter` prefix with `Ice.Admin`, for example `Ice.Admin.ThreadPool.Size=2`.

## *adapter*.AdapterId

`adapter.AdapterId=id`

Assigns an adapter ID to this object adapter. An object adapter with an adapter ID is called an *indirect adapter*.

This ID must be unique among all object adapters using the same [locator](https://docs.zeroc.com/ice/3.8/runtime/locators.md) instance. If a locator proxy is defined using [adapter.Locator](#adapter.locator) or [Ice.Default.Locator](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties/php.md), this object adapter registers its endpoints with the locator registry upon activation.

## *adapter*.AllowedOrigins

`adapter.AllowedOrigins=originList`

Restricts which HTTP Origin headers are accepted on the WebSocket upgrade request received by this object adapter. This property has effect only for adapters with WebSocket endpoints (`ws` or `wss`).

originList is a comma or whitespace-separated list of origins. Each entry has the form `scheme://host[:port]`, where scheme is `http` or `https` and host is a DNS name or IP address. The scheme and host are compared case-insensitively; the default port for the scheme (80 for http, 443 for https) is omitted during comparison, so `https://web.example.com` and `https://web.example.com:443` match the same origin.

The default value (empty) disables the check. A `*` entry also disables it, whatever the other entries are. Ice reads this property when creating an adapter with WebSocket endpoints.

When the check is enabled, Ice checks each incoming WebSocket upgrade request as follows:

If the request has no Origin header, the upgrade is accepted. Browsers always send Origin; non-browser Ice clients do not, so the check only filters browser-originated traffic. If the request has an Origin header that canonicalizes to an entry in the list, the upgrade is accepted. An unlisted or malformed origin causes Ice to reject the upgrade and close the connection.

This property is intended to mitigate cross-site WebSocket hijacking against browser-based Ice clients (Ice for JavaScript).

### Example {#adapter.allowedorigins-example}

```config
MyAdapter.Endpoints=wss -h api.example.com -p 443
MyAdapter.AllowedOrigins=https://web.example.com, https://admin.example.com
```

## *adapter*.Connection.CloseTimeout

`adapter.Connection.CloseTimeout=num` (in seconds)

Overrides the setting of [Ice.Connection.Server.CloseTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Connection.ConnectTimeout

`adapter.Connection.ConnectTimeout=num` (in seconds)

Overrides the setting of [Ice.Connection.Server.ConnectTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Connection.EnableIdleCheck

`adapter.Connection.EnableIdleCheck=num`

Overrides the setting of [Ice.Connection.Server.EnableIdleCheck](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Connection.IdleTimeout

`adapter.Connection.IdleTimeout=num` (in seconds)

Overrides the setting of [Ice.Connection.Server.IdleTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Connection.InactivityTimeout

`adapter.Connection.InactivityTimeout=num` (in seconds)

Overrides the setting of [Ice.Connection.Server.InactivityTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Connection.MaxDispatches

`adapter.Connection.MaxDispatches=num`

Overrides the setting of [Ice.Connection.Server.MaxDispatches](https://docs.zeroc.com/ice/3.8/property-reference/ice-connection-properties/php.md) for this object adapter.

## *adapter*.Endpoints

`adapter.Endpoints=endpoints`

Sets the [physical endpoints](https://docs.zeroc.com/ice/3.8/runtime/dispatch/object-adapter-endpoints.md) of this object adapter. These endpoints correspond to the network interfaces on which the object adapter accepts connections and receives requests.

## *adapter*.Locator

`adapter.Locator=locator`

Specifies the [locator](https://docs.zeroc.com/ice/3.8/runtime/locators.md) of this object adapter. The value is a stringified proxy to an `Ice::Locator` object.

As a proxy property, you can configure additional [aspects of the proxy](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/php.md) using properties.

## *adapter*.MaxConnections

`adapter.MaxConnections=num`

When `num` is greater than `0`, Ice limits the number of incoming connections separately for each listening endpoint of this object adapter. Once an endpoint reaches the limit, Ice accepts and immediately closes additional connections to that endpoint until an existing connection closes. UDP endpoints are exempt from this limit.

The default value is `0`. A value of `0` or less disables the limit.

## *adapter*.MessageSizeMax

`adapter.MessageSizeMax=num` (in KiB)

Limits the size of the Ice protocol messages this adapter receives, in KiB (1024 bytes). The limit applies to the whole message, including the protocol header; for a compressed message, it also applies to the decompressed size. If not defined, the adapter uses the communicator's [Ice.MessageSizeMax](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/php.md) limit.

A value of `0` or less selects the largest supported size; a positive value must be at most 2,097,151 KiB (about 2 GiB).

This limit applies to the messages this object adapter receives over the connections it accepts. It does not apply to the requests the adapter receives over an outgoing connection associated with it ([bidirectional connections](https://docs.zeroc.com/ice/3.8/runtime/connection-management/bidirectional-connections.md)): the communicator's `Ice.MessageSizeMax` limits those.

## *adapter*.ProxyOptions

`adapter.ProxyOptions=options`

Specifies the proxy options for proxies created by the object adapter. The value is a string representing the proxy options as they would be specified in a [stringified proxy](https://docs.zeroc.com/ice/3.8/runtime/invocation/syntax-for-stringified-proxies.md). The default value is `-t`, which creates twoway proxies.

## *adapter*.PublishedEndpoints

`adapter.PublishedEndpoints=endpoints`

Specifies the endpoints the object adapter advertises to clients. The object adapter embeds these endpoints in the direct proxies it creates and, when [*adapter*.AdapterId](#adapter.adapterid) is set, registers them with the locator registry. An object adapter configured with a router ignores this property and publishes the router's server endpoints. When this property is not set, the object adapter derives its published endpoints from its physical endpoints, as described in [Object Adapter Endpoints](https://docs.zeroc.com/ice/3.8/runtime/dispatch/object-adapter-endpoints.md).

## *adapter*.PublishedHost

`adapter.PublishedHost=host`

Specifies the published host for this object adapter. A published host is usually a DNS name, but it can also be an IP address.

The published host is used by the algorithm that computes the published endpoints of an object adapter, when `adapter.PublishedEndpoints` is not set. See [Published Object Adapter Endpoints](https://docs.zeroc.com/ice/3.8/runtime/dispatch/object-adapter-endpoints.md). This property is particularly useful when the object adapter endpoints do not specify port numbers.

## *adapter*.ReplicaGroupId

`adapter.ReplicaGroupId=id`

Identifies the group of [replicated object adapters](https://docs.zeroc.com/ice/3.8/services/icegrid/object-adapter-replication.md) to which this adapter belongs. The replica group is treated as a virtual object adapter, so that an indirect proxy of the form `identity@id` refers to the object adapters in the group. During binding, a client will attempt to establish a connection to an endpoint of one of the participating object adapters, and automatically try others until a connection is successfully established or all attempts have failed. Similarly, an outstanding request will, when permitted, automatically fail over to another object adapter of the replica group upon connection failure. The set of endpoints actually used by the client during binding is determined by the locator's configuration policies.

Defining a value for this property has no effect unless [*adapter*.AdapterId](#adapter.adapterid) is also defined. Furthermore, the locator registry may require replica groups to be defined in advance (see [IceGrid.Registry.DynamicRegistration](https://docs.zeroc.com/ice/3.8/property-reference/icegrid-properties.md)), otherwise `Ice.NotRegisteredException` is thrown upon adapter activation. Regardless of whether an object adapter is replicated, it can always be addressed individually in an indirect proxy if it defines a value for [*adapter*.AdapterId](#adapter.adapterid).

## *adapter*.Router

`adapter.Router=router`

Specifies a [router](https://docs.zeroc.com/ice/3.8/services/glacier2.md) for this object adapter. The value is a stringified proxy to an `Ice::Router` object. Defining a router allows the object adapter to receive callbacks from the router over a [bidirectional connection](https://docs.zeroc.com/ice/3.8/runtime/connection-management/bidirectional-connections.md), thereby avoiding the need for the router to establish a connection back to the object adapter.

A router can only be assigned to one object adapter. The default value is no router.

An adapter with a router cannot also set `adapter.Endpoints`.

As a proxy property, you can configure additional [aspects of the proxy](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/php.md) using properties.

## *adapter*.ThreadPool.Serialize

`adapter.ThreadPool.Serialize=num`

If `num` is a value greater than `0`, the adapter's thread pool serializes all messages from each connection. It is not necessary to enable this feature in a thread pool whose maximum size is 1 thread. When a thread pool dispatches requests implemented with AMD, it serializes the dispatching of requests from each connection, but it does not wait for a request to complete before it dispatches the next request.

In a [multi-threaded pool](https://docs.zeroc.com/ice/3.8/runtime/threading-model.md), enabling serialization allows requests from different connections to be dispatched concurrently while preserving the order of messages on each connection. Note that serialization can have a significant impact on latency and throughput. If not defined, the default value is `0`.

## *adapter*.ThreadPool.Size

`adapter.ThreadPool.Size=num`

`num` is the initial number of threads in the object adapter's dedicated [thread pool](https://docs.zeroc.com/ice/3.8/runtime/threading-model.md). Its default value is `1`. See [Ice.ThreadPool.*name*.Size](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/php.md) for more information.

## *adapter*.ThreadPool.SizeMax

`adapter.ThreadPool.SizeMax=num`

`num` is the maximum number of threads for the [thread pool](https://docs.zeroc.com/ice/3.8/runtime/threading-model.md). See [Ice.ThreadPool.*name*.SizeMax](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/php.md) for more information.

The default value is the value of [*adapter*.ThreadPool.Size](#adapter.threadpool.size), meaning the thread pool can never grow larger than its initial size.

## *adapter*.ThreadPool.SizeWarn

`adapter.ThreadPool.SizeWarn=num`

Whenever `num` threads are active in a [thread pool](https://docs.zeroc.com/ice/3.8/runtime/threading-model.md), a "low on threads" warning is printed. The default value is `0`, which disables the warning.

## *adapter*.ThreadPool.ThreadIdleTime

`adapter.ThreadPool.ThreadIdleTime=num`

In a dynamically-sized [thread pool](https://docs.zeroc.com/ice/3.8/runtime/threading-model.md), Ice reaps a thread after it is idle for `num` seconds. Setting this property to `0` disables idle thread reaping. If not specified, the default value is 60 seconds. See [Ice.ThreadPool.*name*.ThreadIdleTime](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/php.md) for more information.
