net.codescore.managers
Class CommentListener

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

public class CommentListener
extends Object


Field Summary
private static List<CommentUpdateListener> callbacks
           
private static AtomicBoolean listWriteLocked
          Used to lock the list while traversing it
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
CommentListener()
           
 
Method Summary
private static void checkWriteLock()
          Will block until the write lock is released
 void comAdded(Comment s)
          Called by Cayenne post-persist
 void comChanged(Comment s)
          Called by Cayenne post-commit
static void deRegisterCallback(CommentUpdateListener s)
          Removed a registered callback
static void registerCallback(CommentUpdateListener s)
          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<CommentUpdateListener> callbacks

listWriteLocked

private static AtomicBoolean listWriteLocked
Used to lock the list while traversing it


log

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

CommentListener

public CommentListener()
Method Detail

deRegisterCallback

public static void deRegisterCallback(CommentUpdateListener s)
Removed a registered callback

Parameters:
s - The listener to remove

registerCallback

public static void registerCallback(CommentUpdateListener s)
Add a callback

Parameters:
s - The new Callback

checkWriteLock

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


comAdded

public void comAdded(Comment s)
Called by Cayenne post-persist

Parameters:
s -

comChanged

public void comChanged(Comment s)
Called by Cayenne post-commit

Parameters:
s -


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