Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.actions
Class ElexisEventListenerImpl

java.lang.Object
  extended by ch.elexis.actions.ElexisEventListenerImpl
All Implemented Interfaces:
ElexisEventListener

public class ElexisEventListenerImpl
extends java.lang.Object
implements ElexisEventListener

An implementation of the most common uses of ElexisSventListeners. Subclasses must override one of catchElexisEvent (non ui thread) or runInUi (the event is forwarded in an async UI thread)

Author:
gerry

Constructor Summary
ElexisEventListenerImpl(java.lang.Class<?> clazz)
           
ElexisEventListenerImpl(java.lang.Class<?> clazz, int mode)
           
ElexisEventListenerImpl(PersistentObject obj, java.lang.Class<?> clazz, int mode)
           
 
Method Summary
 void catchElexisEvent(ElexisEvent ev)
          This catches the Event from the EventDispatcher, which is in a Non-UI Thread by definition
 ElexisEvent getElexisEventFilter()
          Filter the events this listener wants to be informed.
 boolean isStopped()
           
 void runInUi(ElexisEvent ev)
          This runs the event in an UI Thread
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElexisEventListenerImpl

public ElexisEventListenerImpl(java.lang.Class<?> clazz)

ElexisEventListenerImpl

public ElexisEventListenerImpl(java.lang.Class<?> clazz,
                               int mode)

ElexisEventListenerImpl

public ElexisEventListenerImpl(PersistentObject obj,
                               java.lang.Class<?> clazz,
                               int mode)
Method Detail

getElexisEventFilter

public ElexisEvent getElexisEventFilter()
Description copied from interface: ElexisEventListener
Filter the events this listener wants to be informed. Note: This call should complete as fast as possible, because it will be called with every event before dispatching

Specified by:
getElexisEventFilter in interface ElexisEventListener
Returns:
An ElexisEvent with matching
  • object: Only events of this object will be sent
  • class: Only events of this class will be sent
  • type: Only eevnts matching to one ore more flags in type will be sent

catchElexisEvent

public void catchElexisEvent(ElexisEvent ev)
This catches the Event from the EventDispatcher, which is in a Non-UI Thread by definition

Specified by:
catchElexisEvent in interface ElexisEventListener
Parameters:
ev - the Event

runInUi

public void runInUi(ElexisEvent ev)
This runs the event in an UI Thread

Parameters:
ev -

stop

public void stop()

start

public void start()

isStopped

public boolean isStopped()

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis