Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.kernel.plugins.event
Class AbstractEventEmitter

    java.lang.Object
      org.jboss.kernel.plugins.event.AbstractEventEmitter

All Implemented Interfaces:
  KernelEventEmitter

Direct Known Subclasses:
  AbstractKernelObject

public class AbstractEventEmitter
extends Object
implements KernelEventEmitter

Abstract Event emitter.

Version:
  $Revision: 1.4 $
Author:
  Adrian Brock

Field Summary
`protected Map` | `eventListenerRegistry` The registry Map>>
`protected static Object` | `NULL` Used to represent a null parameter

Constructor Summary
`AbstractEventEmitter()`

Method Summary
`KernelEvent` | `createEvent(String type, Object context)` Make a new event
`void` | `fireKernelEvent(KernelEvent event)` Fire an event
`protected void` | `fireKernelEvent(KernelEventListener listener, KernelEvent event, Object handback)` Fire a kernel event to a single listener
`boolean` | `hasListeners()` Do we have listeners
`protected long` | `nextEmitterSequence()` Get the next emitter sequence
`void` | `registerListener(KernelEventListener listener, KernelEventFilter filter, Object handback)` Register a listener
`void` | `unregisterListener(KernelEventListener listener, KernelEventFilter filter, Object handback)` Unregister a listener

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NULL

    protected static final Object NULL

  Used to represent a null parameter

### eventListenerRegistry

    protected Map eventListenerRegistry

  The registry Map>>

Constructor Detail

### AbstractEventEmitter

    public AbstractEventEmitter()

Method Detail

### hasListeners

    public boolean hasListeners()

  Do we have listeners

  Returns:
    true when there are listeners

### createEvent

    public KernelEvent createEvent(String type,
                                   Object context)

  Make a new event

### registerListener

    public void registerListener(KernelEventListener listener,
                                 KernelEventFilter filter,
                                 Object handback)
                          throws Throwable

  Description copied from interface: `KernelEventEmitter`
  Register a listener

  Specified by:
    `registerListener` in interface `KernelEventEmitter`
  Parameters:
    `listener` - the listener
    `filter` - the filter
    `handback` - the handback object
  Throws:
    `Throwable` - for any error

### unregisterListener

    public void unregisterListener(KernelEventListener listener,
                                   KernelEventFilter filter,
                                   Object handback)
                            throws Throwable

  Description copied from interface: `KernelEventEmitter`
  Unregister a listener

  Specified by:
    `unregisterListener` in interface `KernelEventEmitter`
  Parameters:
    `listener` - the listener
    `filter` - the filter
    `handback` - the handback object
  Throws:
    `Throwable` - for any error

### fireKernelEvent

    public void fireKernelEvent(KernelEvent event)

  Description copied from interface: `KernelEventEmitter`
  Fire an event

  Specified by:
    `fireKernelEvent` in interface `KernelEventEmitter`
  Parameters:
    `event` - the event

### fireKernelEvent

    protected void fireKernelEvent(KernelEventListener listener,
                                   KernelEvent event,
                                   Object handback)

  Fire a kernel event to a single listener

  Parameters:
    `listener` - the listener
    `event` - the event
    `handback` - the handback object

### nextEmitterSequence

    protected long nextEmitterSequence()

  Get the next emitter sequence

  Returns:
    the next emitter sequence

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 JBoss Inc. All Rights Reserved.