Package org.eclipse.ecf.osgi.services.remoteserviceadmin

## 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
`static int` `STARTUP_WAIT_TIME`

### 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

Constructors
`TopologyManagerImpl​(BundleContext context)`
`TopologyManagerImpl​(BundleContext context, boolean allowLocalHost, String... otherFilters)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected EndpointDescription` `convertEndpointDescriptionFromOSGiToECF​(EndpointDescription ed)`
`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` `getFrameworkUUID()`
`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` `handleRemoteAdminEvent​(RemoteServiceAdminEvent event)`

### 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### STARTUP_WAIT_TIME

    public static final int STARTUP_WAIT_TIME

### Constructor Detail

#### TopologyManagerImpl

    public TopologyManagerImpl​(BundleContext context)

#### TopologyManagerImpl

    public TopologyManagerImpl​(BundleContext context,
                               boolean allowLocalHost,
                               String... otherFilters)

Since:
  4.9

### Method Detail

#### getFrameworkUUID

    protected String getFrameworkUUID()

Overrides:
  `getFrameworkUUID` in class `AbstractTopologyManager`

#### handleEvent

    protected void handleEvent​(ServiceEvent event,
                               Map listeners)

Overrides:
  `handleEvent` in class `AbstractTopologyManager`
Parameters:
  `event` - the service event
  `listeners` - map of listeners

#### handleRemoteAdminEvent

    protected void handleRemoteAdminEvent​(RemoteServiceAdminEvent event)

#### endpointChanged

    public void endpointChanged​(EndpointEvent event,
                                String matchedFilter)

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 interface `EndpointEventListener`
Parameters:
  `event` - The event containing the details about the change.
  `matchedFilter` - The filter from the `EndpointEventListener.ENDPOINT_LISTENER_SCOPE` that matches (or for `EndpointEvent.MODIFIED_ENDMATCH` and `EndpointEvent.REMOVED` used to match) the endpoint, must not be `null`.

#### handleEndpointAdded

    protected void handleEndpointAdded​(EndpointDescription endpoint,
                                       String matchedFilter)

#### handleOtherFilterEndpointAdded

    protected void handleOtherFilterEndpointAdded​(EndpointDescription endpoint,
                                                  String matchedFilter)

Since:
  4.9

#### handleEndpointRemoved

    protected void handleEndpointRemoved​(EndpointDescription endpoint,
                                         String matchedFilter)

#### handleOtherFilterEndpointRemoved

    protected void handleOtherFilterEndpointRemoved​(EndpointDescription endpoint,
                                                    String matchedFilter)

Since:
  4.9

#### convertEndpointDescriptionFromOSGiToECF

    protected EndpointDescription convertEndpointDescriptionFromOSGiToECF​(EndpointDescription ed)

Since:
  4.9

#### handleEndpointModifiedEndmatch

    protected void handleEndpointModifiedEndmatch​(EndpointDescription endpoint,
                                                  String matchedFilter)

#### handleOtherFilterEndpointModifiedEndmatch

    protected void handleOtherFilterEndpointModifiedEndmatch​(EndpointDescription endpoint,
                                                             String matchedFilter)

Since:
  4.9

#### handleEndpointModified

    protected void handleEndpointModified​(EndpointDescription endpoint,
                                          String matchedFilter)

#### handleOtherFilterEndpointModified

    protected void handleOtherFilterEndpointModified​(EndpointDescription endpoint,
                                                     String matchedFilter)

Since:
  4.9

#### exportRegisteredServices

    protected void exportRegisteredServices​(String exportRegisteredSvcsFilter)

#### endpointAdded

    public void endpointAdded​(EndpointDescription endpoint,
                              String matchedFilter)

Description copied from interface: `EndpointListener`
Register an endpoint with this listener. If the endpoint matches one of the filters registered with the `EndpointListener.ENDPOINT_LISTENER_SCOPE` service property then this filter should be given as the `matchedFilter` parameter. When this service is first registered or it is modified, it should receive all known endpoints matching the filter.

Specified by:
  `endpointAdded` in interface `EndpointListener`
Parameters:
  `endpoint` - The Endpoint Description to be published
  `matchedFilter` - The filter from the `EndpointListener.ENDPOINT_LISTENER_SCOPE` that matched the endpoint, must not be `null`.

#### endpointRemoved

    public void endpointRemoved​(EndpointDescription endpoint,
                                String matchedFilter)

Description copied from interface: `EndpointListener`
Remove the registration of an endpoint. If an endpoint that was registered with the `EndpointListener.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 interface `EndpointListener`
Parameters:
  `endpoint` - The Endpoint Description that is no longer valid.
  `matchedFilter` - The filter from the `EndpointListener.ENDPOINT_LISTENER_SCOPE` that matched the endpoint, must not be `null`.