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

java.lang.Object
  extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
      extended by 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:
IDiscoveredEndpointDescriptionFactory

Field Summary
protected  java.util.List<DiscoveredEndpointDescription> discoveredEndpointDescriptions
           
 
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractMetadataFactory
LIST_SEPARATOR
 
Constructor Summary
DiscoveredEndpointDescriptionFactory()
           
 
Method Summary
 void close()
           
 DiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo)
          Create an EndpointDescription for a discovered remote service.
protected  DiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo, org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription)
           
protected  org.osgi.service.remoteserviceadmin.EndpointDescription createEndpointDescription(IDiscoveryLocator locator, IServiceInfo discoveredServiceInfo)
           
 void removeAllDiscoveredEndpointDescriptions()
          Remove all DiscoveredEndpointDescription from this factory.
 boolean removeDiscoveredEndpointDescription(EndpointDescription endpointDescription)
          Remove the DiscoveredEndpointDescription associated with the given endpointDescription.
 DiscoveredEndpointDescription removeDiscoveredEndpointDescription(IDiscoveryLocator locator, IServiceID serviceID)
          Remove an EndpointDescription for a previously discovered remote service.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

discoveredEndpointDescriptions

protected java.util.List<DiscoveredEndpointDescription> discoveredEndpointDescriptions
Constructor Detail

DiscoveredEndpointDescriptionFactory

public DiscoveredEndpointDescriptionFactory()
Method Detail

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 return null if no notification should occur.

Specified by:
createDiscoveredEndpointDescription in interface IDiscoveredEndpointDescriptionFactory
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 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 return null if no notification should occur.

Specified by:
removeDiscoveredEndpointDescription in interface IDiscoveredEndpointDescriptionFactory
Parameters:
locator - the locator responsible for the discoveredServiceInfo. Must not be null.
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 org.osgi.service.remoteserviceadmin.EndpointDescription createEndpointDescription(IDiscoveryLocator locator,
                                                                                            IServiceInfo discoveredServiceInfo)

createDiscoveredEndpointDescription

protected DiscoveredEndpointDescription createDiscoveredEndpointDescription(IDiscoveryLocator locator,
                                                                            IServiceInfo discoveredServiceInfo,
                                                                            org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription)

close

public void close()
Overrides:
close in class AbstractMetadataFactory

removeDiscoveredEndpointDescription

public boolean removeDiscoveredEndpointDescription(EndpointDescription endpointDescription)
Description copied from interface: IDiscoveredEndpointDescriptionFactory
Remove the DiscoveredEndpointDescription associated with the given endpointDescription.

Specified by:
removeDiscoveredEndpointDescription in interface IDiscoveredEndpointDescriptionFactory
Parameters:
endpointDescription - that was previously associated with a DiscoveredEndpointDescription (via IDiscoveredEndpointDescriptionFactory.createDiscoveredEndpointDescription(IDiscoveryLocator, IServiceInfo) to be removed. Must not be null.
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 interface IDiscoveredEndpointDescriptionFactory