org.eclipse.ecf.provider.remoteservice.generic

## Class RemoteServiceRegistrationImpl

- java.lang.Object
- - org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl

All Implemented Interfaces:
  Serializable, IRemoteServiceRegistration

    public class RemoteServiceRegistrationImpl
    extends Object
    implements IRemoteServiceRegistration, Serializable

Since:
  3.0
See Also:
  Serialized Form

### Field Summary

Fields
`protected String[]` `clazzes` service classes for this registration.
`protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Properties` `properties` properties for this registration.
`protected RemoteServiceReferenceImpl` `reference`
`static int` `REGISTERED`
`protected Object` `registrationLock`
`protected IRemoteServiceID` `remoteServiceID`
`protected int` `serviceranking` service ranking.
`protected RegistrySharedObject` `sharedObject`
`protected int` `state` The registration state
`static int` `UNREGISTERED`
`static int` `UNREGISTERING`

### Constructor Summary

Constructors
Constructor and Description
`RemoteServiceRegistrationImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `callService(RemoteCallImpl call)`
`protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Properties` `createProperties(Dictionary props)` Construct a properties object from the dictionary for this ServiceRegistration.
`boolean` `equals(Object o)`
`protected String[]` `getClasses()`
`ID` `getContainerID()` Get the container ID for the registration
`IRemoteServiceID` `getID()` Get the remote service ID for this registration.
`Object` `getProperty(String key)` Get property associated with given key
`String[]` `getPropertyKeys()` Get property keys for registered service
`IRemoteServiceReference` `getReference()` Get reference for this registration
`Object` `getService()`
`long` `getServiceId()`
`int` `hashCode()`
`void` `publish(RegistrySharedObject sharedObject1, RemoteServiceRegistryImpl registry, Object svc, String[] clzzes, Dictionary props)`
`void` `setProperties(Dictionary properties)` Set the properties for the registered service
`String` `toString()`
`void` `unregister()` Unregister this service

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

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

### Field Detail

#### clazzes

    protected String[] clazzes

service classes for this registration.

#### properties

    protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Properties properties

properties for this registration.

#### serviceranking

    protected int serviceranking

service ranking.

#### registrationLock

    protected transient Object registrationLock

#### state

    protected int state

The registration state

#### REGISTERED

    public static final int REGISTERED

See Also:
  Constant Field Values

#### UNREGISTERING

    public static final int UNREGISTERING

See Also:
  Constant Field Values

#### UNREGISTERED

    public static final int UNREGISTERED

See Also:
  Constant Field Values

#### reference

    protected transient RemoteServiceReferenceImpl reference

#### sharedObject

    protected transient RegistrySharedObject sharedObject

#### remoteServiceID

    protected IRemoteServiceID remoteServiceID

Since:
  3.0

### Constructor Detail

#### RemoteServiceRegistrationImpl

    public RemoteServiceRegistrationImpl()

### Method Detail

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### publish

    public void publish(RegistrySharedObject sharedObject1,
                        RemoteServiceRegistryImpl registry,
                        Object svc,
                        String[] clzzes,
                        Dictionary props)

#### getService

    public Object getService()

#### getContainerID

    public ID getContainerID()

Description copied from interface: `IRemoteServiceRegistration`
Get the container ID for the registration

Specified by:
  `getContainerID` in interface `IRemoteServiceRegistration`
Returns:
  ID of the local container. Will not be `null` .

#### getClasses

    protected String[] getClasses()

#### getReference

    public IRemoteServiceReference getReference()

Description copied from interface: `IRemoteServiceRegistration`
Get reference for this registration

Specified by:
  `getReference` in interface `IRemoteServiceRegistration`
Returns:
  IRemoteServiceReference for this registration. Will not be `null`.

#### setProperties

    public void setProperties(Dictionary properties)

Description copied from interface: `IRemoteServiceRegistration`
Set the properties for the registered service

Specified by:
  `setProperties` in interface `IRemoteServiceRegistration`
Parameters:
  `properties` - to set. Must not be `null`.

#### unregister

    public void unregister()

Description copied from interface: `IRemoteServiceRegistration`
Unregister this service

Specified by:
  `unregister` in interface `IRemoteServiceRegistration`

#### createProperties

    protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Properties createProperties(Dictionary props)

Construct a properties object from the dictionary for this ServiceRegistration.

Parameters:
  `props` - The properties for this service.
Returns:
  A Properties object for this ServiceRegistration.

#### getProperty

    public Object getProperty(String key)

Description copied from interface: `IRemoteServiceRegistration`
Get property associated with given key

Specified by:
  `getProperty` in interface `IRemoteServiceRegistration`
Parameters:
  `key` - the key of the property. Must not be `null`.
Returns:
  Object the property value. `null` if property not found.

#### getPropertyKeys

    public String[] getPropertyKeys()

Description copied from interface: `IRemoteServiceRegistration`
Get property keys for registered service

Specified by:
  `getPropertyKeys` in interface `IRemoteServiceRegistration`
Returns:
  String [] with property keys. Will not be null, but may be empty array.

#### getServiceId

    public long getServiceId()

#### callService

    public Object callService(RemoteCallImpl call)
                       throws Exception

Throws:
  `Exception`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getID

    public IRemoteServiceID getID()

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

Specified by:
  `getID` in interface `IRemoteServiceRegistration`
Returns:
  IRemoteServiceID the id for the remote service associated with this registration.
Since:
  3.0