net.codescore.managers
Class SubmissionListener

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

public class SubmissionListener
extends Object

Called by Cayenne on changes to Submissions.

Author:
Adam Cornett

Field Summary
private static List<SubUpdateListener> callbacks
           
private static AtomicBoolean listWriteLocked
          Used to lock the list while traversing it in the
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
SubmissionListener()
           
 
Method Summary
private static void checkWriteLock()
          Will block until the write lock is released
static void deRegisterCallback(SubUpdateListener s)
          Removed a registered callback
static void registerCallback(SubUpdateListener s)
          Add a callback
 void subAdded(TeamSubmission s)
          Called by Cayenne post-persist of a new submission
 void subChanged(TeamSubmission s)
          Called by Cayenne post-commit of an updated submission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callbacks

private static List<SubUpdateListener> callbacks

listWriteLocked

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


log

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

SubmissionListener

public SubmissionListener()
Method Detail

deRegisterCallback

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

Parameters:
s - The listener to remove

registerCallback

public static void registerCallback(SubUpdateListener s)
Add a callback

Parameters:
s - The new Callback

checkWriteLock

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


subAdded

public void subAdded(TeamSubmission s)
Called by Cayenne post-persist of a new submission

Parameters:
s - The new TeamSubmission

subChanged

public void subChanged(TeamSubmission s)
Called by Cayenne post-commit of an updated submission

Parameters:
s - The updated submission.


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