diff options
author | slewis | 2013-05-18 00:29:18 +0000 |
---|---|---|
committer | slewis | 2013-05-18 00:29:18 +0000 |
commit | 91c3238366b946ed2bfbd0f9115265b328187939 (patch) | |
tree | 02c185136c879586eb604bd79d18f92cda90d718 /compendium | |
parent | ae7682db107ccb0caf007520558f53a5d0b82f8f (diff) | |
download | org.eclipse.ecf-91c3238366b946ed2bfbd0f9115265b328187939.tar.gz org.eclipse.ecf-91c3238366b946ed2bfbd0f9115265b328187939.tar.xz org.eclipse.ecf-91c3238366b946ed2bfbd0f9115265b328187939.zip |
BasicTopologyManager refactoring for TCK
Diffstat (limited to 'compendium')
-rw-r--r-- | compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java | 56 |
1 files changed, 16 insertions, 40 deletions
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java index 9ecf7637e..027b3478c 100644 --- a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java +++ b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java @@ -105,27 +105,15 @@ public class BasicTopologyManagerImpl extends AbstractTopologyManager implements org.osgi.service.remoteserviceadmin.EndpointDescription endpoint, String matchedFilter) { if (matchedFilter.equals(endpointListenerScope)) - handleEndpointAddedViaELScope(endpoint); + if (endpoint instanceof EndpointDescription) + handleECFEndpointAdded((EndpointDescription) endpoint); + else + handleNonECFEndpointAdded(this, endpoint); else if (matchedFilter.equals(ALL_SCOPE)) - handleEndpointAddedViaAllScope(endpoint); - } - - protected void handleEndpointAddedViaELScope( - org.osgi.service.remoteserviceadmin.EndpointDescription endpoint) { - if (endpoint instanceof EndpointDescription) - handleECFEndpointAdded((EndpointDescription) endpoint); - else - handleNonECFEndpointAdded(this, endpoint); - } - - protected void handleEndpointAddedViaAllScope( - org.osgi.service.remoteserviceadmin.EndpointDescription endpoint) { - if (endpoint instanceof EndpointDescription) { - logError( - "handleEndpointAddedViaAllScope", "Attempt to add ECF endpoint description directly. endpoint=" + endpoint); //$NON-NLS-1$ //$NON-NLS-2$ - return; - } else - advertiseEndpointDescription(endpoint); + if (endpoint instanceof EndpointDescription) + handleECFEndpointAdded((EndpointDescription) endpoint); + else + advertiseEndpointDescription(endpoint); } /* @@ -140,27 +128,15 @@ public class BasicTopologyManagerImpl extends AbstractTopologyManager implements org.osgi.service.remoteserviceadmin.EndpointDescription endpoint, String matchedFilter) { if (matchedFilter.equals(endpointListenerScope)) - handleEndpointRemovedViaELScope(endpoint); + if (endpoint instanceof EndpointDescription) + handleECFEndpointRemoved((EndpointDescription) endpoint); + else + handleNonECFEndpointRemoved(this, endpoint); else if (matchedFilter.equals(ALL_SCOPE)) - handleEndpointRemovedViaAllScope(endpoint); - } - - protected void handleEndpointRemovedViaELScope( - org.osgi.service.remoteserviceadmin.EndpointDescription endpoint) { - if (endpoint instanceof EndpointDescription) - handleECFEndpointRemoved((EndpointDescription) endpoint); - else - handleNonECFEndpointRemoved(this, endpoint); - } - - protected void handleEndpointRemovedViaAllScope( - org.osgi.service.remoteserviceadmin.EndpointDescription endpoint) { - if (endpoint instanceof EndpointDescription) { - logError( - "handleEndpointRemovedViaAllScope", "Attempt to remove ECF endpoint description directly. endpoint=" + endpoint); //$NON-NLS-1$ //$NON-NLS-2$ - return; - } else - unadvertiseEndpointDescription(endpoint); + if (endpoint instanceof EndpointDescription) + handleECFEndpointRemoved((EndpointDescription) endpoint); + else + unadvertiseEndpointDescription(endpoint); } // EventListenerHook impl |