Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.services.event
Class EventService

java.lang.Object
  extended by org.nuxeo.runtime.services.event.EventService
All Implemented Interfaces:
Adaptable, Component, Extensible

public class EventService
extends Object
implements Component, Adaptable

Author:
Bogdan Stefanescu

Field Summary
static ComponentName NAME
           
 
Constructor Summary
EventService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 void addListener(String topic, EventListener listener)
           
 void applicationStarted(ComponentContext context)
          Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.
 void deactivate(ComponentContext context)
          Deactivates the component.
<T> T
getAdapter(Class<T> adapter)
          Returns an object which is an instance of the given class associated with this object.
 void registerExtension(Extension extension)
          Registers the given extension.
 void removeListener(String topic, EventListener listener)
           
 void sendCancelableEvent(Event event)
           
 void sendEvent(Event event)
           
 void unregisterExtension(Extension extension)
          Unregisters the given extension.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final ComponentName NAME
Constructor Detail

EventService

public EventService()
Method Detail

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

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

sendEvent

public void sendEvent(Event event)

sendCancelableEvent

public void sendCancelableEvent(Event event)

addListener

public void addListener(String topic,
                        EventListener listener)

removeListener

public void removeListener(String topic,
                           EventListener listener)

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

applicationStarted

public void applicationStarted(ComponentContext context)
                        throws Exception
Description copied from interface: Component
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.

Specified by:
applicationStarted in interface Component
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.