net.codescore.managers
Class ClarificationListener

java.lang.Object
  extended by net.codescore.managers.ClarificationListener

public class ClarificationListener
extends Object

Called by Cayenne on changes to Clarifications.

Author:
Adam Cornett

Field Summary
private static List<ClariUpdateListener> callbacks
           
private static AtomicBoolean listWriteLocked
           
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
ClarificationListener()
           
 
Method Summary
private static void checkWriteLock()
          Will block until the write lock is released
 void clariAdded(Clarification c)
          Called by Cayenne post-persist
 void clariChanged(Clarification c)
          Called by Cayenne post-commit
static void deRegisterCallback(ClariUpdateListener c)
          Removed a registered callback
static void registerCallback(ClariUpdateListener c)
          Add a callback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callbacks

private static List<ClariUpdateListener> callbacks

listWriteLocked

private static AtomicBoolean listWriteLocked

log

private static org.apache.commons.logging.Log log
Constructor Detail

ClarificationListener

public ClarificationListener()
Method Detail

deRegisterCallback

public static void deRegisterCallback(ClariUpdateListener c)
Removed a registered callback

Parameters:
c - The listener to remove

registerCallback

public static void registerCallback(ClariUpdateListener c)
Add a callback

Parameters:
c - The new callback

checkWriteLock

private static void checkWriteLock()
Will block until the write lock is released


clariAdded

public void clariAdded(Clarification c)
Called by Cayenne post-persist

Parameters:
c - The new Clarification

clariChanged

public void clariChanged(Clarification c)
Called by Cayenne post-commit

Parameters:
c - The updated Clarification


Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.