org.eclipse.ecf.provider.remoteservice.generic
Class RemoteServiceRegistrationImpl

java.lang.Object
  extended by org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl
All Implemented Interfaces:
java.io.Serializable, IRemoteServiceRegistration

public class RemoteServiceRegistrationImpl
extends java.lang.Object
implements IRemoteServiceRegistration, java.io.Serializable

Since:
3.0
See Also:
Serialized Form

Field Summary
protected  java.lang.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  java.lang.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
RemoteServiceRegistrationImpl()
           
 
Method Summary
 java.lang.Object callService(RemoteCallImpl call)
           
protected  org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Properties createProperties(java.util.Dictionary props)
          Construct a properties object from the dictionary for this ServiceRegistration.
 boolean equals(java.lang.Object o)
           
protected  java.lang.String[] getClasses()
           
 ID getContainerID()
          Get the container ID for the registration
 IRemoteServiceID getID()
          Get the remote service ID for this registration.
 java.lang.Object getProperty(java.lang.String key)
          Get property associated with given key
 java.lang.String[] getPropertyKeys()
          Get property keys for registered service
 IRemoteServiceReference getReference()
          Get reference for this registration
 java.lang.Object getService()
           
 long getServiceId()
           
 int hashCode()
           
 void publish(RegistrySharedObject sharedObject1, RemoteServiceRegistryImpl registry, java.lang.Object svc, java.lang.String[] clzzes, java.util.Dictionary props)
           
 void setProperties(java.util.Dictionary properties)
          Set the properties for the registered service
 java.lang.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 java.lang.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 java.lang.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(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

publish

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

getService

public java.lang.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 java.lang.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(java.util.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(java.util.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 java.lang.Object getProperty(java.lang.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 java.lang.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 java.lang.Object callService(RemoteCallImpl call)
                             throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.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