Class EndpointDescription
- java.lang.Object
-
- org.osgi.service.remoteserviceadmin.EndpointDescription
-
- 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 theEndpointDescription
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
Constructors Constructor Description EndpointDescription(Map<String,Object> properties)
EndpointDescription(ServiceReference reference, Map<String,Object> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAsyncInterfaces()
ID
getConnectTargetID()
ID
getContainerID()
String
getEndpointId()
ID[]
getIDFilter()
String
getIdNamespace()
Map<String,Version>
getInterfaceVersions()
Get a map of the service interface name to Version information for all the service interfaces exposed by this endpoint description (i.e.Map<String,Object>
getProperties()
Returns all endpoint properties.String
getRemoteServiceFilter()
Long
getRemoteServiceId()
Long
getTimestamp()
boolean
isSameService(EndpointDescription other)
Answers if this Endpoint Description refers to the same service instance as the given Endpoint Description.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
-
-
-
-
Constructor Detail
-
EndpointDescription
public EndpointDescription(ServiceReference reference, Map<String,Object> properties)
- Parameters:
reference
- A service reference that can be exported.properties
- Map of properties. This argument can benull
. The keys in the map must be typeString
and, since the keys are case insensitive, there must be no duplicates with case variation.- Throws:
IllegalArgumentException
- When the properties are not proper for an Endpoint Description- See Also:
EndpointDescription(ServiceReference, Map)
-
EndpointDescription
public EndpointDescription(Map<String,Object> properties)
- Parameters:
properties
- The map from which to create the Endpoint Description. The keys in the map must be typeString
and, since the keys are case insensitive, there must be no duplicates with case variation.- Throws:
IllegalArgumentException
- When the properties are not proper for an Endpoint Description.- See Also:
EndpointDescription(Map)
-
-
Method Detail
-
getInterfaceVersions
public Map<String,Version> getInterfaceVersions()
Get a map of the service interface name to Version information for all the service interfaces exposed by this endpoint description (i.e. those returned byEndpointDescription.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 String getEndpointId()
- Returns:
- String ecf endpoint id
- Since:
- 4.0
-
getTimestamp
public Long getTimestamp()
- Returns:
- Long ecf timestamp
- Since:
- 4.0
-
getRemoteServiceId
public Long getRemoteServiceId()
- Returns:
- Long ecf remote service id
- Since:
- 4.0
-
getContainerID
public ID getContainerID()
-
getIdNamespace
public String getIdNamespace()
-
getConnectTargetID
public ID getConnectTargetID()
-
getIDFilter
public ID[] getIDFilter()
-
getRemoteServiceFilter
public 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 classEndpointDescription
- Parameters:
other
- The Endpoint Description to look at- Returns:
- True if this endpoint description points to the same service as the other
-
getProperties
public Map<String,Object> getProperties()
Description copied from class:EndpointDescription
Returns all endpoint properties.- Overrides:
getProperties
in classEndpointDescription
- Returns:
- An unmodifiable map referring to the properties of this Endpoint Description.
-
getAsyncInterfaces
public List<String> getAsyncInterfaces()
- Returns:
- List ecf asynchronous proxy interfaces
- Since:
- 4.0
-
toString
public String toString()
Description copied from class:EndpointDescription
Returns the string representation of this EndpointDescription.- Overrides:
toString
in classEndpointDescription
- Returns:
- String form of this EndpointDescription.
-
-