org.pm4j.core.pm.impl
Class PmEventApiHandler

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmEventApiHandler

public class PmEventApiHandler
extends java.lang.Object


Constructor Summary
PmEventApiHandler()
           
 
Method Summary
 void addPmEventListener(PmObject pm, int eventMask, PmEventListener listener)
           
 void addWeakPmEventListener(PmObject pm, int eventMask, PmEventListener listener)
           
protected  void dispatchToOnEventMethodCalls(PmObjectBase pmImpl, PmEvent event, int eventMask)
          Calls the related on...() methods.
 void firePmEvent(PmObject pm, PmEvent event)
           
 void firePmEventIfInitialized(PmObject pm, int eventMask)
           
 java.lang.Object getThreadEventSource()
           
 void removePmEventListener(PmObject pm, int eventMask, PmEventListener listener)
           
 void removePmEventListener(PmObject pm, PmEventListener listener)
          Removes the listener reference.
 java.lang.Object setThreadEventSource(java.lang.Object src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmEventApiHandler

public PmEventApiHandler()
Method Detail

setThreadEventSource

public java.lang.Object setThreadEventSource(java.lang.Object src)

getThreadEventSource

public java.lang.Object getThreadEventSource()

addPmEventListener

public void addPmEventListener(PmObject pm,
                               int eventMask,
                               PmEventListener listener)

addWeakPmEventListener

public void addWeakPmEventListener(PmObject pm,
                                   int eventMask,
                                   PmEventListener listener)

removePmEventListener

public void removePmEventListener(PmObject pm,
                                  PmEventListener listener)
Removes the listener reference.

Parameters:
listener - The listener to unregister.

removePmEventListener

public void removePmEventListener(PmObject pm,
                                  int eventMask,
                                  PmEventListener listener)

firePmEvent

public void firePmEvent(PmObject pm,
                        PmEvent event)

firePmEventIfInitialized

public void firePmEventIfInitialized(PmObject pm,
                                     int eventMask)

dispatchToOnEventMethodCalls

protected void dispatchToOnEventMethodCalls(PmObjectBase pmImpl,
                                            PmEvent event,
                                            int eventMask)
Calls the related on...() methods. The set of methods to call is determined by the given eventMask parameter.

Parameters:
event - The event to propagate.
eventMask - Defines the set of on-methods to be called.