Class EndpointDescriptionLocator
- java.lang.Object
- 
- org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator
 
- 
- All Implemented Interfaces:
- IEndpointDescriptionLocator
 
 public class EndpointDescriptionLocator extends Object implements IEndpointDescriptionLocator Implementation of EndpointDescription discovery mechanism, using any/all ECF discovery providers (implementers ifIDiscoveryLocator.- Since:
- 4.8
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classEndpointDescriptionLocator.EndpointEventListenerHolderclassEndpointDescriptionLocator.EndpointListenerHolder
 - 
Constructor SummaryConstructors Constructor Description EndpointDescriptionLocator(BundleContext context)
 - 
Method Summary
 
- 
- 
- 
Constructor Detail- 
EndpointDescriptionLocatorpublic EndpointDescriptionLocator(BundleContext context) 
 
- 
 - 
Method Detail- 
startpublic void start() 
 - 
closepublic void close() 
 - 
getDiscoveryAdvertiserspublic IDiscoveryAdvertiser[] getDiscoveryAdvertisers() 
 - 
getServiceInfoFactorypublic IServiceInfoFactory getServiceInfoFactory() 
 - 
getDiscoveredEndpointDescriptionFactorypublic IDiscoveredEndpointDescriptionFactory getDiscoveredEndpointDescriptionFactory() 
 - 
getMatchingEndpointListenerHoldersprotected EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(EndpointDescription description) 
 - 
getMatchingEndpointEventListenerHoldersprotected EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(EndpointDescription description, int type) - Parameters:
- description- description
- type- type
- Returns:
- EndpointEventListenerHolder[] matching endpoint event listener holders
- Since:
- 4.1
 
 - 
getMatchingEndpointEventListenerHolderspublic EndpointDescriptionLocator.EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders(ServiceReference[] refs, EndpointDescription description, int type) - Parameters:
- refs- service references
- description- description
- type- type
- Returns:
- EndpointEventListenerHolder[] matching endpoint event listener holders
- Since:
- 4.1
 
 - 
getMatchingEndpointListenerHolderspublic EndpointDescriptionLocator.EndpointListenerHolder[] getMatchingEndpointListenerHolders(ServiceReference[] refs, EndpointDescription description) 
 - 
loadPropertiesprotected EDEFProperties loadProperties(URL url) throws IOException Load EDEF properties from given url. Provided url must not benull.- Parameters:
- url- the URL to load the properties from.
- Returns:
- EDEFProperties instance. Will not be null.
- Throws:
- IOException- if properties cannot be read via EDEFProperties.load(InputStream)
- Since:
- 4.8
 
 - 
loadAndProcessPropertiesprotected Map<String,Object> loadAndProcessProperties(Map<String,Object> props, URL url) Load and then process properties (merge with given props).- Parameters:
- props- the props to merge with. Should not be- null.
- url- the URL to load properties from via- loadProperties(URL). May be- null.
- Returns:
- properties loaded and merged with provided props. Returns props unmodified if url is null or load exception.
- Since:
- 4.8
 
 - 
getPropsURLprotected URL getPropsURL(URL url, String newPath) Get props url starting with given url with newPath rather than existing path.- Parameters:
- url- the based URL to start with. Uses proptocol, host, port. Must not be- null.
- newPath- new path to use with given url to create and return new url. Must not be- null.
- Returns:
- url created from given url with newPath. Will be nullif MalformedURLException thrown.
- Since:
- 4.8
 
 - 
findOverridePropertiesprotected Map<String,Object> findOverrideProperties(Bundle bundle, URL edFileRUL) Find all override properties for given bundle at given fileURL. Will load edef_defaults.properties files and edef_defaults-[value of system property: org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator.localPropertiesFile].properties.- Parameters:
- bundle- the bundle responsible for the given fileURL. Must not be- null.
- edFileURL- the file URL to load properties file(s) from. Must not be- null.
- Returns:
- Mapcontaining all properties to override those in xml from edFileURL paths and edFileURL file name with .properties suffix. 
- Since:
- 4.7
 
 - 
findPropertiesprotected Map<String,Object> findProperties(Bundle bundle, URL edFileURL) Find all override properties for given bundle at given fileURL. Will load edef_defaults.properties files and edef_defaults-[value of system property: org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator.localPropertiesFile].properties.- Parameters:
- bundle- the bundle responsible for the given fileURL. Must not be- null.
- edFileURL- the file URL to load properties file(s) from. Must not be- null.
- Returns:
- Mapcontaining all properties to override those in xml from edFileURL paths and edFileURL file name with .properties suffix. 
- Since:
- 4.8
 
 - 
getNetworkDiscoveredServiceIDpublic IServiceID getNetworkDiscoveredServiceID(EndpointDescription endpointDescription) Description copied from interface:IEndpointDescriptionLocatorGet the service ID associated with the given endpoint description.- Specified by:
- getNetworkDiscoveredServiceIDin interface- IEndpointDescriptionLocator
- Parameters:
- endpointDescription- endpoint description
- Returns:
- IServiceID associated discovered endpoint description. Will
         return nullif no associated serviceID
- Since:
- 4.3
 
 - 
discoverEndpointpublic void discoverEndpoint(EndpointDescription endpointDescription) Description copied from interface:IEndpointDescriptionLocatorDiscover 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:
- discoverEndpointin interface- IEndpointDescriptionLocator
- Parameters:
- endpointDescription- must not be null
- Since:
- 4.3
 
 - 
updateEndpointpublic void updateEndpoint(EndpointDescription endpointDescription) Description copied from interface:IEndpointDescriptionLocatorUpdate 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:
- updateEndpointin interface- IEndpointDescriptionLocator
- Parameters:
- endpointDescription- must not be null
- Since:
- 4.3
 
 - 
undiscoverEndpointpublic void undiscoverEndpoint(EndpointDescription endpointDescription) Description copied from interface:IEndpointDescriptionLocatorRemove 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:
- undiscoverEndpointin interface- IEndpointDescriptionLocator
- Parameters:
- endpointDescription- must not be null
- Since:
- 4.3
 
 - 
getDiscoveredEndpointspublic EndpointDescription[] getDiscoveredEndpoints() Description copied from interface:IEndpointDescriptionLocatorGet endpoints discovered by this endpoint locator- Specified by:
- getDiscoveredEndpointsin interface- IEndpointDescriptionLocator
- Returns:
- EndpointDescription[] of previously discovered endpoint. Will not return null, but may return empty array.
- Since:
- 4.3
 
 
- 
 
-