org.eclipse.ecf.osgi.services.remoteserviceadmin
Class EndpointDescriptionLocator

java.lang.Object
  extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator
All Implemented Interfaces:
IEndpointDescriptionLocator

public class EndpointDescriptionLocator
extends java.lang.Object
implements IEndpointDescriptionLocator

Implementation of EndpointDescription discovery mechanism, using any/all ECF discovery providers (implementers if IDiscoveryLocator.


Nested Class Summary
 class EndpointDescriptionLocator.EndpointEventListenerHolder
           
 class EndpointDescriptionLocator.EndpointListenerHolder
           
 
Constructor Summary
EndpointDescriptionLocator(org.osgi.framework.BundleContext context)
           
 
Method Summary
 void close()
           
 void discoverEndpoint(EndpointDescription endpointDescription)
          Discover the given endpointDescription.
 IDiscoveredEndpointDescriptionFactory getDiscoveredEndpointDescriptionFactory()
           
 EndpointDescription[] getDiscoveredEndpoints()
          Get endpoints discovered by this endpoint locator
 IDiscoveryAdvertiser[] getDiscoveryAdvertisers()
           
protected  EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(EndpointDescription description, int type)
           
 EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(org.osgi.framework.ServiceReference[] refs, EndpointDescription description, int type)
           
protected  EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(EndpointDescription description)
           
 EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(org.osgi.framework.ServiceReference[] refs, EndpointDescription description)
           
 IServiceID getNetworkDiscoveredServiceID(EndpointDescription endpointDescription)
          Get the service ID associated with the given endpoint description.
 IServiceInfoFactory getServiceInfoFactory()
           
 void start()
           
 void undiscoverEndpoint(EndpointDescription endpointDescription)
          Remove the given endpointDescription.
 void updateEndpoint(EndpointDescription endpointDescription)
          Update the given endpointDescription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointDescriptionLocator

public EndpointDescriptionLocator(org.osgi.framework.BundleContext context)
Method Detail

start

public void start()

close

public void close()

getDiscoveryAdvertisers

public IDiscoveryAdvertiser[] getDiscoveryAdvertisers()

getServiceInfoFactory

public IServiceInfoFactory getServiceInfoFactory()

getDiscoveredEndpointDescriptionFactory

public IDiscoveredEndpointDescriptionFactory getDiscoveredEndpointDescriptionFactory()

getMatchingEndpointListenerHolders

protected EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(EndpointDescription description)

getMatchingEndpointEventListenerHolders

protected EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(EndpointDescription description,
                                                                                                           int type)
Since:
4.1

getMatchingEndpointEventListenerHolders

public EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(org.osgi.framework.ServiceReference[] refs,
                                                                                                        EndpointDescription description,
                                                                                                        int type)
Since:
4.1

getMatchingEndpointListenerHolders

public EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(org.osgi.framework.ServiceReference[] refs,
                                                                                              EndpointDescription description)

getNetworkDiscoveredServiceID

public IServiceID getNetworkDiscoveredServiceID(EndpointDescription endpointDescription)
Description copied from interface: IEndpointDescriptionLocator
Get the service ID associated with the given endpoint description.

Specified by:
getNetworkDiscoveredServiceID in interface IEndpointDescriptionLocator
Returns:
IServiceID associated discovered endpoint description. Will return null if no associated serviceID
Since:
4.3

discoverEndpoint

public void discoverEndpoint(EndpointDescription endpointDescription)
Description copied from interface: IEndpointDescriptionLocator
Discover the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is discovered. about

Specified by:
discoverEndpoint in interface IEndpointDescriptionLocator
Parameters:
endpointDescription - must not be null
Since:
4.3

updateEndpoint

public void updateEndpoint(EndpointDescription endpointDescription)
Description copied from interface: IEndpointDescriptionLocator
Update the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is updated. about

Specified by:
updateEndpoint in interface IEndpointDescriptionLocator
Parameters:
endpointDescription - must not be null
Since:
4.3

undiscoverEndpoint

public void undiscoverEndpoint(EndpointDescription endpointDescription)
Description copied from interface: IEndpointDescriptionLocator
Remove the given endpointDescription. This method will not block and will result in local EndpointEventListeners to be notified that the given endpointDescription is removed. about

Specified by:
undiscoverEndpoint in interface IEndpointDescriptionLocator
Parameters:
endpointDescription - must not be null
Since:
4.3

getDiscoveredEndpoints

public EndpointDescription[] getDiscoveredEndpoints()
Description copied from interface: IEndpointDescriptionLocator
Get endpoints discovered by this endpoint locator

Specified by:
getDiscoveredEndpoints in interface IEndpointDescriptionLocator
Returns:
EndpointDescription[] of previously discovered endpoint. Will not return null, but may return empty array.
Since:
4.3