Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.remoting
Class RemoteComponentInstance

java.lang.Object
  extended by org.nuxeo.runtime.remoting.RemoteComponentInstance
All Implemented Interfaces:
Adaptable, ComponentContext, ComponentInstance, Extensible

public class RemoteComponentInstance
extends Object
implements ComponentInstance

Author:
Bogdan Stefanescu

Constructor Summary
RemoteComponentInstance(ComponentName name, RemoteContext context)
           
 
Method Summary
 void activate()
          Activates the implementation instance.
 void deactivate()
          Deactivates the implementation instance.
 void destroy()
          Destroys this instance.
<T> T
getAdapter(Class<T> adapter)
          Returns an object which is an instance of the given class associated with this object.
 RuntimeContext getContext()
          Gets the runtime context attached to this instance.
 Object getInstance()
          Gets the actual component implementation instance.
 ComponentName getName()
          Gets the name of the component.
 Property getProperty(String property)
           
 String[] getPropertyNames()
           
 Object getPropertyValue(String property)
           
 Object getPropertyValue(String property, Object defValue)
           
 String[] getProvidedServiceNames()
          Gets the list of provided services, or null if no service is provided.
 RuntimeContext getRuntimeContext()
           
 void registerExtension(Extension extension)
          Registers the given extension.
 void reload()
          Reload the component.
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteComponentInstance

public RemoteComponentInstance(ComponentName name,
                               RemoteContext context)
Method Detail

activate

public void activate()
              throws Exception
Description copied from interface: ComponentInstance
Activates the implementation instance.

Specified by:
activate in interface ComponentInstance
Throws:
Exception - if any error occurs during activation

deactivate

public void deactivate()
                throws Exception
Description copied from interface: ComponentInstance
Deactivates the implementation instance.

Specified by:
deactivate in interface ComponentInstance
Throws:
Exception - if any error occurs during deactivation

destroy

public void destroy()
             throws Exception
Description copied from interface: ComponentInstance
Destroys this instance.

Specified by:
destroy in interface ComponentInstance
Throws:
Exception - if any error occurs

reload

public void reload()
            throws Exception
Description copied from interface: ComponentInstance
Reload the component. All the extensions and registries are reloaded.

Specified by:
reload in interface ComponentInstance
Throws:
Exception

getContext

public RuntimeContext getContext()
Description copied from interface: ComponentInstance
Gets the runtime context attached to this instance.

Specified by:
getContext in interface ComponentInstance
Returns:
the runtime context

getInstance

public Object getInstance()
Description copied from interface: ComponentInstance
Gets the actual component implementation instance.

Specified by:
getInstance in interface ComponentInstance
Returns:
the component implementation instance

getName

public ComponentName getName()
Description copied from interface: ComponentInstance
Gets the name of the component.

Specified by:
getName in interface ComponentInstance
Returns:
the component name

getProperty

public Property getProperty(String property)
Specified by:
getProperty in interface ComponentContext

getPropertyNames

public String[] getPropertyNames()
Specified by:
getPropertyNames in interface ComponentContext

getRuntimeContext

public RuntimeContext getRuntimeContext()
Specified by:
getRuntimeContext in interface ComponentContext

registerExtension

public void registerExtension(Extension extension)
                       throws Exception
Description copied from interface: Extensible
Registers the given extension.

Specified by:
registerExtension in interface Extensible
Parameters:
extension - the extension to register
Throws:
Exception - if any error occurs

unregisterExtension

public void unregisterExtension(Extension extension)
                         throws Exception
Description copied from interface: Extensible
Unregisters the given extension.

Specified by:
unregisterExtension in interface Extensible
Parameters:
extension - the extension to unregister
Throws:
Exception - if any error occurs

getAdapter

public <T> T getAdapter(Class<T> adapter)
Description copied from interface: Adaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

Specified by:
getAdapter in interface Adaptable
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

getPropertyValue

public Object getPropertyValue(String property)
Specified by:
getPropertyValue in interface ComponentContext

getPropertyValue

public Object getPropertyValue(String property,
                               Object defValue)
Specified by:
getPropertyValue in interface ComponentContext

getProvidedServiceNames

public String[] getProvidedServiceNames()
Description copied from interface: ComponentInstance
Gets the list of provided services, or null if no service is provided.

Specified by:
getProvidedServiceNames in interface ComponentInstance
Returns:
an array containing the service class names or null if no service is provided

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.