org.eclipse.ecf.provider.r_osgi.identity
Class R_OSGiID

java.lang.Object
  extended by org.eclipse.ecf.core.identity.BaseID
      extended by org.eclipse.ecf.provider.r_osgi.identity.R_OSGiID
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, java.security.Principal, org.eclipse.core.runtime.IAdaptable, ID

public class R_OSGiID
extends BaseID

The ID implementation of R-OSGi URIs. Currently only works with the R-OSGi namespace and hence with the R-OSGi default transport (persistent tcp connections).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.ecf.core.identity.BaseID
namespace
 
Constructor Summary
R_OSGiID(java.lang.String uriString)
          create a new R-OSGi ID from an URI string.
 
Method Summary
 ch.ethz.iks.r_osgi.URI getURI()
          get the internal URI.
protected  int namespaceCompareTo(BaseID id)
          compare in the context of the namespace.
protected  boolean namespaceEquals(BaseID id)
          check for equality in the context of the namespace.
protected  java.lang.String namespaceGetName()
          get the name.
protected  int namespaceHashCode()
          get the hash code.
 java.lang.String toExternalForm()
          Get this ID instance in String form.
 java.lang.String toString()
          get a string representation.
 
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, equals, getAdapter, getName, getNamespace, hashCode, namespaceToExternalForm
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

R_OSGiID

public R_OSGiID(java.lang.String uriString)
create a new R-OSGi ID from an URI string.

Parameters:
uriString - the URI of a remote service.
Method Detail

namespaceCompareTo

protected int namespaceCompareTo(BaseID id)
compare in the context of the namespace.

Specified by:
namespaceCompareTo in class BaseID
Parameters:
id - another BaseID to compare to.
Returns:
-1 if smaller, 1 if larger, and 0 for equality.
See Also:
BaseID.namespaceCompareTo(org.eclipse.ecf.core.identity.BaseID)

namespaceEquals

protected boolean namespaceEquals(BaseID id)
check for equality in the context of the namespace.

Specified by:
namespaceEquals in class BaseID
Parameters:
id - another BaseID to check with.
Returns:
true iff the two IDs are equal within the given namespace.
See Also:
BaseID.namespaceEquals(org.eclipse.ecf.core.identity.BaseID)

getURI

public ch.ethz.iks.r_osgi.URI getURI()
get the internal URI.

Returns:
the internal R-OSGi URI.

namespaceGetName

protected java.lang.String namespaceGetName()
get the name.

Specified by:
namespaceGetName in class BaseID
Returns:
the name as a String.

namespaceHashCode

protected int namespaceHashCode()
get the hash code.

Specified by:
namespaceHashCode in class BaseID
Returns:
the hash code.

toString

public java.lang.String toString()
get a string representation.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

toExternalForm

public java.lang.String toExternalForm()
Description copied from interface: ID
Get this ID instance in String form. Will not return null.

Specified by:
toExternalForm in interface ID
Overrides:
toExternalForm in class BaseID
Returns:
String that is external representation of this ID
Since:
3.0
See Also:
ID.toExternalForm()