Package org.eclipse.ecf.remoteservice

## Class RemoteServiceRegistryImpl

- java.lang.Object
- - org.eclipse.ecf.remoteservice.RemoteServiceRegistryImpl

All Implemented Interfaces:
  `Serializable`

    public class RemoteServiceRegistryImpl
    extends Object
    implements Serializable

Since:
  8.3
See Also:
  Serialized Form

### Field Summary

Fields
`protected ArrayList` `allPublishedServices` All published services
`protected ID` `containerID`
`protected HashMap` `publishedServicesByClass` Published services by class name.
`protected static String` `REMOTEOBJECTCLASS`
`protected static String` `REMOTESERVICE_ID`
`protected static String` `REMOTESERVICE_RANKING`

### Constructor Summary

Constructors
`RemoteServiceRegistryImpl()`
`RemoteServiceRegistryImpl​(ID localContainerID)`

### Method Summary

All Methods Instance Methods Concrete Methods
`IRemoteServiceID` `createRemoteServiceID​(long serviceid)`
`protected RemoteServiceRegistrationImpl` `findRegistrationForRemoteServiceId​(IRemoteServiceID remoteServiceID)`
`protected RemoteServiceRegistrationImpl` `findRegistrationForServiceId​(long serviceId)`
`ID` `getContainerID()`
`protected long` `getNextServiceId()`
`protected RemoteServiceRegistrationImpl[]` `getRegistrations()`
`IRemoteServiceReference[]` `lookupServiceReferences()`
`IRemoteServiceReference[]` `lookupServiceReferences​(String clazz, IRemoteFilter filter)`
`void` `publishService​(RemoteServiceRegistrationImpl serviceReg)`
`void` `setContainerID​(ID containerID)`
`String` `toString()`
`void` `unpublishService​(RemoteServiceRegistrationImpl serviceReg)`
`void` `unpublishServices()`

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

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

### Field Detail

#### REMOTEOBJECTCLASS

    protected static final String REMOTEOBJECTCLASS

See Also:
  Constant Field Values

#### REMOTESERVICE_ID

    protected static final String REMOTESERVICE_ID

See Also:
  Constant Field Values

#### REMOTESERVICE_RANKING

    protected static final String REMOTESERVICE_RANKING

See Also:
  Constant Field Values

#### publishedServicesByClass

    protected HashMap publishedServicesByClass

Published services by class name. Key is a String class name; Value is a ArrayList of IRemoteServiceRegistrations

#### containerID

    protected ID containerID

#### allPublishedServices

    protected ArrayList allPublishedServices

All published services

### Constructor Detail

#### RemoteServiceRegistryImpl

    public RemoteServiceRegistryImpl()

#### RemoteServiceRegistryImpl

    public RemoteServiceRegistryImpl​(ID localContainerID)

### Method Detail

#### getNextServiceId

    protected long getNextServiceId()

#### getContainerID

    public ID getContainerID()

#### setContainerID

    public void setContainerID​(ID containerID)

Parameters:
  `containerID` - the containerID to set
Since:
  3.4

#### publishService

    public void publishService​(RemoteServiceRegistrationImpl serviceReg)

#### unpublishService

    public void unpublishService​(RemoteServiceRegistrationImpl serviceReg)

#### unpublishServices

    public void unpublishServices()

#### lookupServiceReferences

    public IRemoteServiceReference[] lookupServiceReferences​(String clazz,
                                                             IRemoteFilter filter)

#### lookupServiceReferences

    public IRemoteServiceReference[] lookupServiceReferences()

#### getRegistrations

    protected RemoteServiceRegistrationImpl[] getRegistrations()

#### findRegistrationForServiceId

    protected RemoteServiceRegistrationImpl findRegistrationForServiceId​(long serviceId)

#### findRegistrationForRemoteServiceId

    protected RemoteServiceRegistrationImpl findRegistrationForRemoteServiceId​(IRemoteServiceID remoteServiceID)

Parameters:
  `remoteServiceID` - the remote service id to find the registration for.
Returns:
  RemoteServiceRegistrationImpl the registration found for the given remoteServiceID. Will be `null` if no remote service registration found for given remoteServiceID
Since:
  3.0

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### createRemoteServiceID

    public IRemoteServiceID createRemoteServiceID​(long serviceid)

Parameters:
  `serviceid` - the container relative service id
Returns:
  the IRemoteServiceID with same container and giveen serviceid
Since:
  3.0