org.barracudamvc.core.event
Interface EventPool

All Known Implementing Classes:
DefaultEventPool

public interface EventPool

This indterface defines the methods needed to implement an EventPool


Method Summary
 BaseEvent checkoutEvent(Class event)
          check out an event from the EventPool.
 void cleanupLockedEvents()
          Cleanup any locked events which weren't released (they should all be).
 void releaseEvent(BaseEvent event)
          check the event back in, allowing someone else to have access to it.
 void shutdown()
          Shutdown the event pool
 

Method Detail

checkoutEvent

public BaseEvent checkoutEvent(Class event)
                        throws NoAvailableEventsException,
                               InvalidClassException
check out an event from the EventPool.

Parameters:
event - the class of event we are interested in checking out
Returns:
the checked out event
Throws:
NoAvailableEventsException - if there are no available events in the queue
InvalidClassException - if the event class is not valid

releaseEvent

public void releaseEvent(BaseEvent event)
check the event back in, allowing someone else to have access to it.

Parameters:
event - the event we're releasing our lock on

cleanupLockedEvents

public void cleanupLockedEvents()
Cleanup any locked events which weren't released (they should all be). You should not ever really need to run this method. It will get invoked automatically when the cleaner-upper runs


shutdown

public void shutdown()
Shutdown the event pool



Copyright © 2004 BarracudaMVC.org All Rights Reserved.