de.uplanet.lucy.server.portalserver
Class ServerEventDispatcher

java.lang.Object
  extended by de.uplanet.lucy.server.portalserver.ServerEventDispatcher

@Scriptable
public final class ServerEventDispatcher
extends java.lang.Object

A dispatcher for server events.

The dispatcher does not hold strong references to the registered listeners, so the caller must control the lifecycle of the listener instances.

Version:
$Revision: 69827 $

Field Summary
static java.lang.String SYSPROP_LOG_SERVER_EVENTS
           
 
Method Summary
 void addListener(de.uplanet.lucy.server.events.IServerEventListener p_listener)
          Register a listener for server events.
 void dispatch(IServerEvent p_evt)
          Notifies all registered listeners about the given event.
static ServerEventDispatcher getInstance()
          Get the one and only instance of this event dispatcher.
 boolean isLogEvents()
           
 void setLogEvents(boolean p_bLogEvents)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSPROP_LOG_SERVER_EVENTS

@SystemProperty(defaultValue="false")
public static final java.lang.String SYSPROP_LOG_SERVER_EVENTS
See Also:
Constant Field Values
Method Detail

getInstance

public static ServerEventDispatcher getInstance()
Get the one and only instance of this event dispatcher.

Returns:
The one and only instance of the dispatcher.

isLogEvents

public boolean isLogEvents()

setLogEvents

public void setLogEvents(boolean p_bLogEvents)

addListener

public void addListener(de.uplanet.lucy.server.events.IServerEventListener p_listener)
Register a listener for server events.

Parameters:
p_listener - The listener to be added

dispatch

public void dispatch(IServerEvent p_evt)
Notifies all registered listeners about the given event.

The calls to the listeners are synchronous and synchronized.

Parameters:
p_evt - The event to be dispatched.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.