org.ccnx.ccn.impl.QueuedContentHandler< E > Class Reference

Asynchronously process data from a ContentHandler in cases in which there may be a processing delay in order to allow the netmanager thread to continue to fetch data. More...

Inheritance diagram for org.ccnx.ccn.impl.QueuedContentHandler< E >:

List of all members.

Public Member Functions

void add (E e)
 Add a content object to the queue for processing.
void run ()
 Asynchronously dequeue and process data from a ContentHandler.

Protected Member Functions

boolean checkShutdown ()
 Override for different behavior.
abstract void process (E e)
 Process the data from a ContentHandler asynchronously.

Protected Attributes

Queue< E > _queue = new ConcurrentLinkedQueue<E>()
boolean _isRunning = false


Detailed Description

Asynchronously process data from a ContentHandler in cases in which there may be a processing delay in order to allow the netmanager thread to continue to fetch data.

A new processing thread is started only when necessary.


Member Function Documentation

void org.ccnx.ccn.impl.QueuedContentHandler< E >.add ( e  ) 

Add a content object to the queue for processing.

If we aren't running a processing thread right now, start one.

Parameters:
ci encapsulated data from a content handler

boolean org.ccnx.ccn.impl.QueuedContentHandler< E >.checkShutdown (  )  [protected]

Override for different behavior.

Returns:

abstract void org.ccnx.ccn.impl.QueuedContentHandler< E >.process ( e  )  [protected, pure virtual]

Process the data from a ContentHandler asynchronously.

Parameters:
co - the ContentObject
interest - the Interest


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:44:52 2012 for Content-Centric Networking in Java by  doxygen 1.5.6