org.ccnx.ccn.impl.CCNNetworkManager.ListenerRegistration Class Reference

Generic superclass for registration objects that may have a listener Handles invalidation and pending delivery consistently to enable subclass to call listener callback without holding any library locks, yet avoid delivery to a cancelled listener. More...

List of all members.

Public Member Functions

abstract void deliver ()
void invalidate ()
 This is called when removing interest or content handlers.
void run ()
 Calls the client handler.
boolean equals (Object obj)
 Equality based on listener if present, so multiple objects can have the same interest registered without colliding.
int hashCode ()

Public Attributes

Semaphore sema = null
Object owner = null

Protected Attributes

Object listener
CCNNetworkManager manager
boolean deliveryPending = false
long id

Detailed Description

Generic superclass for registration objects that may have a listener Handles invalidation and pending delivery consistently to enable subclass to call listener callback without holding any library locks, yet avoid delivery to a cancelled listener.


Member Function Documentation

void org.ccnx.ccn.impl.CCNNetworkManager.ListenerRegistration.invalidate (  ) 

This is called when removing interest or content handlers.

It's purpose is to insure that once the remove call begins it completes atomically without more handlers being triggered. Note that there is still not full atomicity here because a dispatch to handler might be in progress and we don't hold locks throughout the dispatch to avoid deadlocks.


The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:37 2011 for Content-Centric Networking in Java by  doxygen 1.6.3