net.codescore.managers
Class ProblemListener

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

public class ProblemListener
extends Object

Called by Cayenne on changes to Problems.

Author:
Adam Cornett

Field Summary
private static List<ProblemUpdateListener> callbacks
           
private static AtomicBoolean listWriteLocked
           
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
ProblemListener()
           
 
Method Summary
private static void checkWriteLock()
          Will block until the write lock is released
static void deRegisterCallback(ProblemUpdateListener p)
          Removed a registered callback
 void probAdded(Problem p)
          Called by Cayenne on post-persist of a problem.
 void probChanged(Problem p)
          Called By Cayenne on post-commit of a problem.
static void registerCallback(ProblemUpdateListener p)
          Add a callback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

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

listWriteLocked

private static AtomicBoolean listWriteLocked

callbacks

private static List<ProblemUpdateListener> callbacks
Constructor Detail

ProblemListener

public ProblemListener()
Method Detail

checkWriteLock

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


deRegisterCallback

public static void deRegisterCallback(ProblemUpdateListener p)
Removed a registered callback

Parameters:
p - The listener to remove

registerCallback

public static void registerCallback(ProblemUpdateListener p)
Add a callback

Parameters:
p - The new callback

probAdded

public void probAdded(Problem p)
Called by Cayenne on post-persist of a problem.

Parameters:
p - The new problem

probChanged

public void probChanged(Problem p)
Called By Cayenne on post-commit of a problem.

Parameters:
p - The updated problem;


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