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

java.lang.Object
  extended by org.osgi.service.remoteserviceadmin.EndpointDescription
      extended by org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription

public class EndpointDescription
extends EndpointDescription

ECF remote service endpoint description. Instances of this class, typically created via discovery, allow the import of an ECF remote service. The superclass of this class is the EndpointDescription class which is specified by the Remote Service Admin (chap 122) from the OSGi 4.2 Enterprise Specification.

ECF remote services have capabilities beyond typical OSGi remote services. To expose these capabilities, this EndpointDescription adds optional meta-data. This meta-data may then be used by the remote service consumer to customize ECF remote services import. Specifically, to customize the behavior of the ECF implementation of RemoteServiceAdmin.importService(org.osgi.service.remoteserviceadmin.EndpointDescription).


Constructor Summary
EndpointDescription(java.util.Map<java.lang.String,java.lang.Object> properties)
           
EndpointDescription(org.osgi.framework.ServiceReference reference, java.util.Map<java.lang.String,java.lang.Object> properties)
           
 
Method Summary
 java.util.List<java.lang.String> getAsyncInterfaces()
           
 ID getConnectTargetID()
           
 ID getContainerID()
           
 java.lang.String getEndpointId()
           
 ID[] getIDFilter()
           
 java.lang.String getIdNamespace()
           
 java.util.Map<java.lang.String,org.osgi.framework.Version> getInterfaceVersions()
          Get a map of the service interface name -> Version information for all the service interfaces exposed by this endpoint description (i.e.
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Returns all endpoint properties.
 java.lang.String getRemoteServiceFilter()
           
 java.lang.Long getRemoteServiceId()
           
 java.lang.Long getTimestamp()
           
 boolean isSameService(EndpointDescription other)
          Answers if this Endpoint Description refers to the same service instance as the given Endpoint Description.
 java.lang.String toString()
          Returns the string representation of this EndpointDescription.
 
Methods inherited from class org.osgi.service.remoteserviceadmin.EndpointDescription
equals, getConfigurationTypes, getFrameworkUUID, getId, getIntents, getInterfaces, getPackageVersion, getServiceId, hashCode, matches
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EndpointDescription

public EndpointDescription(org.osgi.framework.ServiceReference reference,
                           java.util.Map<java.lang.String,java.lang.Object> properties)
Parameters:
reference - A service reference that can be exported.
properties - Map of properties. This argument can be null. The keys in the map must be type String and, since the keys are case insensitive, there must be no duplicates with case variation.
Throws:
java.lang.IllegalArgumentException - When the properties are not proper for an Endpoint Description
See Also:
EndpointDescription.EndpointDescription(ServiceReference, Map)

EndpointDescription

public EndpointDescription(java.util.Map<java.lang.String,java.lang.Object> properties)
Parameters:
properties - The map from which to create the Endpoint Description. The keys in the map must be type String and, since the keys are case insensitive, there must be no duplicates with case variation.
Throws:
java.lang.IllegalArgumentException - When the properties are not proper for an Endpoint Description.
See Also:
EndpointDescription.EndpointDescription(Map)
Method Detail

getInterfaceVersions

public java.util.Map<java.lang.String,org.osgi.framework.Version> getInterfaceVersions()
Get a map of the service interface name -> Version information for all the service interfaces exposed by this endpoint description (i.e. those returned by EndpointDescription.getInterfaces() which have a

Returns:
Map of interface versions for all our service interfaces. Every service interface returned by EndpointDescription.getInterfaces() will have an associated Version, but it may have value Version#emptyVersion

getEndpointId

public java.lang.String getEndpointId()
Since:
4.0

getTimestamp

public java.lang.Long getTimestamp()
Since:
4.0

getRemoteServiceId

public java.lang.Long getRemoteServiceId()
Since:
4.0

getContainerID

public ID getContainerID()

getIdNamespace

public java.lang.String getIdNamespace()

getConnectTargetID

public ID getConnectTargetID()

getIDFilter

public ID[] getIDFilter()

getRemoteServiceFilter

public java.lang.String getRemoteServiceFilter()

isSameService

public boolean isSameService(EndpointDescription other)
Description copied from class: EndpointDescription
Answers if this Endpoint Description refers to the same service instance as the given Endpoint Description. Two Endpoint Descriptions point to the same service if they have the same id or their framework UUIDs and remote service ids are equal.

Overrides:
isSameService in class EndpointDescription
Parameters:
other - The Endpoint Description to look at
Returns:
True if this endpoint description points to the same service as the other

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Description copied from class: EndpointDescription
Returns all endpoint properties.

Overrides:
getProperties in class EndpointDescription
Returns:
An unmodifiable map referring to the properties of this Endpoint Description.

getAsyncInterfaces

public java.util.List<java.lang.String> getAsyncInterfaces()
Since:
4.0

toString

public java.lang.String toString()
Description copied from class: EndpointDescription
Returns the string representation of this EndpointDescription.

Overrides:
toString in class EndpointDescription
Returns:
String form of this EndpointDescription.