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 Modifier and Type Field Description protected String[]clazzesservice classes for this registration.protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.Propertiespropertiesproperties for this registration.protected RemoteServiceReferenceImplreferencestatic intREGISTEREDprotected ObjectregistrationLockprotected IRemoteServiceIDremoteServiceIDprotected intservicerankingservice ranking.protected RegistrySharedObjectsharedObjectprotected intstateThe registration statestatic intUNREGISTEREDstatic intUNREGISTERING
-
Constructor Summary
Constructors Constructor Description RemoteServiceRegistrationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectcallService(RemoteCallImpl call)protected org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.PropertiescreateProperties(Dictionary props)Construct a properties object from the dictionary for this ServiceRegistration.booleanequals(Object o)protected String[]getClasses()IDgetContainerID()Get the container ID for the registrationIRemoteServiceIDgetID()Get the remote service ID for this registration.ObjectgetProperty(String key)Get property associated with given keyString[]getPropertyKeys()Get property keys for registered serviceIRemoteServiceReferencegetReference()Get reference for this registrationObjectgetService()longgetServiceId()inthashCode()voidpublish(RegistrySharedObject sharedObject1, RemoteServiceRegistryImpl registry, Object svc, String[] clzzes, Dictionary props)voidsetProperties(Dictionary properties)Set the properties for the registered serviceStringtoString()voidunregister()Unregister this service
-
-
-
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
-
-
Method Detail
-
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:IRemoteServiceRegistrationGet the container ID for the registration- Specified by:
getContainerIDin interfaceIRemoteServiceRegistration- Returns:
- ID of the local container. Will not be
null.
-
getClasses
protected String[] getClasses()
-
getReference
public IRemoteServiceReference getReference()
Description copied from interface:IRemoteServiceRegistrationGet reference for this registration- Specified by:
getReferencein interfaceIRemoteServiceRegistration- Returns:
- IRemoteServiceReference for this registration. Will not be
null.
-
setProperties
public void setProperties(Dictionary properties)
Description copied from interface:IRemoteServiceRegistrationSet the properties for the registered service- Specified by:
setPropertiesin interfaceIRemoteServiceRegistration- Parameters:
properties- to set. Must not benull.
-
unregister
public void unregister()
Description copied from interface:IRemoteServiceRegistrationUnregister this service- Specified by:
unregisterin interfaceIRemoteServiceRegistration
-
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:IRemoteServiceRegistrationGet property associated with given key- Specified by:
getPropertyin interfaceIRemoteServiceRegistration- Parameters:
key- the key of the property. Must not benull.- Returns:
- Object the property value.
nullif property not found.
-
getPropertyKeys
public String[] getPropertyKeys()
Description copied from interface:IRemoteServiceRegistrationGet property keys for registered service- Specified by:
getPropertyKeysin interfaceIRemoteServiceRegistration- 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
-
getID
public IRemoteServiceID getID()
Description copied from interface:IRemoteServiceRegistrationGet the remote service ID for this registration. Will not returnnull.- Specified by:
getIDin interfaceIRemoteServiceRegistration- Returns:
- IRemoteServiceID the id for the remote service associated with this registration.
- Since:
- 3.0
-
-