public class RuntimeServiceLocator extends Object implements ServiceLocator
This is used as the default server if no other is specified.
Constructor and Description |
---|
RuntimeServiceLocator() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this locator.
|
void |
initialize(String host,
int port,
Properties properties)
Initializes the service locator.
|
Object |
lookup(ServiceDescriptor svc)
Lookup the service described by the given service descriptor.
|
Object |
lookup(String serviceId)
Lookup the service given its ID.
|
public void initialize(String host, int port, Properties properties) throws Exception
ServiceLocator
initialize
in interface ServiceLocator
host
- the host where the lookup will be done. The host is optional
and may be null if the services are looked up in the current
JVMport
- the port of the host to be used to lookup.properties
- the properties are implementation dependent Properties
may be null if no properties are required. The port is
meaningful only if the host was specifiedException
public void dispose()
ServiceLocator
dispose
in interface ServiceLocator
public Object lookup(ServiceDescriptor svc) throws Exception
ServiceLocator
lookup
in interface ServiceLocator
svc
- the service descriptorException
- if any error occurspublic Object lookup(String serviceId) throws Exception
ServiceLocator
lookup
in interface ServiceLocator
serviceId
- the service IDException
- if any error occursCopyright © 2013 Nuxeo SA. All Rights Reserved.