Groovy Documentation

org.codehaus.griffon.runtime.tasks
[Java] Class EventEmitter

java.lang.Object
  org.codehaus.griffon.runtime.tasks.EventEmitter
All Implemented Interfaces:
Iterable

public class EventEmitter
extends Object

Authors:
Raffael Herzog
Eike Kettner


Nested Class Summary
protected class EventEmitter.EventInvocationHandler

 
Field Summary
private Object emitter

private ExceptionHandler exceptionHandler

private Class listenerClass

private CopyOnWriteArrayList listeners

private static org.slf4j.Logger log

 
Constructor Summary
EventEmitter(Class clazz, ClassLoader loader, ExceptionHandler handler)

 
Method Summary
void addListener(Object listener)

protected InvocationHandler createInvocationHandler()

Object emitter()

int getListenerCount()

Object[] getListeners()

boolean isEmpty()

Iterator iterator()

static EventEmitter newEmitter(Class listenerClass)

static EventEmitter newEmitter(Class listenerClass, ClassLoader loader)

static EventEmitter newEmitter(Class listenerClass, ExceptionHandler handler)

static EventEmitter newEmitter(Class listenerClass, ClassLoader loader, ExceptionHandler handler)

void removeListener(Object listener)

void setExceptionHandler(ExceptionHandler exceptionHandler)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

emitter

private final Object emitter


exceptionHandler

private ExceptionHandler exceptionHandler


listenerClass

private final Class listenerClass


listeners

private final CopyOnWriteArrayList listeners


log

private static final org.slf4j.Logger log


 
Constructor Detail

EventEmitter

public EventEmitter(Class clazz, ClassLoader loader, ExceptionHandler handler) {
public EventEmitter(Class clazz, ClassLoader loader, ExceptionHandler handler)


 
Method Detail

addListener

public void addListener(Object listener)


createInvocationHandler

protected InvocationHandler createInvocationHandler()


emitter

public Object emitter()


getListenerCount

public int getListenerCount()


getListeners

public T[] getListeners() {
public Object[] getListeners()


isEmpty

public boolean isEmpty()


iterator

public Iterator iterator()


newEmitter

public static EventEmitter newEmitter(Class listenerClass)


newEmitter

public static EventEmitter newEmitter(Class listenerClass, ClassLoader loader)


newEmitter

public static EventEmitter newEmitter(Class listenerClass, ExceptionHandler handler)


newEmitter

public static EventEmitter newEmitter(Class listenerClass, ClassLoader loader, ExceptionHandler handler)


removeListener

public void removeListener(Object listener)


setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)


 

Groovy Documentation