Class RegistrySharedObject
- java.lang.Object
- 
- org.eclipse.ecf.core.sharedobject.BaseSharedObject
- 
- org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable,- IIdentifiable,- ISharedObject,- IRemoteServiceConsumer,- IRemoteServiceContainerAdapter,- IRemoteServiceHost
 
 public class RegistrySharedObject extends BaseSharedObject implements IRemoteServiceContainerAdapter 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static intADD_REGISTRATION_REQUEST_TIMEOUTprotected MapaddRegistrationRequestsMap of add registration requests.protected intaddRegistrationRequestTimeoutAdd registration request default timeoutprotected IConnectContextconnectContextConnect context to be used for connect.protected RemoteServiceRegistryImpllocalRegistryregistry impl for local remote service registrationsprotected static booleanPROPAGATE_RESPONSE_ERRORprotected longregistryUpdateRequestTimeoutprotected MapremoteRegistrysmap of registry impls for remote registrys key: ID (identifier of remote container), value: RemoteServiceRegistryImpl (copy of remote service registry for remote containerprotected ListrequestsList of invocation requests...instances of Requestprotected booleanrsConnectedWhether or not we are connectedprotected ObjectrsConnectLockprotected intrsConnectTimeoutAdd registration request default timeout.protected ListserviceListenersList of remote service listeners (added to/removed from by addRemoteServiceListener/removeRemoteServiceListener- 
Fields inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObjectDESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE
 
- 
 - 
Constructor SummaryConstructors Constructor Description RegistrySharedObject()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RemoteServiceRegistryImpladdRemoteRegistry(RemoteServiceRegistryImpl registry)voidaddRemoteServiceListener(IRemoteServiceListener listener)Add listener for remote service registration/unregistration for this containerprotected booleanaddRequest(Request request)org.eclipse.equinox.concurrent.future.IFutureasyncGetRemoteServiceReferences(ID[] idFilter, String clazz, String filter)Asynchronously returns an array ofIRemoteServiceReferenceobjects.org.eclipse.equinox.concurrent.future.IFutureasyncGetRemoteServiceReferences(ID target, String clazz, String filter)Asynchronously returns an array ofIRemoteServiceReferenceobjects.org.eclipse.equinox.concurrent.future.IFutureasyncGetRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter)Asynchronously returns an array ofIRemoteServiceReferenceobjects.protected ObjectcallSynch(RemoteServiceRegistrationImpl registration, IRemoteCall call)protected voidcheckRequestServiceAuthorization(ID remoteContainerID, AddRegistrationRequest request, Serializable credentials)protected voidclearRemoteRegistrys()protected voidconnectToRemoteServiceTarget(ID targetID)protected IRemoteServiceRegisteredEventcreateRegisteredEvent(RemoteServiceRegistrationImpl registration)IRemoteFiltercreateRemoteFilter(String filter)Creates aIRemoteFilterobject.protected RemoteServiceImplcreateRemoteService(RemoteServiceRegistrationImpl registration)protected org.eclipse.equinox.concurrent.future.IExecutorcreateRequestExecutor(Request request)protected IRemoteServiceUnregisteredEventcreateUnregisteredEvent(RemoteServiceRegistrationImpl registration)protected RequestdeserializeCallRequest(byte[] requestBytes)protected ResponsedeserializeCallResponse(byte[] responseBytes)voiddispose(ID containerID)Method called by the ISharedObjectContainer upon ISharedObject destruction.protected voidexecuteRequest(org.eclipse.equinox.concurrent.future.IExecutor executor, Request request, ID responseTarget, RemoteServiceRegistrationImpl localRegistration, boolean respond)protected voidfireCallCompleteEvent(IRemoteCallListener listener, long requestId, Object response, boolean hadException, Throwable exception)protected voidfireCallStartEvent(IRemoteCallListener listener, long requestId, IRemoteServiceReference reference, IRemoteCall call)protected voidfireRemoteServiceListeners(IRemoteServiceEvent event)protected SerializablegetAddRegistrationRequestCredentials(AddRegistrationRequest request)protected intgetAddRegistrationRequestTimeout()IRemoteServiceReference[]getAllRemoteServiceReferences(String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.protected RemoteServiceRegistrationImplgetLocalRegistrationForRequest(Request request)protected longgetRegistryUpdateRequestTimeout()protected RemoteServiceRegistryImplgetRemoteRegistry(ID containerID)IRemoteServicegetRemoteService(IRemoteServiceReference reference)Get remote service for given IRemoteServiceReference.protected IRemoteServiceCallPolicygetRemoteServiceCallPolicy()IRemoteServiceIDgetRemoteServiceID(ID containerId, long containerRelativeId)Get a remote service ID from a containerID and a containerRelative long value.NamespacegetRemoteServiceNamespace()Get namespace to use for this remote service provider.IRemoteServiceReferencegetRemoteServiceReference(IRemoteServiceID serviceId)Get the remote service reference known to this container for the given IRemoteServiceID.IRemoteServiceReference[]getRemoteServiceReferences(ID[] idFilter, String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.IRemoteServiceReference[]getRemoteServiceReferences(ID targetID, String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.IRemoteServiceReference[]getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.protected RequestgetRequest(long requestId)protected intgetRSConnectTimeout()protected ISharedObjectContextgetSOContext()protected ID[]getTargetsFromProperties(Dictionary properties)protected voidhandleAddRegistration(ID remoteContainerID, Integer requestId, RemoteServiceRegistrationImpl registration)protected voidhandleAddRegistration(ID remoteContainerID, RemoteServiceRegistrationImpl registration)protected voidhandleAddRegistrationRequestRefused(ID remoteContainerID, Integer requestId, AccessControlException e)protected voidhandleAddRegistrations(ID remoteContainerID, Integer requestId, RemoteServiceRegistrationImpl[] registrations)protected voidhandleCallRequest(Request request)protected voidhandleCallRequestBytes(byte[] requestBytes)protected voidhandleCallResponse(Response response)protected voidhandleCallResponseBytes(byte[] responseBytes)protected voidhandleContainerConnectedEvent(IContainerConnectedEvent event)protected voidhandleContainerDisconnectedEvent(IContainerDisconnectedEvent event)protected voidhandleContainerEjectedEvent(IContainerEjectedEvent event)protected voidhandleFireRequest(Request request)protected voidhandleRegistryActivatedEvent()protected voidhandleRegistryUpdateRequest(ID remoteContainerID)protected voidhandleRegistryUpdateRequest(ID remoteContainerID, Integer requestId)protected voidhandleRequestService(ID remoteContainerID, AddRegistrationRequest request, Integer requestId, Serializable credentials)protected booleanhandleSharedObjectMsg(SharedObjectMsg msg)SharedObjectMsg handler method.protected voidhandleTargetConnected(ID targetID)protected voidhandleUnregister(ID containerID, Long serviceId)voidinitialize()Initialize this shared object.protected ObjectinvokeLocal(RemoteServiceRegistrationImpl reg, RemoteCallImpl call)protected voidlog(int code, String method, Throwable e)protected voidlogException(int code, String message, Throwable e)protected voidlogRemoteCallException(String message, Throwable e)protected voidnotifyAddRegistrationResponse(ID remoteContainerID, Integer requestId, AccessControlException exception)IRemoteServiceRegistrationregisterRemoteService(String[] clazzes, Object service, Dictionary properties)Register a new remote service.protected RemoteServiceRegistryImplremoveRemoteRegistry(ID containerID)voidremoveRemoteServiceListener(IRemoteServiceListener listener)Remove remote service registration/unregistration listener for this container.protected booleanremoveRequest(Request request)protected voidsendAddRegistration(ID receiver, Integer requestId, RemoteServiceRegistrationImpl reg)protected voidsendAddRegistration(ID receiver, RemoteServiceRegistrationImpl reg)protected AddRegistrationRequestsendAddRegistrationRequest(ID receiver, AddRegistrationRequest request, Serializable credentials)protected voidsendAddRegistrationRequestRefused(ID receiver, Integer requestId, Exception except)protected voidsendAddRegistrations(ID receiver, Integer requestId, RemoteServiceRegistrationImpl[] regs)protected RequestsendCallRequest(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call)protected voidsendCallRequestWithListener(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call, IRemoteCallListener listener)protected voidsendCallResponse(ID responseTarget, Response response)protected RequestsendFireRequest(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call)protected voidsendRegistryUpdate(ID targetContainerID)protected voidsendRegistryUpdate(ID targetContainerID, Integer requestId)protected voidsendRegistryUpdateRequest()protected voidsendRegistryUpdateRequest(ID receiver, Integer requestId)protected voidsendUnregister(RemoteServiceRegistrationImpl serviceRegistration)protected byte[]serializeCallRequest(Request request)protected byte[]serializeCallResponse(Response response)voidsetConnectContextForAuthentication(IConnectContext connectContext)Set connect context for authentication upon subsequent calls toIRemoteServiceContainerAdapter.getRemoteServiceReferences(ID[], String, String)orIRemoteServiceContainerAdapter.asyncGetRemoteServiceReferences(ID[], String, String).protected voidsetRegistryConnected(boolean connected)booleansetRemoteServiceCallPolicy(IRemoteServiceCallPolicy policy)Set the remote service call policy to enable authorization on remote service method callsbooleanungetRemoteService(IRemoteServiceReference ref)Unget IRemoteServiceReference.- 
Methods inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObjectaddEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, fireEventProcessors, getAdapter, getConfig, getConnectedID, getContext, getGroupMemberIDs, getHomeContainerID, getID, getLocalContainerID, getProperties, getReplicaDescription, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsg, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, log, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf, trace, traceCatching, traceEntering, traceEntering, traceEntering, traceExiting, traceExiting
 
- 
 
- 
- 
- 
Field Detail- 
ADD_REGISTRATION_REQUEST_TIMEOUTprotected static final int ADD_REGISTRATION_REQUEST_TIMEOUT - Since:
- 3.3
 
 - 
PROPAGATE_RESPONSE_ERRORprotected static final boolean PROPAGATE_RESPONSE_ERROR - Since:
- 4.2
 
 - 
localRegistryprotected RemoteServiceRegistryImpl localRegistry registry impl for local remote service registrations
 - 
remoteRegistrysprotected final Map remoteRegistrys map of registry impls for remote registrys key: ID (identifier of remote container), value: RemoteServiceRegistryImpl (copy of remote service registry for remote container
 - 
serviceListenersprotected final List serviceListeners List of remote service listeners (added to/removed from by addRemoteServiceListener/removeRemoteServiceListener
 - 
addRegistrationRequestsprotected Map addRegistrationRequests Map of add registration requests. key: Integer (unique Request id), value: AddRegistrationRequest
 - 
addRegistrationRequestTimeoutprotected int addRegistrationRequestTimeout Add registration request default timeout- Since:
- 3.0
 
 - 
requestsprotected List requests List of invocation requests...instances of Request
 - 
connectContextprotected IConnectContext connectContext Connect context to be used for connect.- Since:
- 3.0
 
 - 
rsConnectLockprotected final Object rsConnectLock - Since:
- 3.3
 
 - 
rsConnectedprotected boolean rsConnected Whether or not we are connected- Since:
- 3.3
 
 - 
rsConnectTimeoutprotected int rsConnectTimeout Add registration request default timeout.- Since:
- 3.3
 
 - 
registryUpdateRequestTimeoutprotected long registryUpdateRequestTimeout - Since:
- 3.4
 
 
- 
 - 
Method Detail- 
getRemoteServiceReferencespublic IRemoteServiceReference[] getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException Description copied from interface:IRemoteServiceContainerAdapterReturns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.Note this method assumes that the enclosing container has previously been connected, and uses the idFilter to filter among targets within the previously connected set of container IDs. To request connection as part of reference lookup, see IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID, String, String).The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. targetis a remote container to connect to. Ifnull, no connection attempt is made.idFilteris used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned. IfidFilterisnull, all containers are considered to match the filter.filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax. Iffilterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- target- a target container to connect to if enclosing container is not already connected. May be- null.
- idFilter- an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- Array of IRemoteServiceReferences matching given search criteria or 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
- ContainerConnectException- if container cannot connect
- Since:
- 3.4
 
 - 
getRemoteServiceReferencespublic IRemoteServiceReference[] getRemoteServiceReferences(ID[] idFilter, String clazz, String filter) throws InvalidSyntaxException Description copied from interface:IRemoteServiceContainerAdapterReturns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.Note this method assumes that the enclosing container has previously been connected, and uses the idFilter to filter among targets within the previously connected set of container IDs. To request connection as part of reference lookup, see IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID, String, String).The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. idFilteris used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.If idFilterisnull, all containers are considered to match the filter.filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.If filterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- idFilter- an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- Array of IRemoteServiceReferences matching given search criteria or 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
 
 - 
getRemoteServiceReferencespublic IRemoteServiceReference[] getRemoteServiceReferences(ID targetID, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException Description copied from interface:IRemoteServiceContainerAdapterReturns an array of IRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. target is a remote container to connect to. filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.If filterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- targetID- an target to connect to if enclosing container is not already connected. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- Array of IRemoteServiceReferences matching given search criteria or 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
- ContainerConnectException- if container cannot connect
- Since:
- 3.0
 
 - 
getAllRemoteServiceReferencespublic IRemoteServiceReference[] getAllRemoteServiceReferences(String clazz, String filter) throws InvalidSyntaxException Description copied from interface:IRemoteServiceContainerAdapterReturns an array of IRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class, or if the clazz parameter isnullall services registered.The list is valid at the time of the call to this method, however since the remote service container is a very dynamic environment, services can be modified or unregistered at anytime. filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.If filterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getAllRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getAllRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- clazz- the fully qualified name of the interface class that describes the desired service. May be- null.
- filter- The filter criteria. May be- null.
- Returns:
- Array of IRemoteServiceReferences matching given search criteria or 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
- Since:
- 3.0
 
 - 
addRemoteServiceListenerpublic void addRemoteServiceListener(IRemoteServiceListener listener) Description copied from interface:IRemoteServiceContainerAdapterAdd listener for remote service registration/unregistration for this container- Specified by:
- addRemoteServiceListenerin interface- IRemoteServiceConsumer
- Specified by:
- addRemoteServiceListenerin interface- IRemoteServiceContainerAdapter
- Specified by:
- addRemoteServiceListenerin interface- IRemoteServiceHost
- Parameters:
- listener- notified of service registration/unregistration events. Must not be- null.
 
 - 
removeRemoteServiceListenerpublic void removeRemoteServiceListener(IRemoteServiceListener listener) Description copied from interface:IRemoteServiceContainerAdapterRemove remote service registration/unregistration listener for this container.- Specified by:
- removeRemoteServiceListenerin interface- IRemoteServiceConsumer
- Specified by:
- removeRemoteServiceListenerin interface- IRemoteServiceContainerAdapter
- Specified by:
- removeRemoteServiceListenerin interface- IRemoteServiceHost
- Parameters:
- listener- to remove. Must not be- null.
 
 - 
createRemoteServiceprotected RemoteServiceImpl createRemoteService(RemoteServiceRegistrationImpl registration) - Parameters:
- registration- registration
- Returns:
- RemoteServiceImpl remote service implementation
- Since:
- 4.1
 
 - 
getRemoteServicepublic IRemoteService getRemoteService(IRemoteServiceReference reference) Description copied from interface:IRemoteServiceContainerAdapterGet remote service for given IRemoteServiceReference. Note that clients that call this method successfully should later callIRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)when the IRemoteService will no longer be used.- Specified by:
- getRemoteServicein interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServicein interface- IRemoteServiceContainerAdapter
- Parameters:
- reference- the IRemoteServiceReference for the desired service. Must not be- null.
- Returns:
- IRemoteService representing the remote service. If remote service
         no longer exists for reference, then nullis returned.
- See Also:
- IRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)
 
 - 
registerRemoteServicepublic IRemoteServiceRegistration registerRemoteService(String[] clazzes, Object service, Dictionary properties) Description copied from interface:IRemoteServiceContainerAdapterRegister a new remote service. This method is to be called by the service server...i.e. the client that wishes to make available a service to other client within this container.- Specified by:
- registerRemoteServicein interface- IRemoteServiceContainerAdapter
- Specified by:
- registerRemoteServicein interface- IRemoteServiceHost
- Parameters:
- clazzes- the interface classes that the service exposes to remote clients. Must not be- nulland must not be an empty array.
- service- the service object. Under normal conditions this object must- not be null
- implement all of the classes specified by the first parameter
 - nullis if the service property- Constants.SERVICE_REGISTER_PROXYis set in the properties. If- Constants.SERVICE_REGISTER_PROXYis set in the properties parameter (to an arbitrary value), then the service object may then be- null.
- not be 
- properties- to be associated with service
- Returns:
- IRemoteServiceRegistration the service registration. Will not
         return null.
 
 - 
ungetRemoteServicepublic boolean ungetRemoteService(IRemoteServiceReference ref) Description copied from interface:IRemoteServiceContainerAdapterUnget IRemoteServiceReference. Release all resources associated with the given IRemoteServiceReference. This method should be called by users of the IRemoteServiceReference that have previously calledIRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference). If this method returns true, then the previously used IRemoteService will no longer be usable.- Specified by:
- ungetRemoteServicein interface- IRemoteServiceConsumer
- Specified by:
- ungetRemoteServicein interface- IRemoteServiceContainerAdapter
- Parameters:
- ref- the IRemoteServiceReference to unget
- Returns:
- true if unget successful, false if not. If this method returns true, then the IRemoteService instance previously retrieved via the given IRemoteServiceReference instance provided will no longer be usable.
- See Also:
- IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference)
 
 - 
asyncGetRemoteServiceReferencespublic org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID[] idFilter, String clazz, String filter) Description copied from interface:IRemoteServiceContainerAdapterAsynchronously returns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.Note this method assumes that the enclosing container has previously been connected, and uses the idFilter to filter among targets within the previously connected set of container IDs. To request connection as part of reference lookup, see IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID, String, String).The IFuture is returned immediately, and subsequent calls to IFuture.get()orIFuture.get(long)will return the actual results received. The type of the Object returned fromIFuture.get()will be IRemoteServiceReference [].The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. idFilteris used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.If idFilterisnull, all containers are considered to match the filter.filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- idFilter- an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- IFuture that through subsequent calls to IFuture#get() will return
         IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. 
         Will not return null.
- Since:
- 3.0
 
 - 
asyncGetRemoteServiceReferencespublic org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter) Description copied from interface:IRemoteServiceContainerAdapterAsynchronously returns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.The IFuture is returned immediately, and subsequent calls to IFuture.get()orIFuture.get(long)will return the actual results received. The type of the Object returned fromIFuture.get()will be IRemoteServiceReference [].The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. targetis a remote container to connect to. Ifnull, no connection attempt is made.idFilteris used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned. IfidFilterisnull, all containers are considered to match the filter.filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax. Iffilterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- target- an target to connect to if enclosing container is not already connected. May be- null.
- idFilter- an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- IFuture that through subsequent calls to IFuture#get() will return
         IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. 
         Will not return null.
- Since:
- 3.4
 
 - 
asyncGetRemoteServiceReferencespublic org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target, String clazz, String filter) Description copied from interface:IRemoteServiceContainerAdapterAsynchronously returns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.The IFuture is returned immediately, and subsequent calls to IFuture.get()orIFuture.get(long)will return the actual results received. The type of the Object returned fromIFuture.get()will be IRemoteServiceReference [].The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime. idFilteris used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.target is a remote container to connect to. filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- asyncGetRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Parameters:
- target- an target to connect to if enclosing container is not already connected. May be- null.
- clazz- the fully qualified name of the interface class that describes the desired service. Must not be- null.
- filter- The filter criteria. May be- null.
- Returns:
- IFuture that through subsequent calls to IFuture#get() will return
         IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. 
         Will not return null.
- Since:
- 3.0
 
 - 
getRemoteServiceNamespacepublic Namespace getRemoteServiceNamespace() Description copied from interface:IRemoteServiceContainerAdapterGet namespace to use for this remote service provider.- Specified by:
- getRemoteServiceNamespacein interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceNamespacein interface- IRemoteServiceContainerAdapter
- Specified by:
- getRemoteServiceNamespacein interface- IRemoteServiceHost
- Returns:
- Namespace to use for creating IRemoteServiceID for this remote service provider.  Will
 not return null.
- Since:
- 3.0
 
 - 
createRemoteFilterpublic IRemoteFilter createRemoteFilter(String filter) throws InvalidSyntaxException Description copied from interface:IRemoteServiceContainerAdapterCreates aIRemoteFilterobject. ThisIRemoteFilterobject may be used to match aIRemoteServiceReferenceobject or aDictionaryobject.If the filter cannot be parsed, an InvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- createRemoteFilterin interface- IRemoteServiceConsumer
- Specified by:
- createRemoteFilterin interface- IRemoteServiceContainerAdapter
- Parameters:
- filter- The filter string.
- Returns:
- A IRemoteFilterobject encapsulating the filter string.
- Throws:
- InvalidSyntaxException- If- filtercontains an invalid filter string that cannot be parsed.
- Since:
- 3.0
- See Also:
- "Framework specification for a description of the filter string syntax.", 
FrameworkUtil.createFilter(String)
 
 - 
getRemoteServiceReferencepublic IRemoteServiceReference getRemoteServiceReference(IRemoteServiceID serviceId) Description copied from interface:IRemoteServiceContainerAdapterGet the remote service reference known to this container for the given IRemoteServiceID. Note that this method must be guaranteed not to block by the provider implementation.- Specified by:
- getRemoteServiceReferencein interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencein interface- IRemoteServiceContainerAdapter
- Parameters:
- serviceId- the serviceID to retrieve the IRemoteServiceReference for.
- Returns:
- IRemoteServiceReference the remote service reference associated with the given serviceID.
 Will return nullif no IRemoteServiceReference found for the given serviceID.
- Since:
- 3.0
 
 - 
getRemoteServiceIDpublic IRemoteServiceID getRemoteServiceID(ID containerId, long containerRelativeId) Description copied from interface:IRemoteServiceContainerAdapterGet a remote service ID from a containerID and a containerRelative long value. Will return a non-null value if the IRemoteServiceRegistration/Reference is currently 'known' to this container adapter.nullif not.- Specified by:
- getRemoteServiceIDin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceIDin interface- IRemoteServiceContainerAdapter
- Specified by:
- getRemoteServiceIDin interface- IRemoteServiceHost
- Parameters:
- containerId- the containerID that is the server/host for the remote service. Must not be- null. This must be the containerID for the server/host of the remote service.
- containerRelativeId- the long value identifying the remote service relative to the container ID.
- Returns:
- IRemoteServiceID instance if the associated IRemoteServiceRegistration/Reference is known to this container
 adapter, nullif it is not.
- Since:
- 3.0
 
 - 
setConnectContextForAuthenticationpublic void setConnectContextForAuthentication(IConnectContext connectContext) Description copied from interface:IRemoteServiceContainerAdapterSet connect context for authentication upon subsequent calls toIRemoteServiceContainerAdapter.getRemoteServiceReferences(ID[], String, String)orIRemoteServiceContainerAdapter.asyncGetRemoteServiceReferences(ID[], String, String). This method should be called with a non-null connectContext in order to allow authentication to occur during.- Specified by:
- setConnectContextForAuthenticationin interface- IRemoteServiceConsumer
- Specified by:
- setConnectContextForAuthenticationin interface- IRemoteServiceContainerAdapter
- Parameters:
- connectContext- the connect context to use for authenticating. If- null, then no authentication will be attempted.
- Since:
- 3.0
 
 - 
initializepublic void initialize() throws SharedObjectInitExceptionDescription copied from class:BaseSharedObjectInitialize this shared object. Subclasses may override as appropriate to define custom initialization behavior. If initialization should fail, then a SharedObjectInitException should be thrown by implementing code. Also, subclasses overriding this method should call super.initialize() before running their own code.- Overrides:
- initializein class- BaseSharedObject
- Throws:
- SharedObjectInitException- if initialization should throw
 
 - 
disposepublic void dispose(ID containerID) Description copied from interface:ISharedObjectMethod called by the ISharedObjectContainer upon ISharedObject destruction. Once this method is called, no more Events will be passed to a ISharedObject until the init method is called again.- Specified by:
- disposein interface- ISharedObject
- Overrides:
- disposein class- BaseSharedObject
- Parameters:
- containerID- the ID of the container that is disposing this ISharedObject
 
 - 
getRSConnectTimeoutprotected int getRSConnectTimeout() - Returns:
- int connect timeout
- Since:
- 3.3
 
 - 
getRegistryUpdateRequestTimeoutprotected long getRegistryUpdateRequestTimeout() - Returns:
- long registry update request timeout
- Since:
- 3.4
 
 - 
getAddRegistrationRequestTimeoutprotected int getAddRegistrationRequestTimeout() - Returns:
- int add registration request timeout
- Since:
- 3.0
 
 - 
connectToRemoteServiceTargetprotected void connectToRemoteServiceTarget(ID targetID) throws ContainerConnectException - Parameters:
- targetID- target ID to connect to
- Throws:
- ContainerConnectException- if container cannot connect to target ID
- Since:
- 3.3 for preventing issues like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=304427
 
 - 
getAddRegistrationRequestCredentialsprotected Serializable getAddRegistrationRequestCredentials(AddRegistrationRequest request) 
 - 
getTargetsFromPropertiesprotected ID[] getTargetsFromProperties(Dictionary properties) 
 - 
getSOContextprotected ISharedObjectContext getSOContext() 
 - 
handleRegistryActivatedEventprotected void handleRegistryActivatedEvent() - Since:
- 3.4
 
 - 
handleContainerEjectedEventprotected void handleContainerEjectedEvent(IContainerEjectedEvent event) - Parameters:
- event- event to handle
- Since:
- 3.3
 
 - 
clearRemoteRegistrysprotected void clearRemoteRegistrys() - Since:
- 3.4
 
 - 
setRegistryConnectedprotected void setRegistryConnected(boolean connected) - Parameters:
- connected- true if registry is connected, false otherwise
- Since:
- 3.3
 
 - 
handleContainerDisconnectedEventprotected void handleContainerDisconnectedEvent(IContainerDisconnectedEvent event) 
 - 
sendRegistryUpdateprotected void sendRegistryUpdate(ID targetContainerID) 
 - 
sendRegistryUpdateprotected void sendRegistryUpdate(ID targetContainerID, Integer requestId) - Parameters:
- targetContainerID- target container ID
- requestId- requestId
- Since:
- 3.4
 
 - 
handleContainerConnectedEventprotected void handleContainerConnectedEvent(IContainerConnectedEvent event) 
 - 
handleTargetConnectedprotected void handleTargetConnected(ID targetID) - Parameters:
- targetID- targetID
- Since:
- 3.4
 
 - 
fireRemoteServiceListenersprotected void fireRemoteServiceListeners(IRemoteServiceEvent event) 
 - 
callSynchprotected Object callSynch(RemoteServiceRegistrationImpl registration, IRemoteCall call) throws ECFException - Throws:
- ECFException
 
 - 
fireCallStartEventprotected void fireCallStartEvent(IRemoteCallListener listener, long requestId, IRemoteServiceReference reference, IRemoteCall call) 
 - 
fireCallCompleteEventprotected void fireCallCompleteEvent(IRemoteCallListener listener, long requestId, Object response, boolean hadException, Throwable exception) 
 - 
sendRegistryUpdateRequestprotected void sendRegistryUpdateRequest(ID receiver, Integer requestId) - Parameters:
- receiver- receiver
- requestId- requestId
- Since:
- 3.4
 
 - 
handleRegistryUpdateRequestprotected void handleRegistryUpdateRequest(ID remoteContainerID, Integer requestId) - Parameters:
- remoteContainerID- remoteContainerID
- requestId- requestId
- Since:
- 3.4
 
 - 
sendRegistryUpdateRequestprotected void sendRegistryUpdateRequest() 
 - 
handleRegistryUpdateRequestprotected void handleRegistryUpdateRequest(ID remoteContainerID) 
 - 
sendAddRegistrationRequestprotected AddRegistrationRequest sendAddRegistrationRequest(ID receiver, AddRegistrationRequest request, Serializable credentials) 
 - 
checkRequestServiceAuthorizationprotected void checkRequestServiceAuthorization(ID remoteContainerID, AddRegistrationRequest request, Serializable credentials) throws AccessControlException - Throws:
- AccessControlException
 
 - 
handleRequestServiceprotected void handleRequestService(ID remoteContainerID, AddRegistrationRequest request, Integer requestId, Serializable credentials) 
 - 
sendAddRegistrationprotected void sendAddRegistration(ID receiver, RemoteServiceRegistrationImpl reg) 
 - 
sendAddRegistrationprotected void sendAddRegistration(ID receiver, Integer requestId, RemoteServiceRegistrationImpl reg) 
 - 
sendAddRegistrationsprotected void sendAddRegistrations(ID receiver, Integer requestId, RemoteServiceRegistrationImpl[] regs) - Parameters:
- receiver- receiver
- requestId- requestId
- regs- registrations to send
- Since:
- 3.3
 
 - 
sendAddRegistrationRequestRefusedprotected void sendAddRegistrationRequestRefused(ID receiver, Integer requestId, Exception except) 
 - 
handleAddRegistrationRequestRefusedprotected void handleAddRegistrationRequestRefused(ID remoteContainerID, Integer requestId, AccessControlException e) 
 - 
handleAddRegistrationprotected void handleAddRegistration(ID remoteContainerID, RemoteServiceRegistrationImpl registration) 
 - 
handleAddRegistrationsprotected void handleAddRegistrations(ID remoteContainerID, Integer requestId, RemoteServiceRegistrationImpl[] registrations) - Parameters:
- remoteContainerID- container id
- requestId- requestId
- registrations- the registrations to add
- Since:
- 3.3
 
 - 
handleAddRegistrationprotected void handleAddRegistration(ID remoteContainerID, Integer requestId, RemoteServiceRegistrationImpl registration) 
 - 
notifyAddRegistrationResponseprotected void notifyAddRegistrationResponse(ID remoteContainerID, Integer requestId, AccessControlException exception) - Parameters:
- remoteContainerID- remoteContainerID
- requestId- requestId
- exception- exception
- Since:
- 3.2
 
 - 
sendCallRequestprotected Request sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call) throws IOException - Throws:
- IOException
 
 - 
serializeCallRequestprotected byte[] serializeCallRequest(Request request) throws IOException - Throws:
- IOException
- Since:
- 4.6
 
 - 
deserializeCallRequestprotected Request deserializeCallRequest(byte[] requestBytes) throws IOException - Throws:
- IOException
- Since:
- 4.6
 
 - 
serializeCallResponseprotected byte[] serializeCallResponse(Response response) throws IOException - Throws:
- IOException
- Since:
- 4.6
 
 - 
deserializeCallResponseprotected Response deserializeCallResponse(byte[] responseBytes) throws IOException - Throws:
- IOException
- Since:
- 4.6
 
 - 
createRequestExecutorprotected org.eclipse.equinox.concurrent.future.IExecutor createRequestExecutor(Request request) - Parameters:
- request- request
- Returns:
- IExcecutor excecutor to use for given request
- Since:
- 3.4
 
 - 
invokeLocalprotected Object invokeLocal(RemoteServiceRegistrationImpl reg, RemoteCallImpl call) throws InvocationTargetException, Exception, NoClassDefFoundError - Throws:
- InvocationTargetException
- Exception
- NoClassDefFoundError
- Since:
- 4.4
 
 - 
executeRequestprotected void executeRequest(org.eclipse.equinox.concurrent.future.IExecutor executor, Request request, ID responseTarget, RemoteServiceRegistrationImpl localRegistration, boolean respond)- Parameters:
- executor- executor to use to execute request
- request- the request to execute
- responseTarget- response target
- localRegistration- the local registration
- respond- true if response is expected, false otherwise
- Since:
- 3.4
 
 - 
handleCallRequestBytesprotected void handleCallRequestBytes(byte[] requestBytes) - Since:
- 4.6
 
 - 
handleCallRequestprotected void handleCallRequest(Request request) 
 - 
logRemoteCallExceptionprotected void logRemoteCallException(String message, Throwable e) - Parameters:
- message- message
- e- the exception
- Since:
- 3.4
 
 - 
sendCallRequestWithListenerprotected void sendCallRequestWithListener(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call, IRemoteCallListener listener) 
 - 
logprotected void log(int code, String method, Throwable e)- Overrides:
- login class- BaseSharedObject
 
 - 
handleCallResponseprotected void handleCallResponse(Response response) 
 - 
handleCallResponseBytesprotected void handleCallResponseBytes(byte[] responseBytes) - Since:
- 4.6
 
 - 
sendFireRequestprotected Request sendFireRequest(RemoteServiceRegistrationImpl remoteRegistration, IRemoteCall call) throws ECFException - Throws:
- ECFException
 
 - 
handleFireRequestprotected void handleFireRequest(Request request) 
 - 
sendUnregisterprotected void sendUnregister(RemoteServiceRegistrationImpl serviceRegistration) 
 - 
createUnregisteredEventprotected IRemoteServiceUnregisteredEvent createUnregisteredEvent(RemoteServiceRegistrationImpl registration) 
 - 
createRegisteredEventprotected IRemoteServiceRegisteredEvent createRegisteredEvent(RemoteServiceRegistrationImpl registration) 
 - 
addRemoteRegistryprotected RemoteServiceRegistryImpl addRemoteRegistry(RemoteServiceRegistryImpl registry) 
 - 
getRemoteRegistryprotected RemoteServiceRegistryImpl getRemoteRegistry(ID containerID) 
 - 
removeRemoteRegistryprotected RemoteServiceRegistryImpl removeRemoteRegistry(ID containerID) 
 - 
getLocalRegistrationForRequestprotected RemoteServiceRegistrationImpl getLocalRegistrationForRequest(Request request) - Parameters:
- request- request
- Returns:
- RemoteServiceRegistrationImpl the registration
- Since:
- 3.2
 
 - 
addRequestprotected boolean addRequest(Request request) - Parameters:
- request- the request to add
- Returns:
- true if added, false if not added
- Since:
- 3.2
 
 - 
getRequestprotected Request getRequest(long requestId) - Parameters:
- requestId- requestId
- Returns:
- Request the request associated with the given requestId or null
- Since:
- 3.2
 
 - 
removeRequestprotected boolean removeRequest(Request request) - Parameters:
- request- request
- Returns:
- boolean true if removed, false otherwise
- Since:
- 3.2
 
 - 
handleSharedObjectMsgprotected boolean handleSharedObjectMsg(SharedObjectMsg msg) Description copied from class:BaseSharedObjectSharedObjectMsg handler method. This method will be called byBaseSharedObject.handleSharedObjectMsgEvent(ISharedObjectMessageEvent)when a SharedObjectMsg is received either from a local source or a remote source. This default implementation simply returns false so that other processing of of the given msg can occur. Subclasses should override this behavior to define custom logic for handling SharedObjectMsgs.- Overrides:
- handleSharedObjectMsgin class- BaseSharedObject
- Parameters:
- msg- the SharedObjectMsg received
- Returns:
- true if the msg has been completely handled and subsequent processing should stop. False if processing should continue
 
 - 
getRemoteServiceCallPolicyprotected IRemoteServiceCallPolicy getRemoteServiceCallPolicy() - Returns:
- IRemoteServiceCallPolicy the policy.  May be null
- Since:
- 4.0
 
 - 
setRemoteServiceCallPolicypublic boolean setRemoteServiceCallPolicy(IRemoteServiceCallPolicy policy) Description copied from interface:IRemoteServiceContainerAdapterSet the remote service call policy to enable authorization on remote service method calls- Specified by:
- setRemoteServiceCallPolicyin interface- IRemoteServiceContainerAdapter
- Parameters:
- policy- the policy to set. May be- null
- Returns:
- boolean true if set, false if cannot be set.
- Since:
- 4.0
 
 
- 
 
-