org.dfdaemon.il2.core.event
Class BlockingQueueEventProcessor

java.lang.Object
  extended by org.dfdaemon.il2.core.event.BlockingQueueEventProcessor
All Implemented Interfaces:
CoreTask, EventProcessor

public class BlockingQueueEventProcessor
extends Object
implements EventProcessor, CoreTask

Author:
aka50

Constructor Summary
BlockingQueueEventProcessor()
          Constructs a new BlockingQueueEventProcessor.
BlockingQueueEventProcessor(int size)
          Constructs a new BlockingQueueEventProcessor.
 
Method Summary
 void addEventConsumer(EventConsumer consumer)
          Add EventConsumer ...
 void afterRun()
          
 void inject(Event event)
          Method inject ...
 void preRun()
          
 void removeEventConsumer(EventConsumer consumer)
          Remove EventConsumer ...
 void run()
          
 boolean stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingQueueEventProcessor

public BlockingQueueEventProcessor()
Constructs a new BlockingQueueEventProcessor.


BlockingQueueEventProcessor

public BlockingQueueEventProcessor(int size)
Constructs a new BlockingQueueEventProcessor.

Parameters:
size - maximum of stored events
Method Detail

inject

public void inject(Event event)
            throws InterruptedException
Method inject ...

Specified by:
inject in interface EventProcessor
Parameters:
event - of type Event
Throws:
InterruptedException - when

addEventConsumer

public void addEventConsumer(EventConsumer consumer)
Add EventConsumer ...

Specified by:
addEventConsumer in interface EventProcessor
Parameters:
consumer - of type EventConsumer

removeEventConsumer

public void removeEventConsumer(EventConsumer consumer)
Remove EventConsumer ...

Specified by:
removeEventConsumer in interface EventProcessor
Parameters:
consumer - of type EventConsumer

preRun

public void preRun()
            throws Exception

Specified by:
preRun in interface CoreTask
Throws:
Exception

run

public void run()
         throws Exception

Specified by:
run in interface CoreTask
Throws:
Exception

afterRun

public void afterRun()

Specified by:
afterRun in interface CoreTask

stop

public boolean stop()


Copyright © 2007-2008. All Rights Reserved.