public interface ObjectAdapter
Communicator,
ServantLocator| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activate all endpoints that belong to this object adapter.
|
ObjectPrx |
add(Object servant,
Identity id)
Add a servant to this object adapter's Active Servant Map.
|
void |
addDefaultServant(Object servant,
java.lang.String category)
Add a default servant to handle requests for a specific
category.
|
ObjectPrx |
addFacet(Object servant,
Identity id,
java.lang.String facet)
Like
add(Ice.Object, Ice.Identity), but with a facet. |
ObjectPrx |
addFacetWithUUID(Object servant,
java.lang.String facet)
Like
addWithUUID(Ice.Object), but with a facet. |
void |
addServantLocator(ServantLocator locator,
java.lang.String category)
Add a Servant Locator to this object adapter.
|
ObjectPrx |
addWithUUID(Object servant)
Add a servant to this object adapter's Active Servant Map,
using an automatically generated UUID as its identity.
|
ObjectPrx |
createDirectProxy(Identity id)
Create a direct proxy for the object with the given identity.
|
ObjectPrx |
createIndirectProxy(Identity id)
Create an indirect proxy for the object with the given identity.
|
ObjectPrx |
createProxy(Identity id)
Create a proxy for the object with the given identity.
|
void |
deactivate()
Deactivate all endpoints that belong to this object adapter.
|
void |
destroy()
Destroys the object adapter and cleans up all resources held by
the object adapter.
|
Object |
find(Identity id)
Look up a servant in this object adapter's Active Servant Map
by the identity of the Ice object it implements.
|
java.util.Map<java.lang.String,Object> |
findAllFacets(Identity id)
Find all facets with the given identity in the Active Servant
Map.
|
Object |
findByProxy(ObjectPrx proxy)
Look up a servant in this object adapter's Active Servant Map,
given a proxy.
|
Object |
findDefaultServant(java.lang.String category)
Find the default servant for a specific category.
|
Object |
findFacet(Identity id,
java.lang.String facet)
Like
find(Ice.Identity), but with a facet. |
ServantLocator |
findServantLocator(java.lang.String category)
Find a Servant Locator installed with this object adapter.
|
Communicator |
getCommunicator()
Get the communicator this object adapter belongs to.
|
Endpoint[] |
getEndpoints()
Get the set of endpoints configured with this object adapter.
|
LocatorPrx |
getLocator()
Get the Ice locator used by this object adapter.
|
java.lang.String |
getName()
Get the name of this object adapter.
|
Endpoint[] |
getPublishedEndpoints()
Get the set of endpoints that proxies created by this object
adapter will contain.
|
void |
hold()
Temporarily hold receiving and dispatching requests.
|
boolean |
isDeactivated()
Check whether object adapter has been deactivated.
|
void |
refreshPublishedEndpoints()
Refresh the set of published endpoints.
|
Object |
remove(Identity id)
Remove a servant (that is, the default facet) from the object
adapter's Active Servant Map.
|
java.util.Map<java.lang.String,Object> |
removeAllFacets(Identity id)
Remove all facets with the given identity from the Active
Servant Map.
|
Object |
removeDefaultServant(java.lang.String category)
Remove the default servant for a specific category.
|
Object |
removeFacet(Identity id,
java.lang.String facet)
Like
remove(Ice.Identity), but with a facet. |
ServantLocator |
removeServantLocator(java.lang.String category)
Remove a Servant Locator from this object adapter.
|
void |
setLocator(LocatorPrx loc)
Set an Ice locator for this object adapter.
|
void |
waitForDeactivate()
Wait until the object adapter has deactivated.
|
void |
waitForHold()
Wait until the object adapter holds requests.
|
static final long serialVersionUID
java.lang.String getName()
Communicator getCommunicator()
Communicatorvoid activate()
hold(),
deactivate()void hold()
activate() operation.
Holding is not immediate, i.e., after hold()
returns, the object adapter might still be active for some
time. You can use waitForHold() to wait until holding is
complete.
activate(),
deactivate(),
waitForHold()void waitForHold()
hold()
initiates holding of requests, and waitForHold() only returns
when holding of requests has been completed.hold(),
waitForDeactivate(),
Communicator.waitForShutdown()void deactivate()
ObjectAdapterDeactivatedException; however, attempts to
deactivate() an already deactivated object adapter are
ignored and do nothing. Once deactivated, it is possible to
destroy the adapter to clean up resources and then create and
activate a new adapter with the same name.
After deactivate() returns, no new requests
are processed by the object adapter. However, requests that
have been started before deactivate() was called might
still be active. You can use waitForDeactivate() to wait
for the completion of all requests for this object adapter.
activate(),
hold(),
waitForDeactivate(),
Communicator.shutdown()void waitForDeactivate()
deactivate() initiates object adapter deactivation, and
waitForDeactivate() only returns when deactivation has
been completed.deactivate(),
waitForHold(),
Communicator.waitForShutdown()boolean isDeactivated()
Communicator.shutdown()void destroy()
deactivate(),
waitForDeactivate(),
Communicator.destroy()ObjectPrx add(Object servant, Identity id)
AlreadyRegisteredException.servant - The servant to add.id - The identity of the Ice object that is implemented by
the servant.Identity,
addFacet(Ice.Object, Ice.Identity, java.lang.String),
addWithUUID(Ice.Object),
remove(Ice.Identity),
find(Ice.Identity)ObjectPrx addFacet(Object servant, Identity id, java.lang.String facet)
add(Ice.Object, Ice.Identity), but with a facet. Calling add(servant, id)
is equivalent to calling addFacet(Ice.Object, Ice.Identity, java.lang.String) with an empty facet.servant - The servant to add.id - The identity of the Ice object that is implemented by
the servant.facet - The facet. An empty facet means the default facet.Identity,
add(Ice.Object, Ice.Identity),
addFacetWithUUID(Ice.Object, java.lang.String),
removeFacet(Ice.Identity, java.lang.String),
findFacet(Ice.Identity, java.lang.String)ObjectPrx addWithUUID(Object servant)
servant - The servant to add.Identity,
add(Ice.Object, Ice.Identity),
addFacetWithUUID(Ice.Object, java.lang.String),
remove(Ice.Identity),
find(Ice.Identity)ObjectPrx addFacetWithUUID(Object servant, java.lang.String facet)
addWithUUID(Ice.Object), but with a facet. Calling
addWithUUID(servant) is equivalent to calling
addFacetWithUUID(Ice.Object, java.lang.String) with an empty facet.servant - The servant to add.facet - The facet. An empty facet means the default
facet.Identity,
addFacet(Ice.Object, Ice.Identity, java.lang.String),
addWithUUID(Ice.Object),
removeFacet(Ice.Identity, java.lang.String),
findFacet(Ice.Identity, java.lang.String)void addDefaultServant(Object servant, java.lang.String category)
AlreadyRegisteredException. To dispatch operation
calls on servants, the object adapter tries to find a servant
for a given Ice object identity and facet in the following
order:
ObjectNotExistException or FacetNotExistException.servant - The default servant.category - The category for which the default servant is
registered. An empty category means it will handle all categories.removeDefaultServant(java.lang.String),
findDefaultServant(java.lang.String)Object remove(Identity id)
id - The identity of the Ice object that is implemented by
the servant. If the servant implements multiple Ice objects,
remove(Ice.Identity) has to be called for all those Ice objects.
Removing an identity that is not in the map throws
NotRegisteredException.Identity,
add(Ice.Object, Ice.Identity),
addWithUUID(Ice.Object)Object removeFacet(Identity id, java.lang.String facet)
remove(Ice.Identity), but with a facet. Calling remove(id)
is equivalent to calling removeFacet(Ice.Identity, java.lang.String) with an empty facet.id - The identity of the Ice object that is implemented by
the servant.facet - The facet. An empty facet means the default facet.Identity,
addFacet(Ice.Object, Ice.Identity, java.lang.String),
addFacetWithUUID(Ice.Object, java.lang.String)java.util.Map<java.lang.String,Object> removeAllFacets(Identity id)
NotRegisteredException.id - The identity of the Ice object to be removed.remove(Ice.Identity),
removeFacet(Ice.Identity, java.lang.String)Object removeDefaultServant(java.lang.String category)
NotRegisteredException.category - The category of the default servant to remove.addDefaultServant(Ice.Object, java.lang.String),
findDefaultServant(java.lang.String)Object find(Identity id)
This operation only tries to look up a servant in
the Active Servant Map. It does not attempt to find a servant
by using any installed ServantLocator.
id - The identity of the Ice object for which the servant
should be returned.Identity,
findFacet(Ice.Identity, java.lang.String),
findByProxy(Ice.ObjectPrx)Object findFacet(Identity id, java.lang.String facet)
find(Ice.Identity), but with a facet. Calling find(id)
is equivalent to calling findFacet(Ice.Identity, java.lang.String) with an empty
facet.id - The identity of the Ice object for which the
servant should be returned.facet - The facet. An empty facet means the default
facet.Identity,
find(Ice.Identity),
findByProxy(Ice.ObjectPrx)java.util.Map<java.lang.String,Object> findAllFacets(Identity id)
id - The identity of the Ice object for which the facets
should be returned.find(Ice.Identity),
findFacet(Ice.Identity, java.lang.String)Object findByProxy(ObjectPrx proxy)
This operation only tries to lookup a servant in
the Active Servant Map. It does not attempt to find a servant
by using any installed ServantLocator.
proxy - The proxy for which the servant should be returned.find(Ice.Identity),
findFacet(Ice.Identity, java.lang.String)void addServantLocator(ServantLocator locator, java.lang.String category)
AlreadyRegisteredException. To dispatch
operation calls on servants, the object adapter tries to find a
servant for a given Ice object identity and facet in the
following order:
ObjectNotExistException or FacetNotExistException.Only one locator for the empty category can be installed.
locator - The locator to add.category - The category for which the Servant Locator can
locate servants, or an empty string if the Servant Locator does
not belong to any specific category.Identity,
removeServantLocator(java.lang.String),
findServantLocator(java.lang.String),
ServantLocatorServantLocator removeServantLocator(java.lang.String category)
category - The category for which the Servant Locator can
locate servants, or an empty string if the Servant Locator does
not belong to any specific category.NotRegisteredException
if no Servant Locator was found for the given category.Identity,
addServantLocator(Ice.ServantLocator, java.lang.String),
findServantLocator(java.lang.String),
ServantLocatorServantLocator findServantLocator(java.lang.String category)
category - The category for which the Servant Locator can
locate servants, or an empty string if the Servant Locator does
not belong to any specific category.Identity,
addServantLocator(Ice.ServantLocator, java.lang.String),
removeServantLocator(java.lang.String),
ServantLocatorObject findDefaultServant(java.lang.String category)
category - The category of the default servant to find.addDefaultServant(Ice.Object, java.lang.String),
removeDefaultServant(java.lang.String)ObjectPrx createProxy(Identity id)
id - The object's identity.IdentityObjectPrx createDirectProxy(Identity id)
id - The object's identity.IdentityObjectPrx createIndirectProxy(Identity id)
id - The object's identity.Identityvoid setLocator(LocatorPrx loc)
loc - The locator used by this object adapter.createDirectProxy(Ice.Identity),
Locator,
LocatorRegistryLocatorPrx getLocator()
Locator,
setLocator(Ice.LocatorPrx)void refreshPublishedEndpoints()
Endpoint[] getEndpoints()
EndpointEndpoint[] getPublishedEndpoints()
refreshPublishedEndpoints(),
Endpoint