org.ow2.cmi.component.event
Class EventComponent

java.lang.Object
  extended by org.ow2.cmi.component.event.EventComponent
All Implemented Interfaces:
org.ow2.cmi.event.CMIEventComponent, org.ow2.util.component.api.Component

public class EventComponent
extends java.lang.Object
implements org.ow2.cmi.event.CMIEventComponent

Implementation of the CMI event component.

Author:
Loris Bouzonnet

Constructor Summary
EventComponent()
           
 
Method Summary
 void init()
           
 void registerCMIManagedObject(org.ow2.cmi.event.CMIManagedObject object, org.ow2.util.event.api.IEventDispatcher dispatcher)
          Register a new CMI managed object.
If a CMI managed object with the same id is already registered, it will be unregistered first.
 void registerEventListener(org.ow2.cmi.event.CMIEventListener eventListener)
          Register a new event listener.
The listener will automatically be register with each dispatcher matching his filter.
 void setEventService(org.ow2.util.event.api.IEventService service)
          Set the event service to use.
 void start()
           
 void stop()
           
 void unregisterCMIManagedObject(org.ow2.cmi.event.CMIManagedObject object)
          Unregister a CMI managed object.
 void unregisterEventListener(org.ow2.cmi.event.CMIEventListener eventListener)
          Unregister an event listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventComponent

public EventComponent()
Method Detail

setEventService

public void setEventService(org.ow2.util.event.api.IEventService service)
Set the event service to use.

Parameters:
service - The event service to use.

init

public void init()
          throws org.ow2.util.component.api.ComponentException
Specified by:
init in interface org.ow2.util.component.api.Component
Throws:
org.ow2.util.component.api.ComponentException

start

public void start()
           throws org.ow2.util.component.api.ComponentException
Specified by:
start in interface org.ow2.util.component.api.Component
Throws:
org.ow2.util.component.api.ComponentException

stop

public void stop()
          throws org.ow2.util.component.api.ComponentException
Specified by:
stop in interface org.ow2.util.component.api.Component
Throws:
org.ow2.util.component.api.ComponentException

registerEventListener

public void registerEventListener(org.ow2.cmi.event.CMIEventListener eventListener)
Register a new event listener.
The listener will automatically be register with each dispatcher matching his filter.

Specified by:
registerEventListener in interface org.ow2.cmi.event.CMIEventComponent
Parameters:
eventListener - The listener to register.

unregisterEventListener

public void unregisterEventListener(org.ow2.cmi.event.CMIEventListener eventListener)
Unregister an event listener.

Specified by:
unregisterEventListener in interface org.ow2.cmi.event.CMIEventComponent
Parameters:
eventListener - The listener to unregister.

registerCMIManagedObject

public void registerCMIManagedObject(org.ow2.cmi.event.CMIManagedObject object,
                                     org.ow2.util.event.api.IEventDispatcher dispatcher)
Register a new CMI managed object.
If a CMI managed object with the same id is already registered, it will be unregistered first.

Specified by:
registerCMIManagedObject in interface org.ow2.cmi.event.CMIEventComponent
Parameters:
object - The CMI managed object to register.
dispatcher - The event dispatcher for this CMI managed object.

unregisterCMIManagedObject

public void unregisterCMIManagedObject(org.ow2.cmi.event.CMIManagedObject object)
Unregister a CMI managed object.

Specified by:
unregisterCMIManagedObject in interface org.ow2.cmi.event.CMIEventComponent
Parameters:
object - The CMI managed object to unregister.


Copyright © 2009 OW2 Consortium. All Rights Reserved.