|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.core.sharedobject.BaseSharedObject
org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject
public class RegistrySharedObject
| Field Summary | |
|---|---|
protected java.util.Map |
addRegistrationRequests
|
protected RemoteServiceRegistryImpl |
localRegistry
|
protected java.util.Map |
localServiceRegistrations
|
protected java.util.Map |
remoteRegistrys
|
protected java.util.List |
requests
|
protected java.util.List |
serviceListeners
|
| Fields inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject |
|---|
DESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE |
| Constructor Summary | |
|---|---|
RegistrySharedObject()
|
|
| Method Summary | |
|---|---|
protected RemoteServiceRegistryImpl |
addRemoteRegistry(RemoteServiceRegistryImpl registry)
End message send/handlers |
void |
addRemoteServiceListener(IRemoteServiceListener listener)
Add listener for remote service registration/unregistration for this container |
protected java.lang.Object |
callSynch(RemoteServiceRegistrationImpl registration,
IRemoteCall call)
|
protected void |
checkRequestServiceAuthorization(ID remoteContainerID,
AddRegistrationRequest request,
java.io.Serializable credentials)
|
protected IRemoteServiceRegisteredEvent |
createRegisteredEvent(RemoteServiceRegistrationImpl registration)
|
protected IRemoteServiceUnregisteredEvent |
createUnregisteredEvent(RemoteServiceRegistrationImpl registration)
|
void |
dispose(ID containerID)
|
protected void |
fireCallCompleteEvent(IRemoteCallListener listener,
long requestId,
java.lang.Object response,
boolean hadException,
java.lang.Throwable exception)
|
protected void |
fireCallStartEvent(IRemoteCallListener listener,
long requestId,
IRemoteServiceReference reference,
IRemoteCall call)
|
protected void |
fireRemoteServiceListeners(IRemoteServiceEvent event)
|
protected java.io.Serializable |
getAddRegistrationRequestCredentials(AddRegistrationRequest request)
|
protected RemoteServiceRegistryImpl |
getRemoteRegistry(ID containerID)
|
IRemoteService |
getRemoteService(IRemoteServiceReference reference)
Get remote service for given IRemoteServiceReference. |
IRemoteServiceReference[] |
getRemoteServiceReferences(ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
Returns an array of IRemoteServiceReference objects. |
protected org.eclipse.ecf.core.sharedobject.ISharedObjectContext |
getSOContext()
|
protected ID[] |
getTargetsFromProperties(java.util.Dictionary properties)
|
protected void |
handleAddRegistration(ID remoteContainerID,
java.lang.Integer requestId,
RemoteServiceRegistrationImpl registration)
|
protected void |
handleAddRegistration(ID remoteContainerID,
RemoteServiceRegistrationImpl registration)
|
protected void |
handleAddRegistrationRequestRefused(ID remoteContainerID,
java.lang.Integer requestId,
java.security.AccessControlException e)
|
protected void |
handleCallRequest(Request request)
|
protected void |
handleCallResponse(Response response)
|
protected void |
handleContainerConnectedEvent(IContainerConnectedEvent event)
|
protected void |
handleContainerDisconnectedEvent(IContainerDisconnectedEvent event)
|
protected void |
handleFireRequest(Request request)
|
protected void |
handleRegistryUpdateRequest(ID remoteContainerID)
|
protected void |
handleRequestService(ID remoteContainerID,
AddRegistrationRequest request,
java.lang.Integer requestId,
java.io.Serializable credentials)
|
protected boolean |
handleSharedObjectMsg(org.eclipse.ecf.core.sharedobject.SharedObjectMsg msg)
|
protected void |
handleUnregister(ID containerID,
java.lang.Long serviceId)
|
void |
initialize()
|
IRemoteServiceRegistration |
registerRemoteService(java.lang.String[] clazzes,
java.lang.Object service,
java.util.Dictionary properties)
Register a new remote service. |
protected RemoteServiceRegistryImpl |
removeRemoteRegistry(ID containerID)
|
void |
removeRemoteServiceListener(IRemoteServiceListener listener)
Remove remote service registration/unregistration listener for this container. |
protected void |
sendAddRegistration(ID receiver,
java.lang.Integer requestId,
RemoteServiceRegistrationImpl reg)
|
protected void |
sendAddRegistration(ID receiver,
RemoteServiceRegistrationImpl reg)
|
protected AddRegistrationRequest |
sendAddRegistrationRequest(ID receiver,
AddRegistrationRequest request,
java.io.Serializable credentials)
|
protected void |
sendAddRegistrationRequestRefused(ID receiver,
java.lang.Integer requestId,
java.lang.Exception except)
|
protected Request |
sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call)
|
protected void |
sendCallRequestWithListener(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call,
IRemoteCallListener listener)
|
protected void |
sendCallResponse(ID responseTarget,
Response response)
|
protected Request |
sendFireRequest(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call)
|
protected void |
sendRegistryUpdate(ID targetContainerID)
|
protected void |
sendRegistryUpdateRequest()
|
protected void |
sendUnregister(RemoteServiceRegistrationImpl serviceRegistration)
|
boolean |
ungetRemoteService(IRemoteServiceReference ref)
Unget IRemoteServiceReference. |
| Methods inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject |
|---|
addEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, fireEventProcessors, getAdapter, getConfig, getConnectedID, getContext, getGroupMemberIDs, getHomeContainerID, getID, getLocalContainerID, getProperties, getReplicaDescription, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, log, log, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf, traceCatching, traceEntering, traceEntering, traceEntering, traceExiting, traceExiting |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Field Detail |
|---|
protected RemoteServiceRegistryImpl localRegistry
protected final java.util.Map remoteRegistrys
protected final java.util.List serviceListeners
protected final java.util.Map localServiceRegistrations
protected java.util.Map addRegistrationRequests
protected java.util.List requests
| Constructor Detail |
|---|
public RegistrySharedObject()
| Method Detail |
|---|
public void dispose(ID containerID)
dispose in interface org.eclipse.ecf.core.sharedobject.ISharedObjectdispose in class org.eclipse.ecf.core.sharedobject.BaseSharedObjectpublic void addRemoteServiceListener(IRemoteServiceListener listener)
IRemoteServiceContainerAdapter
addRemoteServiceListener in interface IRemoteServiceContainerAdapterlistener - notified of service registration/unregistration events. Must
not be null .public void removeRemoteServiceListener(IRemoteServiceListener listener)
IRemoteServiceContainerAdapter
removeRemoteServiceListener in interface IRemoteServiceContainerAdapterlistener - to remove. Must not be null .public IRemoteService getRemoteService(IRemoteServiceReference reference)
IRemoteServiceContainerAdapterIRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)
when the IRemoteService will no longer be used.
getRemoteService in interface IRemoteServiceContainerAdapterreference - the IRemoteServiceReference for the desired service. Must not
be null .
null is
returned.IRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)
public IRemoteServiceReference[] getRemoteServiceReferences(ID[] idFilter,
java.lang.String clazz,
java.lang.String filter)
throws org.osgi.framework.InvalidSyntaxException
IRemoteServiceContainerAdapterIRemoteServiceReference objects. The
returned array of IRemoteServiceReference objects 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.
idFilter is 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 idFilter is null, all containers are
considered to match the filter.
filter is used to select the registered service whose
properties objects contain keys and values which satisfy the filter. See
Filter for a description of the filter string syntax.
If filter is null, all registered services
are considered to match the filter. If filter cannot be
parsed, an InvalidSyntaxException will be thrown with a human
readable message where the filter became unparsable.
getRemoteServiceReferences in interface IRemoteServiceContainerAdapteridFilter - 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.
null if no services are found that match the search.
org.osgi.framework.InvalidSyntaxException - If filter contains an invalid filter string that cannot be parsed.protected java.io.Serializable getAddRegistrationRequestCredentials(AddRegistrationRequest request)
protected ID[] getTargetsFromProperties(java.util.Dictionary properties)
public IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes,
java.lang.Object service,
java.util.Dictionary properties)
IRemoteServiceContainerAdapter
registerRemoteService in interface IRemoteServiceContainerAdapterclazzes - the interface classes that the service exposes to remote
clients. Must not be null and must not be an
empty array.service - the service object itself. This object must implement all of
the classes specified by the first parameterproperties - to be associated with service
null .public boolean ungetRemoteService(IRemoteServiceReference ref)
IRemoteServiceContainerAdapterIRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference).
If this method returns true, then the previously used IRemoteService will
no longer be usable.
ungetRemoteService in interface IRemoteServiceContainerAdapterref - the IRemoteServiceReference to unget
IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference)protected org.eclipse.ecf.core.sharedobject.ISharedObjectContext getSOContext()
public void initialize()
throws org.eclipse.ecf.core.sharedobject.SharedObjectInitException
initialize in class org.eclipse.ecf.core.sharedobject.BaseSharedObjectorg.eclipse.ecf.core.sharedobject.SharedObjectInitExceptionprotected void handleContainerDisconnectedEvent(IContainerDisconnectedEvent event)
protected void sendRegistryUpdate(ID targetContainerID)
protected void handleContainerConnectedEvent(IContainerConnectedEvent event)
protected void fireRemoteServiceListeners(IRemoteServiceEvent event)
protected java.lang.Object callSynch(RemoteServiceRegistrationImpl registration,
IRemoteCall call)
throws ECFException
ECFException
protected void fireCallStartEvent(IRemoteCallListener listener,
long requestId,
IRemoteServiceReference reference,
IRemoteCall call)
protected void fireCallCompleteEvent(IRemoteCallListener listener,
long requestId,
java.lang.Object response,
boolean hadException,
java.lang.Throwable exception)
protected void sendRegistryUpdateRequest()
protected void handleRegistryUpdateRequest(ID remoteContainerID)
protected AddRegistrationRequest sendAddRegistrationRequest(ID receiver,
AddRegistrationRequest request,
java.io.Serializable credentials)
protected void checkRequestServiceAuthorization(ID remoteContainerID,
AddRegistrationRequest request,
java.io.Serializable credentials)
throws java.security.AccessControlException
java.security.AccessControlException
protected void handleRequestService(ID remoteContainerID,
AddRegistrationRequest request,
java.lang.Integer requestId,
java.io.Serializable credentials)
protected void sendAddRegistration(ID receiver,
RemoteServiceRegistrationImpl reg)
protected void sendAddRegistration(ID receiver,
java.lang.Integer requestId,
RemoteServiceRegistrationImpl reg)
protected void sendAddRegistrationRequestRefused(ID receiver,
java.lang.Integer requestId,
java.lang.Exception except)
protected void handleAddRegistrationRequestRefused(ID remoteContainerID,
java.lang.Integer requestId,
java.security.AccessControlException e)
protected void handleAddRegistration(ID remoteContainerID,
RemoteServiceRegistrationImpl registration)
protected void handleAddRegistration(ID remoteContainerID,
java.lang.Integer requestId,
RemoteServiceRegistrationImpl registration)
protected Request sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call)
throws java.io.IOException
java.io.IOExceptionprotected void handleCallRequest(Request request)
protected void sendCallRequestWithListener(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call,
IRemoteCallListener listener)
protected void sendCallResponse(ID responseTarget,
Response response)
protected void handleCallResponse(Response response)
protected Request sendFireRequest(RemoteServiceRegistrationImpl remoteRegistration,
IRemoteCall call)
throws ECFException
ECFExceptionprotected void handleFireRequest(Request request)
protected void sendUnregister(RemoteServiceRegistrationImpl serviceRegistration)
protected void handleUnregister(ID containerID,
java.lang.Long serviceId)
protected IRemoteServiceUnregisteredEvent createUnregisteredEvent(RemoteServiceRegistrationImpl registration)
protected IRemoteServiceRegisteredEvent createRegisteredEvent(RemoteServiceRegistrationImpl registration)
protected RemoteServiceRegistryImpl addRemoteRegistry(RemoteServiceRegistryImpl registry)
protected RemoteServiceRegistryImpl getRemoteRegistry(ID containerID)
protected RemoteServiceRegistryImpl removeRemoteRegistry(ID containerID)
protected boolean handleSharedObjectMsg(org.eclipse.ecf.core.sharedobject.SharedObjectMsg msg)
handleSharedObjectMsg in class org.eclipse.ecf.core.sharedobject.BaseSharedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||