Nuxeo Enterprise Platform 5.4

org.nuxeo.runtime.api
Class RuntimeServiceLocator

java.lang.Object
  extended by org.nuxeo.runtime.api.RuntimeServiceLocator
All Implemented Interfaces:
java.io.Serializable, ServiceLocator

public class RuntimeServiceLocator
extends java.lang.Object
implements ServiceLocator

A server implementation that use Nuxeo Runtime to lookup services.

This is used as the default server if no other is specified.

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Constructor Summary
RuntimeServiceLocator()
           
 
Method Summary
 void dispose()
          Disposes this locator.
 void initialize(java.lang.String host, int port, java.util.Properties properties)
          Initializes the service locator.
 java.lang.Object lookup(ServiceDescriptor svc)
          Lookup the service described by the given service descriptor.
 java.lang.Object lookup(java.lang.String serviceId)
          Lookup the service given its ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeServiceLocator

public RuntimeServiceLocator()
Method Detail

initialize

public void initialize(java.lang.String host,
                       int port,
                       java.util.Properties properties)
                throws java.lang.Exception
Description copied from interface: ServiceLocator
Initializes the service locator.

Specified by:
initialize in interface ServiceLocator
Parameters:
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 JVM
port - 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 specified
Throws:
java.lang.Exception

dispose

public void dispose()
Description copied from interface: ServiceLocator
Disposes this locator. Free any allocated resources.

Specified by:
dispose in interface ServiceLocator

lookup

public java.lang.Object lookup(ServiceDescriptor svc)
                        throws java.lang.Exception
Description copied from interface: ServiceLocator
Lookup the service described by the given service descriptor.

Specified by:
lookup in interface ServiceLocator
Parameters:
svc - the service descriptor
Returns:
the service instance or null if no such service was found
Throws:
java.lang.Exception - if any error occurs

lookup

public java.lang.Object lookup(java.lang.String serviceId)
                        throws java.lang.Exception
Description copied from interface: ServiceLocator
Lookup the service given its ID.

Specified by:
lookup in interface ServiceLocator
Parameters:
serviceId - the service ID
Returns:
the service instance or null if no such service was found
Throws:
java.lang.Exception - if any error occurs

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.