Interface IDiscoveredEndpointDescriptionFactory
- 
- All Known Implementing Classes:
- DiscoveredEndpointDescriptionFactory
 
 public interface IDiscoveredEndpointDescriptionFactoryFactory for creatingDiscoveredEndpointDescriptions. A discovered endpoint description factory is used by aEndpointDescriptionLocatorto convert a service info (discovered by the locator) into a discovered endpoint description (instance of DiscoveredEndpointDescription). This discovered endpoint description is then used by theEndpointDescriptionLocatorto notify endpoint description listeners as per section 122.6 of the OSGi Enterprise Specification OSGi enterprise specification.If no other instances of this service have been registered, a default instance of DiscoveredEndpointDescriptionFactorywill be used by theEndpointDescriptionLocator. Note that this default instance is registered with the lowest possible priority, so that if otherIDiscoveredEndpointDescriptionFactoryinstances are registered, they will be preferred/used over the default. This means that those wishing to customize/control this process of convertingIServiceInfos toDiscoveredEndpointDescriptionmust create their own implementation ofIDiscoveredEndpointDescriptionFactoryand register it with the OSGi service registry with a priority ({org.osgi.framework.Constants#SERVICE_RANKING}) higher thanInteger.MIN_VALUEThen at runtime, when needed by the EndpointDescriptionLocator, the new discovered endpoint description factory will be used.- See Also:
- IServiceInfoFactory
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description DiscoveredEndpointDescriptioncreateDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo)Create an EndpointDescription for a discovered remote service.voidremoveAllDiscoveredEndpointDescriptions()Remove all DiscoveredEndpointDescription from this factory.DiscoveredEndpointDescriptionremoveDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceID serviceID)Remove an EndpointDescription for a previously discovered remote service.booleanremoveDiscoveredEndpointDescription(EndpointDescription endpointDescription)Remove the DiscoveredEndpointDescription associated with the given endpointDescription.
 
- 
- 
- 
Method Detail- 
createDiscoveredEndpointDescriptionDiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo) Create an EndpointDescription for a discovered remote service. Implementers of this factory service may return the type of EndpointDescription appropriate for the associated distribution system (e.g. ECFEndpointDescription). Implementers should returnnullif no notification should occur.- Parameters:
- locator- the locator responsible for the discoveredServiceInfo. Must not be- null.
- discoveredServiceInfo- the discovered service info. Must not be- null.
- Returns:
- DiscoveredEndpointDescription that will be used to notify
         EndpointListeners about a new EndpointDescription. If
         nullis returned, no notification should be performed by the calling code.
 
 - 
removeDiscoveredEndpointDescriptionDiscoveredEndpointDescription removeDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceID serviceID) Remove an EndpointDescription for a previously discovered remote service. Implementers of this factory service may return the type of EndpointDescription appropriate for the associated distribution system (e.g. ECFEndpointDescription). Implementers should returnnullif no notification should occur.- Parameters:
- locator- the locator responsible for the discoveredServiceInfo. Must not be- null.
- serviceID- the discovered service ID. Must not be- null.
- Returns:
- EndpointDescription that will be used to notify EndpointListeners
         about an undiscovered EndpointDescription. If nullis returned, no notification should be performed by the calling code.
 
 - 
removeDiscoveredEndpointDescriptionboolean removeDiscoveredEndpointDescription(EndpointDescription endpointDescription) Remove the DiscoveredEndpointDescription associated with the given endpointDescription.- Parameters:
- endpointDescription- that was previously associated with a DiscoveredEndpointDescription (via- createDiscoveredEndpointDescription(IDiscoveryLocator, IServiceInfo)to be removed. Must not be- null.
- Returns:
- trueif actually removed,- falseif nothing was removed.
 
 - 
removeAllDiscoveredEndpointDescriptionsvoid removeAllDiscoveredEndpointDescriptions() Remove all DiscoveredEndpointDescription from this factory.
 
- 
 
-