public final class ObjectAdapterI extends java.lang.Object implements ObjectAdapter
serialVersionUID| Constructor and Description |
|---|
ObjectAdapterI(Instance instance,
Communicator communicator,
ObjectAdapterFactory objectAdapterFactory,
java.lang.String name,
RouterPrx router,
boolean noConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activate all endpoints that belong to this object adapter.
|
ObjectPrx |
add(Object object,
Identity ident)
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 object,
Identity ident,
java.lang.String facet)
Like
ObjectAdapter.add(Ice.Object, Ice.Identity), but with a facet. |
ObjectPrx |
addFacetWithUUID(Object object,
java.lang.String facet)
Like
ObjectAdapter.addWithUUID(Ice.Object), but with a facet. |
void |
addServantLocator(ServantLocator locator,
java.lang.String prefix)
Add a Servant Locator to this object adapter.
|
ObjectPrx |
addWithUUID(Object object)
Add a servant to this object adapter's Active Servant Map,
using an automatically generated UUID as its identity.
|
ObjectPrx |
createDirectProxy(Identity ident)
Create a direct proxy for the object with the given identity.
|
ObjectPrx |
createIndirectProxy(Identity ident)
Create an indirect proxy for the object with the given identity.
|
ObjectPrx |
createProxy(Identity ident)
Create a proxy for the object with the given identity.
|
void |
deactivate()
Deactivate all endpoints that belong to this object adapter.
|
void |
decDirectCount() |
void |
destroy()
Destroys the object adapter and cleans up all resources held by
the object adapter.
|
protected void |
finalize() |
Object |
find(Identity ident)
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 ident)
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 ident,
java.lang.String facet)
Like
ObjectAdapter.find(Ice.Identity), but with a facet. |
ServantLocator |
findServantLocator(java.lang.String prefix)
Find a Servant Locator installed with this object adapter.
|
void |
flushAsyncBatchRequests(CommunicatorFlushBatch outAsync) |
ACMConfig |
getACM() |
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.
|
ServantManager |
getServantManager() |
ThreadPool |
getThreadPool() |
void |
hold()
Temporarily hold receiving and dispatching requests.
|
void |
incDirectCount() |
boolean |
isDeactivated()
Check whether object adapter has been deactivated.
|
boolean |
isLocal(ObjectPrx proxy) |
int |
messageSizeMax() |
void |
refreshPublishedEndpoints()
Refresh the set of published endpoints.
|
Object |
remove(Identity ident)
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 ident)
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 ident,
java.lang.String facet)
Like
ObjectAdapter.remove(Ice.Identity), but with a facet. |
ServantLocator |
removeServantLocator(java.lang.String prefix)
Remove a Servant Locator from this object adapter.
|
void |
setLocator(LocatorPrx locator)
Set an Ice locator for this object adapter.
|
void |
updateConnectionObservers() |
void |
updateThreadObservers() |
void |
waitForDeactivate()
Wait until the object adapter has deactivated.
|
void |
waitForHold()
Wait until the object adapter holds requests.
|
public ObjectAdapterI(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, java.lang.String name, RouterPrx router, boolean noConfig)
public java.lang.String getName()
ObjectAdaptergetName in interface ObjectAdapterpublic Communicator getCommunicator()
ObjectAdaptergetCommunicator in interface ObjectAdapterCommunicatorpublic void activate()
ObjectAdapteractivate in interface ObjectAdapterObjectAdapter.hold(),
ObjectAdapter.deactivate()public void hold()
ObjectAdapterObjectAdapter.activate() operation.
Holding is not immediate, i.e., after ObjectAdapter.hold()
returns, the object adapter might still be active for some
time. You can use ObjectAdapter.waitForHold() to wait until holding is
complete.
hold in interface ObjectAdapterObjectAdapter.activate(),
ObjectAdapter.deactivate(),
ObjectAdapter.waitForHold()public void waitForHold()
ObjectAdapterObjectAdapter.hold()
initiates holding of requests, and ObjectAdapter.waitForHold() only returns
when holding of requests has been completed.waitForHold in interface ObjectAdapterObjectAdapter.hold(),
ObjectAdapter.waitForDeactivate(),
Communicator.waitForShutdown()public void deactivate()
ObjectAdapterObjectAdapterDeactivatedException; however, attempts to
ObjectAdapter.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 ObjectAdapter.deactivate() returns, no new requests
are processed by the object adapter. However, requests that
have been started before ObjectAdapter.deactivate() was called might
still be active. You can use ObjectAdapter.waitForDeactivate() to wait
for the completion of all requests for this object adapter.
deactivate in interface ObjectAdapterObjectAdapter.activate(),
ObjectAdapter.hold(),
ObjectAdapter.waitForDeactivate(),
Communicator.shutdown()public void waitForDeactivate()
ObjectAdapterObjectAdapter.deactivate() initiates object adapter deactivation, and
ObjectAdapter.waitForDeactivate() only returns when deactivation has
been completed.waitForDeactivate in interface ObjectAdapterObjectAdapter.deactivate(),
ObjectAdapter.waitForHold(),
Communicator.waitForShutdown()public boolean isDeactivated()
ObjectAdapterisDeactivated in interface ObjectAdapterCommunicator.shutdown()public void destroy()
ObjectAdapterdestroy in interface ObjectAdapterObjectAdapter.deactivate(),
ObjectAdapter.waitForDeactivate(),
Communicator.destroy()public ObjectPrx add(Object object, Identity ident)
ObjectAdapterAlreadyRegisteredException.add in interface ObjectAdapterobject - The servant to add.ident - The identity of the Ice object that is implemented by
the servant.Identity,
ObjectAdapter.addFacet(Ice.Object, Ice.Identity, java.lang.String),
ObjectAdapter.addWithUUID(Ice.Object),
ObjectAdapter.remove(Ice.Identity),
ObjectAdapter.find(Ice.Identity)public ObjectPrx addFacet(Object object, Identity ident, java.lang.String facet)
ObjectAdapterObjectAdapter.add(Ice.Object, Ice.Identity), but with a facet. Calling add(servant, id)
is equivalent to calling ObjectAdapter.addFacet(Ice.Object, Ice.Identity, java.lang.String) with an empty facet.addFacet in interface ObjectAdapterobject - The servant to add.ident - The identity of the Ice object that is implemented by
the servant.facet - The facet. An empty facet means the default facet.Identity,
ObjectAdapter.add(Ice.Object, Ice.Identity),
ObjectAdapter.addFacetWithUUID(Ice.Object, java.lang.String),
ObjectAdapter.removeFacet(Ice.Identity, java.lang.String),
ObjectAdapter.findFacet(Ice.Identity, java.lang.String)public ObjectPrx addWithUUID(Object object)
ObjectAdapteraddWithUUID in interface ObjectAdapterobject - The servant to add.Identity,
ObjectAdapter.add(Ice.Object, Ice.Identity),
ObjectAdapter.addFacetWithUUID(Ice.Object, java.lang.String),
ObjectAdapter.remove(Ice.Identity),
ObjectAdapter.find(Ice.Identity)public ObjectPrx addFacetWithUUID(Object object, java.lang.String facet)
ObjectAdapterObjectAdapter.addWithUUID(Ice.Object), but with a facet. Calling
addWithUUID(servant) is equivalent to calling
ObjectAdapter.addFacetWithUUID(Ice.Object, java.lang.String) with an empty facet.addFacetWithUUID in interface ObjectAdapterobject - The servant to add.facet - The facet. An empty facet means the default
facet.Identity,
ObjectAdapter.addFacet(Ice.Object, Ice.Identity, java.lang.String),
ObjectAdapter.addWithUUID(Ice.Object),
ObjectAdapter.removeFacet(Ice.Identity, java.lang.String),
ObjectAdapter.findFacet(Ice.Identity, java.lang.String)public void addDefaultServant(Object servant, java.lang.String category)
ObjectAdapterAlreadyRegisteredException. 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.addDefaultServant in interface ObjectAdapterservant - The default servant.category - The category for which the default servant is
registered. An empty category means it will handle all categories.ObjectAdapter.removeDefaultServant(java.lang.String),
ObjectAdapter.findDefaultServant(java.lang.String)public Object remove(Identity ident)
ObjectAdapterremove in interface ObjectAdapterident - The identity of the Ice object that is implemented by
the servant. If the servant implements multiple Ice objects,
ObjectAdapter.remove(Ice.Identity) has to be called for all those Ice objects.
Removing an identity that is not in the map throws
NotRegisteredException.Identity,
ObjectAdapter.add(Ice.Object, Ice.Identity),
ObjectAdapter.addWithUUID(Ice.Object)public Object removeFacet(Identity ident, java.lang.String facet)
ObjectAdapterObjectAdapter.remove(Ice.Identity), but with a facet. Calling remove(id)
is equivalent to calling ObjectAdapter.removeFacet(Ice.Identity, java.lang.String) with an empty facet.removeFacet in interface ObjectAdapterident - The identity of the Ice object that is implemented by
the servant.facet - The facet. An empty facet means the default facet.Identity,
ObjectAdapter.addFacet(Ice.Object, Ice.Identity, java.lang.String),
ObjectAdapter.addFacetWithUUID(Ice.Object, java.lang.String)public java.util.Map<java.lang.String,Object> removeAllFacets(Identity ident)
ObjectAdapterNotRegisteredException.removeAllFacets in interface ObjectAdapterident - The identity of the Ice object to be removed.ObjectAdapter.remove(Ice.Identity),
ObjectAdapter.removeFacet(Ice.Identity, java.lang.String)public Object removeDefaultServant(java.lang.String category)
ObjectAdapterNotRegisteredException.removeDefaultServant in interface ObjectAdaptercategory - The category of the default servant to remove.ObjectAdapter.addDefaultServant(Ice.Object, java.lang.String),
ObjectAdapter.findDefaultServant(java.lang.String)public Object find(Identity ident)
ObjectAdapterThis 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.
find in interface ObjectAdapterident - The identity of the Ice object for which the servant
should be returned.Identity,
ObjectAdapter.findFacet(Ice.Identity, java.lang.String),
ObjectAdapter.findByProxy(Ice.ObjectPrx)public Object findFacet(Identity ident, java.lang.String facet)
ObjectAdapterObjectAdapter.find(Ice.Identity), but with a facet. Calling find(id)
is equivalent to calling ObjectAdapter.findFacet(Ice.Identity, java.lang.String) with an empty
facet.findFacet in interface ObjectAdapterident - The identity of the Ice object for which the
servant should be returned.facet - The facet. An empty facet means the default
facet.Identity,
ObjectAdapter.find(Ice.Identity),
ObjectAdapter.findByProxy(Ice.ObjectPrx)public java.util.Map<java.lang.String,Object> findAllFacets(Identity ident)
ObjectAdapterfindAllFacets in interface ObjectAdapterident - The identity of the Ice object for which the facets
should be returned.ObjectAdapter.find(Ice.Identity),
ObjectAdapter.findFacet(Ice.Identity, java.lang.String)public Object findByProxy(ObjectPrx proxy)
ObjectAdapterThis 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.
findByProxy in interface ObjectAdapterproxy - The proxy for which the servant should be returned.ObjectAdapter.find(Ice.Identity),
ObjectAdapter.findFacet(Ice.Identity, java.lang.String)public Object findDefaultServant(java.lang.String category)
ObjectAdapterfindDefaultServant in interface ObjectAdaptercategory - The category of the default servant to find.ObjectAdapter.addDefaultServant(Ice.Object, java.lang.String),
ObjectAdapter.removeDefaultServant(java.lang.String)public void addServantLocator(ServantLocator locator, java.lang.String prefix)
ObjectAdapterAlreadyRegisteredException. 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.
addServantLocator in interface ObjectAdapterlocator - The locator to add.prefix - 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,
ObjectAdapter.removeServantLocator(java.lang.String),
ObjectAdapter.findServantLocator(java.lang.String),
ServantLocatorpublic ServantLocator removeServantLocator(java.lang.String prefix)
ObjectAdapterremoveServantLocator in interface ObjectAdapterprefix - 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,
ObjectAdapter.addServantLocator(Ice.ServantLocator, java.lang.String),
ObjectAdapter.findServantLocator(java.lang.String),
ServantLocatorpublic ServantLocator findServantLocator(java.lang.String prefix)
ObjectAdapterfindServantLocator in interface ObjectAdapterprefix - 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,
ObjectAdapter.addServantLocator(Ice.ServantLocator, java.lang.String),
ObjectAdapter.removeServantLocator(java.lang.String),
ServantLocatorpublic ObjectPrx createProxy(Identity ident)
ObjectAdaptercreateProxy in interface ObjectAdapterident - The object's identity.Identitypublic ObjectPrx createDirectProxy(Identity ident)
ObjectAdaptercreateDirectProxy in interface ObjectAdapterident - The object's identity.Identitypublic ObjectPrx createIndirectProxy(Identity ident)
ObjectAdaptercreateIndirectProxy in interface ObjectAdapterident - The object's identity.Identitypublic void setLocator(LocatorPrx locator)
ObjectAdaptersetLocator in interface ObjectAdapterlocator - The locator used by this object adapter.ObjectAdapter.createDirectProxy(Ice.Identity),
Locator,
LocatorRegistrypublic LocatorPrx getLocator()
ObjectAdaptergetLocator in interface ObjectAdapterLocator,
ObjectAdapter.setLocator(Ice.LocatorPrx)public void refreshPublishedEndpoints()
ObjectAdapterrefreshPublishedEndpoints in interface ObjectAdapterpublic Endpoint[] getEndpoints()
ObjectAdaptergetEndpoints in interface ObjectAdapterEndpointpublic Endpoint[] getPublishedEndpoints()
ObjectAdaptergetPublishedEndpoints in interface ObjectAdapterObjectAdapter.refreshPublishedEndpoints(),
Endpointpublic boolean isLocal(ObjectPrx proxy)
public void flushAsyncBatchRequests(CommunicatorFlushBatch outAsync)
public void updateConnectionObservers()
public void updateThreadObservers()
public void incDirectCount()
public void decDirectCount()
public ThreadPool getThreadPool()
public ServantManager getServantManager()
public ACMConfig getACM()
public int messageSizeMax()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable