Package org.eclipse.ecf.remoteservice

## Class RemoteServiceID

- java.lang.Object
- - org.eclipse.ecf.core.identity.BaseID
  - - org.eclipse.ecf.remoteservice.RemoteServiceID

All Implemented Interfaces:
  `Serializable`, `Comparable`, `Principal`, `org.eclipse.core.runtime.IAdaptable`, `ID`, `IRemoteServiceID`

    public class RemoteServiceID
    extends BaseID
    implements IRemoteServiceID

Since:
  3.0
See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.eclipse.ecf.core.identity.BaseID

`namespace`

### Constructor Summary

Constructors
`RemoteServiceID​(Namespace namespace, ID containerID, long containerRelative)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ID` `getContainerID()` Get the container ID for this remote service.
`long` `getContainerRelativeID()` Get container-relative ID for the remote service identified
`protected int` `namespaceCompareTo​(BaseID o)` Called by `Namespace.getCompareToForObject(BaseID, BaseID)`.
`protected boolean` `namespaceEquals​(BaseID o)` Called by `Namespace.testIDEquals(BaseID, BaseID)`.
`protected String` `namespaceGetName()` Called by `Namespace.getNameForID(BaseID)`.
`protected int` `namespaceHashCode()` Called by `Namespace.getHashCodeForID(BaseID)`.
`String` `toString()`

### Methods inherited from class org.eclipse.ecf.core.identity.BaseID

`compareTo, equals, getAdapter, getName, getNamespace, hashCode, namespaceToExternalForm, toExternalForm`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Comparable

`compareTo`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Methods inherited from interface org.eclipse.ecf.core.identity.ID

`equals, getName, getNamespace, hashCode, toExternalForm`

### Methods inherited from interface java.security.Principal

`implies`

### Constructor Detail

#### RemoteServiceID

    public RemoteServiceID​(Namespace namespace,
                           ID containerID,
                           long containerRelative)

### Method Detail

#### namespaceCompareTo

    protected int namespaceCompareTo​(BaseID o)

Description copied from class: `BaseID`
Called by `Namespace.getCompareToForObject(BaseID, BaseID)`.

Specified by:
  `namespaceCompareTo` in class `BaseID`
Parameters:
  `o` - the other ID to compare to. Will not be `null`.
Returns:
  the appropriate value as per `Comparable` contract.

#### namespaceEquals

    protected boolean namespaceEquals​(BaseID o)

Description copied from class: `BaseID`
Called by `Namespace.testIDEquals(BaseID, BaseID)`.

Specified by:
  `namespaceEquals` in class `BaseID`
Parameters:
  `o` - the other ID to test against. May be `null`.
Returns:
  `true` if this ID is equal to the given ID. `false` otherwise.

#### namespaceGetName

    protected String namespaceGetName()

Description copied from class: `BaseID`
Called by `Namespace.getNameForID(BaseID)`.

Specified by:
  `namespaceGetName` in class `BaseID`
Returns:
  String name for this ID. Must not be `null`. Value returned should be unique within this Namespace.

#### namespaceHashCode

    protected int namespaceHashCode()

Description copied from class: `BaseID`
Called by `Namespace.getHashCodeForID(BaseID)`.

Specified by:
  `namespaceHashCode` in class `BaseID`
Returns:
  int hashCode for this ID. Returned value must be unique within this process.

#### getContainerID

    public ID getContainerID()

Description copied from interface: `IRemoteServiceID`
Get the container ID for this remote service. Will not return `null`.

Specified by:
  `getContainerID` in interface `IRemoteServiceID`
Returns:
  ID the ID for the container associated with this remote service. Will not return `null`.

#### getContainerRelativeID

    public long getContainerRelativeID()

Description copied from interface: `IRemoteServiceID`
Get container-relative ID for the remote service identified

Specified by:
  `getContainerRelativeID` in interface `IRemoteServiceID`
Returns:
  int the container-relative ID.

#### toString

    public String toString()

Specified by:
  `toString` in interface `Principal`
Overrides:
  `toString` in class `Object`