public final class CommunicatorI extends java.lang.Object implements Communicator
serialVersionUID| Modifier and Type | Method and Description |
|---|---|
void |
addAdminFacet(Object servant,
java.lang.String facet)
Add a new facet to the Admin object.
|
void |
addObjectFactory(ObjectFactory factory,
java.lang.String id)
Add an object factory to this communicator.
|
AsyncResult |
begin_flushBatchRequests()
Flush any pending batch requests for this communicator.
|
AsyncResult |
begin_flushBatchRequests(Callback_Communicator_flushBatchRequests cb)
Flush any pending batch requests for this communicator.
|
AsyncResult |
begin_flushBatchRequests(Callback cb)
Flush any pending batch requests for this communicator.
|
AsyncResult |
begin_flushBatchRequests(Functional_VoidCallback __responseCb,
Functional_GenericCallback1<Exception> __exceptionCb,
Functional_BoolCallback __sentCb)
Flush any pending batch requests for this communicator.
|
ObjectPrx |
createAdmin(ObjectAdapter adminAdapter,
Identity adminId)
Add the Admin object with all its facets to the provided object adapter.
|
ObjectAdapter |
createObjectAdapter(java.lang.String name)
Create a new object adapter.
|
ObjectAdapter |
createObjectAdapterWithEndpoints(java.lang.String name,
java.lang.String endpoints)
Create a new object adapter with endpoints.
|
ObjectAdapter |
createObjectAdapterWithRouter(java.lang.String name,
RouterPrx router)
Create a new object adapter with a router.
|
void |
destroy()
Destroy the communicator.
|
void |
end_flushBatchRequests(AsyncResult r)
Flush any pending batch requests for this communicator.
|
Object |
findAdminFacet(java.lang.String facet)
Returns a facet of the Admin object.
|
java.util.Map<java.lang.String,Object> |
findAllAdminFacets()
Returns a map of all facets of the Admin object.
|
ObjectFactory |
findObjectFactory(java.lang.String id)
Find an object factory registered with this communicator.
|
void |
flushBatchRequests()
Flush any pending batch requests for this communicator.
|
ObjectPrx |
getAdmin()
Get a proxy to the main facet of the Admin object.
|
LocatorPrx |
getDefaultLocator()
Get the default locator this communicator.
|
RouterPrx |
getDefaultRouter()
Get the default router this communicator.
|
ImplicitContext |
getImplicitContext()
Get the implicit context associated with this communicator.
|
Instance |
getInstance() |
Logger |
getLogger()
Get the logger for this communicator.
|
CommunicatorObserver |
getObserver()
Get the observer resolver object for this communicator.
|
PluginManager |
getPluginManager()
Get the plug-in manager for this communicator.
|
Properties |
getProperties()
Get the properties for this communicator.
|
java.lang.String |
identityToString(Identity ident)
Convert an identity into a string.
|
boolean |
isShutdown()
Check whether communicator has been shut down.
|
ObjectPrx |
propertyToProxy(java.lang.String s)
Convert a set of proxy properties into a proxy.
|
java.util.Map<java.lang.String,java.lang.String> |
proxyToProperty(ObjectPrx proxy,
java.lang.String prefix)
Convert a proxy to a set of proxy properties.
|
java.lang.String |
proxyToString(ObjectPrx proxy)
Convert a proxy into a string.
|
Object |
removeAdminFacet(java.lang.String facet)
Remove the following facet to the Admin object.
|
void |
setDefaultLocator(LocatorPrx locator)
Set a default Ice locator for this communicator.
|
void |
setDefaultRouter(RouterPrx router)
Set a default router for this communicator.
|
void |
shutdown()
Shuts down this communicator's server functionality, which
includes the deactivation of all object adapters.
|
Identity |
stringToIdentity(java.lang.String s)
Convert a string into an identity.
|
ObjectPrx |
stringToProxy(java.lang.String s)
Convert a stringified proxy into a proxy.
|
void |
waitForShutdown()
Wait until the application has called
Communicator.shutdown() (or Communicator.destroy()). |
public void destroy()
CommunicatorCommunicator.shutdown()
implicitly. Calling Communicator.destroy() cleans up memory, and shuts down
this communicator's client functionality and destroys all object
adapters. Subsequent calls to Communicator.destroy() are ignored.destroy in interface CommunicatorCommunicator.shutdown(),
ObjectAdapter.destroy()public void shutdown()
CommunicatorCommunicator.waitForShutdown() to wait for the completion of all
requests.shutdown in interface CommunicatorCommunicator.destroy(),
Communicator.waitForShutdown(),
ObjectAdapter.deactivate()public void waitForShutdown()
CommunicatorCommunicator.shutdown() (or Communicator.destroy()).
On the server side, this operation blocks the calling thread
until all currently-executing operations have completed.
On the client side, the operation simply block until another
thread has called Communicator.shutdown() or Communicator.destroy().
A typical use of this operation is to call it from the main thread,
which then waits until some other thread calls Communicator.shutdown().
After shut-down is complete, the main thread returns and can do some
cleanup work before it finally calls Communicator.destroy() to shut down
the client functionality, and then exits the application.waitForShutdown in interface CommunicatorCommunicator.shutdown(),
Communicator.destroy(),
ObjectAdapter.waitForDeactivate()public boolean isShutdown()
CommunicatorisShutdown in interface CommunicatorCommunicator.shutdown()public ObjectPrx stringToProxy(java.lang.String s)
CommunicatorstringToProxy in interface Communicators - The stringified proxy to convert into a proxy.Communicator.proxyToString(Ice.ObjectPrx)public java.lang.String proxyToString(ObjectPrx proxy)
CommunicatorproxyToString in interface Communicatorproxy - The proxy to convert into a stringified proxy.Communicator.stringToProxy(java.lang.String)public ObjectPrx propertyToProxy(java.lang.String s)
CommunicatorpropertyToProxy in interface Communicators - The base property name.public java.util.Map<java.lang.String,java.lang.String> proxyToProperty(ObjectPrx proxy, java.lang.String prefix)
CommunicatorproxyToProperty in interface Communicatorproxy - The proxy.prefix - The base property name.public Identity stringToIdentity(java.lang.String s)
CommunicatorstringToIdentity in interface Communicators - The string to convert into an identity.Communicator.identityToString(Ice.Identity)public java.lang.String identityToString(Identity ident)
CommunicatoridentityToString in interface Communicatorident - The identity to convert into a string.Communicator.stringToIdentity(java.lang.String)public ObjectAdapter createObjectAdapter(java.lang.String name)
CommunicatorcreateObjectAdapter in interface Communicatorname - The object adapter name.Communicator.createObjectAdapterWithEndpoints(java.lang.String, java.lang.String),
ObjectAdapter,
Propertiespublic ObjectAdapter createObjectAdapterWithEndpoints(java.lang.String name, java.lang.String endpoints)
CommunicatorCommunicator.createObjectAdapter(java.lang.String). It is provided as a
convenience function.
Calling this operation with an empty name will result in a
UUID being generated for the name.createObjectAdapterWithEndpoints in interface Communicatorname - The object adapter name.endpoints - The endpoints for the object adapter.Communicator.createObjectAdapter(java.lang.String),
ObjectAdapter,
Propertiespublic ObjectAdapter createObjectAdapterWithRouter(java.lang.String name, RouterPrx router)
CommunicatorcreateObjectAdapterWithRouter in interface Communicatorname - The object adapter name.router - The router.Communicator.createObjectAdapter(java.lang.String),
ObjectAdapter,
Propertiespublic void addObjectFactory(ObjectFactory factory, java.lang.String id)
CommunicatoraddObjectFactory in interface Communicatorfactory - The factory to add.id - The type id for which the factory can create instances, or
an empty string for the default factory.Communicator.findObjectFactory(java.lang.String),
ObjectFactorypublic ObjectFactory findObjectFactory(java.lang.String id)
CommunicatorfindObjectFactory in interface Communicatorid - The type id for which the factory can create instances,
or an empty string for the default factory.Communicator.addObjectFactory(Ice.ObjectFactory, java.lang.String),
ObjectFactorypublic Properties getProperties()
CommunicatorgetProperties in interface CommunicatorPropertiespublic Logger getLogger()
CommunicatorgetLogger in interface CommunicatorLoggerpublic CommunicatorObserver getObserver()
CommunicatorgetObserver in interface Communicatorpublic RouterPrx getDefaultRouter()
CommunicatorgetDefaultRouter in interface CommunicatorCommunicator.setDefaultRouter(Ice.RouterPrx),
Routerpublic void setDefaultRouter(RouterPrx router)
CommunicatorsetDefaultRouter in interface Communicatorrouter - The default router to use for this communicator.Communicator.getDefaultRouter(),
Communicator.createObjectAdapterWithRouter(java.lang.String, Ice.RouterPrx),
Routerpublic LocatorPrx getDefaultLocator()
CommunicatorgetDefaultLocator in interface CommunicatorCommunicator.setDefaultLocator(Ice.LocatorPrx),
Locatorpublic void setDefaultLocator(LocatorPrx locator)
CommunicatorObjectAdapter.setLocator(Ice.LocatorPrx) on the object adapter.setDefaultLocator in interface Communicatorlocator - The default locator to use for this communicator.Communicator.getDefaultLocator(),
Locator,
ObjectAdapter.setLocator(Ice.LocatorPrx)public ImplicitContext getImplicitContext()
CommunicatorgetImplicitContext in interface Communicatorpublic PluginManager getPluginManager()
CommunicatorgetPluginManager in interface CommunicatorPluginManagerpublic void flushBatchRequests()
CommunicatorflushBatchRequests in interface Communicatorpublic AsyncResult begin_flushBatchRequests()
Communicatorbegin_flushBatchRequests in interface Communicatorpublic AsyncResult begin_flushBatchRequests(Callback cb)
Communicatorbegin_flushBatchRequests in interface Communicatorcb - A generic callback.public AsyncResult begin_flushBatchRequests(Callback_Communicator_flushBatchRequests cb)
Communicatorbegin_flushBatchRequests in interface Communicatorcb - A typed callback.public AsyncResult begin_flushBatchRequests(Functional_VoidCallback __responseCb, Functional_GenericCallback1<Exception> __exceptionCb, Functional_BoolCallback __sentCb)
Communicatorbegin_flushBatchRequests in interface Communicator__responseCb - The response callback.__exceptionCb - The exception callback.__sentCb - The sent callback.public void end_flushBatchRequests(AsyncResult r)
Communicatorend_flushBatchRequests in interface Communicatorr - The asynchronous result object.public ObjectPrx createAdmin(ObjectAdapter adminAdapter, Identity adminId)
CommunicatorLocator,
createAdmin registers the Admin's Process facet with the Locator's LocatorRegistry.
createAdmin call only be called once; subsequent calls raise InitializationException.createAdmin in interface CommunicatoradminAdapter - The object adapter used to host the Admin object; if null and
Ice.Admin.Endpoints is set, create, activate and use the Ice.Admin object adapter.adminId - The identity of the Admin object.Communicator.getAdmin(),
LocatorRegistrypublic ObjectPrx getAdmin()
CommunicatorgetAdmin in interface CommunicatorCommunicator.createAdmin(Ice.ObjectAdapter, Ice.Identity)public void addAdminFacet(Object servant, java.lang.String facet)
CommunicatoraddAdminFacet in interface Communicatorservant - The servant that implements the new Admin facet.facet - The name of the new Admin facet.public Object removeAdminFacet(java.lang.String facet)
CommunicatorremoveAdminFacet in interface Communicatorfacet - The name of the Admin facet.public Object findAdminFacet(java.lang.String facet)
CommunicatorfindAdminFacet in interface Communicatorfacet - The name of the Admin facet.public java.util.Map<java.lang.String,Object> findAllAdminFacets()
CommunicatorfindAllAdminFacets in interface CommunicatorCommunicator.findAdminFacet(java.lang.String)public Instance getInstance()