Class TopologyManagerImpl
java.lang.Object
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager
org.eclipse.ecf.osgi.services.remoteserviceadmin.TopologyManagerImpl
- All Implemented Interfaces:
EndpointEventListener
,EndpointListener
public class TopologyManagerImpl
extends AbstractTopologyManager
implements EndpointListener, EndpointEventListener
- Since:
- 4.6
-
Field Summary
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager
SERVICE_EXPORTED_INTERFACES_WILDCARD
Fields inherited from interface org.osgi.service.remoteserviceadmin.EndpointEventListener
ENDPOINT_LISTENER_SCOPE
Fields inherited from interface org.osgi.service.remoteserviceadmin.EndpointListener
ENDPOINT_LISTENER_SCOPE
-
Constructor Summary
ConstructorDescriptionTopologyManagerImpl
(BundleContext context) TopologyManagerImpl
(BundleContext context, boolean allowLocalHost, String... otherFilters) -
Method Summary
Modifier and TypeMethodDescriptionprotected EndpointDescription
void
endpointAdded
(EndpointDescription endpoint, String matchedFilter) Register an endpoint with this listener.void
endpointChanged
(EndpointEvent event, String matchedFilter) Notification that an endpoint has changed.void
endpointRemoved
(EndpointDescription endpoint, String matchedFilter) Remove the registration of an endpoint.protected void
exportRegisteredServices
(String exportRegisteredSvcsFilter) protected String
protected void
handleEndpointAdded
(EndpointDescription endpoint, String matchedFilter) protected void
handleEndpointModified
(EndpointDescription endpoint, String matchedFilter) protected void
handleEndpointModifiedEndmatch
(EndpointDescription endpoint, String matchedFilter) protected void
handleEndpointRemoved
(EndpointDescription endpoint, String matchedFilter) protected void
handleEvent
(ServiceEvent event, Map listeners) protected void
handleOtherFilterEndpointAdded
(EndpointDescription endpoint, String matchedFilter) protected void
handleOtherFilterEndpointModified
(EndpointDescription endpoint, String matchedFilter) protected void
handleOtherFilterEndpointModifiedEndmatch
(EndpointDescription endpoint, String matchedFilter) protected void
handleOtherFilterEndpointRemoved
(EndpointDescription endpoint, String matchedFilter) protected void
Methods inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager
advertiseEndpointDescription, advertiseModifyEndpointDescription, close, createISIFFilter, createRSAFilter, getContext, getRemoteServiceAdmin, handleAdvertisingResult, handleECFEndpointAdded, handleECFEndpointModified, handleECFEndpointRemoved, handleInvalidImportRegistration, handleNonECFEndpointAdded, handleNonECFEndpointModified, handleNonECFEndpointRemoved, handleNonECFEndpointRemoved, handleServiceModifying, handleServiceRegistering, handleServiceUnregistering, hasDescription, logError, logError, logError, logWarning, trace, unadvertiseEndpointDescription
-
Field Details
-
STARTUP_WAIT_TIME
public static final int STARTUP_WAIT_TIME
-
-
Constructor Details
-
TopologyManagerImpl
-
TopologyManagerImpl
- Since:
- 4.9
-
-
Method Details
-
getFrameworkUUID
- Overrides:
getFrameworkUUID
in classAbstractTopologyManager
-
handleEvent
- Overrides:
handleEvent
in classAbstractTopologyManager
- Parameters:
event
- the service eventlisteners
- map of listeners
-
handleRemoteAdminEvent
-
endpointChanged
Description copied from interface:EndpointEventListener
Notification that an endpoint has changed. Details of the change is captured in the Endpoint Event provided. This could be that an endpoint was added, removed or modified.- Specified by:
endpointChanged
in interfaceEndpointEventListener
- Parameters:
event
- The event containing the details about the change.matchedFilter
- The filter from theEndpointEventListener.ENDPOINT_LISTENER_SCOPE
that matches (or forEndpointEvent.MODIFIED_ENDMATCH
andEndpointEvent.REMOVED
used to match) the endpoint, must not benull
.
-
handleEndpointAdded
-
handleOtherFilterEndpointAdded
- Since:
- 4.9
-
handleEndpointRemoved
-
handleOtherFilterEndpointRemoved
- Since:
- 4.9
-
convertEndpointDescriptionFromOSGiToECF
- Since:
- 4.9
-
handleEndpointModifiedEndmatch
-
handleOtherFilterEndpointModifiedEndmatch
protected void handleOtherFilterEndpointModifiedEndmatch(EndpointDescription endpoint, String matchedFilter) - Since:
- 4.9
-
handleEndpointModified
-
handleOtherFilterEndpointModified
protected void handleOtherFilterEndpointModified(EndpointDescription endpoint, String matchedFilter) - Since:
- 4.9
-
exportRegisteredServices
-
endpointAdded
Description copied from interface:EndpointListener
Register an endpoint with this listener. If the endpoint matches one of the filters registered with theEndpointListener.ENDPOINT_LISTENER_SCOPE
service property then this filter should be given as thematchedFilter
parameter. When this service is first registered or it is modified, it should receive all known endpoints matching the filter.- Specified by:
endpointAdded
in interfaceEndpointListener
- Parameters:
endpoint
- The Endpoint Description to be publishedmatchedFilter
- The filter from theEndpointListener.ENDPOINT_LISTENER_SCOPE
that matched the endpoint, must not benull
.
-
endpointRemoved
Description copied from interface:EndpointListener
Remove the registration of an endpoint. If an endpoint that was registered with theEndpointListener.endpointAdded(EndpointDescription, String)
method is no longer available then this method should be called. This will remove the endpoint from the listener. It is not necessary to remove endpoints when the service is unregistered or modified in such a way that not all endpoints match the interest filter anymore.- Specified by:
endpointRemoved
in interfaceEndpointListener
- Parameters:
endpoint
- The Endpoint Description that is no longer valid.matchedFilter
- The filter from theEndpointListener.ENDPOINT_LISTENER_SCOPE
that matched the endpoint, must not benull
.
-