Class DiscoveredEndpointDescriptionFactory
java.lang.Object
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
org.eclipse.ecf.osgi.services.remoteserviceadmin.DiscoveredEndpointDescriptionFactory
- All Implemented Interfaces:
IDiscoveredEndpointDescriptionFactory
public class DiscoveredEndpointDescriptionFactory
extends AbstractMetadataFactory
implements IDiscoveredEndpointDescriptionFactory
Default implementation of
IDiscoveredEndpointDescriptionFactory
service.- See Also:
-
Field Summary
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
LIST_SEPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
createDiscoveredEndpointDescription
(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo) Create an EndpointDescription for a discovered remote service.protected DiscoveredEndpointDescription
createDiscoveredEndpointDescription
(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo, EndpointDescription endpointDescription) protected EndpointDescription
createEndpointDescription
(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo) void
Remove all DiscoveredEndpointDescription from this factory.removeDiscoveredEndpointDescription
(IDiscoveryLocator locator, IServiceID serviceID) Remove an EndpointDescription for a previously discovered remote service.boolean
removeDiscoveredEndpointDescription
(EndpointDescription endpointDescription) Remove the DiscoveredEndpointDescription associated with the given endpointDescription.Methods inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
decodeEndpointDescription, decodeList, decodeLong, decodeNonStandardServiceProperties, decodeOSGiProperties, decodeString, encodeList, encodeLong, encodeNonStandardServiceProperties, encodeOSGiServiceProperties, encodeServiceProperties, encodeString, logError, logWarning
-
Constructor Details
-
DiscoveredEndpointDescriptionFactory
public DiscoveredEndpointDescriptionFactory()
-
-
Method Details
-
createDiscoveredEndpointDescription
public DiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo) Description copied from interface:IDiscoveredEndpointDescriptionFactory
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 returnnull
if no notification should occur.- Specified by:
createDiscoveredEndpointDescription
in interfaceIDiscoveredEndpointDescriptionFactory
- Parameters:
locator
- the locator responsible for the discoveredServiceInfo. Must not benull
.discoveredServiceInfo
- the discovered service info. Must not benull
.- Returns:
- DiscoveredEndpointDescription that will be used to notify
EndpointListeners about a new EndpointDescription. If
null
is returned, no notification should be performed by the calling code.
-
removeDiscoveredEndpointDescription
public DiscoveredEndpointDescription removeDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceID serviceID) Description copied from interface:IDiscoveredEndpointDescriptionFactory
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 returnnull
if no notification should occur.- Specified by:
removeDiscoveredEndpointDescription
in interfaceIDiscoveredEndpointDescriptionFactory
- Parameters:
locator
- the locator responsible for the discoveredServiceInfo. Must not benull
.serviceID
- the discovered service ID. Must not benull
.- Returns:
- EndpointDescription that will be used to notify EndpointListeners
about an undiscovered EndpointDescription. If
null
is returned, no notification should be performed by the calling code.
-
createEndpointDescription
protected EndpointDescription createEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo) -
createDiscoveredEndpointDescription
protected DiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo, EndpointDescription endpointDescription) -
close
public void close()- Overrides:
close
in classAbstractMetadataFactory
-
removeDiscoveredEndpointDescription
Description copied from interface:IDiscoveredEndpointDescriptionFactory
Remove the DiscoveredEndpointDescription associated with the given endpointDescription.- Specified by:
removeDiscoveredEndpointDescription
in interfaceIDiscoveredEndpointDescriptionFactory
- Parameters:
endpointDescription
- that was previously associated with a DiscoveredEndpointDescription (viaIDiscoveredEndpointDescriptionFactory.createDiscoveredEndpointDescription(IDiscoveryLocator, IServiceInfo)
to be removed. Must not benull
.- Returns:
true
if actually removed,false
if nothing was removed.
-
removeAllDiscoveredEndpointDescriptions
public void removeAllDiscoveredEndpointDescriptions()Description copied from interface:IDiscoveredEndpointDescriptionFactory
Remove all DiscoveredEndpointDescription from this factory.- Specified by:
removeAllDiscoveredEndpointDescriptions
in interfaceIDiscoveredEndpointDescriptionFactory
-