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 int
REGISTERED
protected IRegistrationListener
registrationListener
protected Object
registrationLock
protected IRemoteServiceID
remoteServiceID
protected int
serviceranking
service ranking.protected int
state
The registration statestatic int
UNREGISTERED
static int
UNREGISTERING
-
Constructor Summary
Constructors Constructor Description RemoteServiceRegistrationImpl()
RemoteServiceRegistrationImpl(IRegistrationListener listener)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 registrationIRemoteServiceID
getID()
Get the remote service ID for this registration.String[]
getInterfaces()
Object
getProperty(String key)
Get property associated with given keyString[]
getPropertyKeys()
Get property keys for registered serviceIRemoteServiceReference
getReference()
Get reference for this registrationObject
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 serviceString
toString()
void
unregister()
Unregister this service
-
-
-
Field Detail
-
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 Detail
-
RemoteServiceRegistrationImpl
public RemoteServiceRegistrationImpl()
-
RemoteServiceRegistrationImpl
public RemoteServiceRegistrationImpl(IRegistrationListener listener)
-
-
Method Detail
-
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 interfaceIRemoteServiceRegistration
- 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 interfaceIRemoteServiceRegistration
- 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 interfaceIRemoteServiceRegistration
- Parameters:
properties
- to set. Must not benull
.
-
unregister
public void unregister()
Description copied from interface:IRemoteServiceRegistration
Unregister this service- Specified by:
unregister
in interfaceIRemoteServiceRegistration
-
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 interfaceIRemoteServiceRegistration
- Parameters:
key
- the key of the property. Must not benull
.- 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 interfaceIRemoteServiceRegistration
- Returns:
- String [] with property keys. Will not be null, but may be empty array.
-
getServiceId
public long getServiceId()
-
callService
public Object callService(IRemoteCall call) throws Exception
- Throws:
Exception
-
getID
public IRemoteServiceID getID()
Description copied from interface:IRemoteServiceRegistration
Get the remote service ID for this registration. Will not returnnull
.- Specified by:
getID
in interfaceIRemoteServiceRegistration
- 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 interfaceIRemoteServiceRegistration
-
setClassLoader
protected void setClassLoader(ClassLoader cl)
- Since:
- 8.14
-
-