Znav |
---|
next | Creating Proxies with an Object Adapter |
---|
prev | Object Adapter States |
---|
|
An object adapter maintains two sets of transport endpoints. One set identifies the network interfaces on which the adapter listens for new connections, and the other set is embedded in proxies created by the adapter and used by clients to communicate with it. We will refer to these sets of endpoints as the physical endpoints and the published endpoints, respectively. In most cases these sets are identical, but there are situations when they must be configured independently.
On this page:
Physical Object Adapter Endpoints
...
If a host name is specified, the object adapter listens only on the network interface associated with that host name. If no host name is specified but the property Ice.Default.Host
is defined, the object adapter uses the property's value as the host name. Finally, if a host name is not specified, and the property Ice.Default.Host
is undefined, the object adapter listens on all available network interfaces, including the loopback interface. You may also force the object adapter to listen on all interfaces by using one of the host names 0.0.0.0
or *
. The adapter does not expand the list of interfaces when it is initialized. Instead, if no host is specified, or you use -h *
or -h 0.0.0.0
, the adapter binds to INADDR_ANY
to listen for incoming requests.
If the host name refers to a DNS name which is configured with multiple addresses, the object adapter will listen on the first address returned by the DNS resolver.
If you want an adapter to accept requests on certain network interfaces, you must specify a separate endpoint for each interface. For example, the following property configures a single endpoint for the adapter named MyAdapter
:
...
However, there are certain situations where a fixed port is not required. For example, an adapter whose servants are transient does not need a fixed port, because the proxies for those objects are not expected to remain valid past the lifetime of the server process. Similarly, a server using indirect binding via IceGrid does not need a fixed port because its port is never published.
Published Object Adapter Endpoints
...
For troubleshooting purposes, you can examine the published endpoints for an object adapter by setting the property Ice.Trace.Network=3
. Note however that this setting generates significant trace information about the Ice run time's network activity, therefore you may not want to use this setting by default.
Refreshing Object Adapter Endpoints
...
Note that refreshPublishedEndpoints
takes effect only for object adapters that specify published endpoints without a host, or that set the published endpoints to -h *
or -h 0.0.0.0
.
Timeouts in Object Adapter Endpoints
...
In this example, we specify a timeout of five seconds.
Discovering Object Adapter Endpoints
...
The sequences that are returned contain Endpoint
objects representing the adapter's physical and published endpoints, respectively.
A Router's Effect on Object Adapter Endpoints
If an object adapter is configured with a router, the adapter's published endpoints are augmented to reflect the router. See Glacier2 for more information on configuring an adapter with a router.
See Also
Znav |
---|
next | Creating Proxies with an Object Adapter |
---|
prev | Object Adapter States |
---|
|