Package org.eclipse.ecf.remoteservice

# Class RemoteServiceRegistrationImpl

java.lang.Object
org.eclipse.ecf.remoteservice.RemoteServiceRegistrationImpl

All Implemented Interfaces:
  `Serializable`, `IRemoteServiceRegistration`

Direct Known Subclasses:
  `RSARemoteServiceContainerAdapter.RSARemoteServiceRegistration`

public class RemoteServiceRegistrationImpl extends Object implements IRemoteServiceRegistration, Serializable

Since:
  8.3
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String[]`
`clazzes`
service classes for this registration.
`protected org.eclipse.ecf.remoteservice.RemoteServiceRegistrationImpl.Properties`
`properties`
properties for this registration.
`protected RemoteServiceReferenceImpl`
`reference`
`static final int`
`REGISTERED`
`protected IRegistrationListener`
`registrationListener`
`protected Object`
`registrationLock`
`protected IRemoteServiceID`
`remoteServiceID`
`protected int`
`serviceranking`
service ranking.
`protected int`
`state`
The registration state
`static final int`
`UNREGISTERED`
`static final int`
`UNREGISTERING`

## Constructor Summary

Constructors
Constructor
Description
`RemoteServiceRegistrationImpl()`
`RemoteServiceRegistrationImpl(IRegistrationListener listener)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`callService(IRemoteCall call)`
`protected org.eclipse.ecf.remoteservice.RemoteServiceRegistrationImpl.Properties`
`createProperties(Dictionary props)`
Construct a properties object from the dictionary for this ServiceRegistration.
`boolean`
`equals(Object o)`
`protected String[]`
`getClasses()`
`ClassLoader`
`getClassLoader()`
`ID`
`getContainerID()`
Get the container ID for the registration
`IRemoteServiceID`
`getID()`
Get the remote service ID for this registration.
`String[]`
`getInterfaces()`
`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()`
`static Class[]`
`getTypesForParameters(Object[] args)`
`int`
`hashCode()`
`void`
`publish(RemoteServiceRegistryImpl registry, Object svc, String[] clzzes, Dictionary props)`
`protected void`
`setClassLoader(ClassLoader cl)`
`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 Details

### clazzes

protected String[] clazzes
service classes for this registration.

### properties

protected org.eclipse.ecf.remoteservice.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

### remoteServiceID

protected IRemoteServiceID remoteServiceID

Since:
  3.0

### registrationListener

protected IRegistrationListener registrationListener

## Constructor Details

### RemoteServiceRegistrationImpl

public RemoteServiceRegistrationImpl()

### RemoteServiceRegistrationImpl

public RemoteServiceRegistrationImpl(IRegistrationListener listener)

## Method Details

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### publish

public void publish(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.remoteservice.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()

### getTypesForParameters

public static Class[] getTypesForParameters(Object[] args)

### callService

public Object callService(IRemoteCall 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

### getInterfaces

public String[] getInterfaces()

Returns:
  String[] the interface classes associated with this registration
Since:
  8.9

### getClassLoader

public ClassLoader getClassLoader()

Specified by:
  `getClassLoader` in interface `IRemoteServiceRegistration`

### setClassLoader

protected void setClassLoader(ClassLoader cl)

Since:
  8.14