net.floodlightcontroller.core.internal
Class OFFeaturesReplyFuture

java.lang.Object
  extended by net.floodlightcontroller.core.internal.OFMessageFuture<OFFeaturesReply>
      extended by net.floodlightcontroller.core.internal.OFFeaturesReplyFuture
All Implemented Interfaces:
java.util.concurrent.Future<OFFeaturesReply>

public class OFFeaturesReplyFuture
extends OFMessageFuture<OFFeaturesReply>

A concrete implementation that handles asynchronously receiving OFFeaturesReply

Author:
Shudong Zhou

Field Summary
protected  boolean finished
           
 
Fields inherited from class net.floodlightcontroller.core.internal.OFMessageFuture
canceled, DEFAULT_TIMEOUT, DEFAULT_TIMEOUT_UNIT, latch, responseType, result, sw, threadPool, timeoutTimer, transactionId
 
Constructor Summary
OFFeaturesReplyFuture(IThreadPoolService tp, IOFSwitch sw, int transactionId)
           
OFFeaturesReplyFuture(IThreadPoolService tp, IOFSwitch sw, int transactionId, long timeout, java.util.concurrent.TimeUnit unit)
           
 
Method Summary
protected  void handleReply(IOFSwitch sw, OFMessage msg)
          Used to handle the specific expected message this Future was reigstered for, the specified msg parameter is guaranteed to match the type and transaction id specified.
protected  boolean isFinished()
          Called directly after handleReply, subclasses implement this method to indicate when the future can deregister itself from receiving future messages, and when it is safe to return the results to any waiting threads.
protected  void unRegister()
           
 
Methods inherited from class net.floodlightcontroller.core.internal.OFMessageFuture
cancel, deliverFuture, get, get, getTransactionId, isCancelled, isDone, setTransactionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

finished

protected volatile boolean finished
Constructor Detail

OFFeaturesReplyFuture

public OFFeaturesReplyFuture(IThreadPoolService tp,
                             IOFSwitch sw,
                             int transactionId)

OFFeaturesReplyFuture

public OFFeaturesReplyFuture(IThreadPoolService tp,
                             IOFSwitch sw,
                             int transactionId,
                             long timeout,
                             java.util.concurrent.TimeUnit unit)
Method Detail

handleReply

protected void handleReply(IOFSwitch sw,
                           OFMessage msg)
Description copied from class: OFMessageFuture
Used to handle the specific expected message this Future was reigstered for, the specified msg parameter is guaranteed to match the type and transaction id specified.

Specified by:
handleReply in class OFMessageFuture<OFFeaturesReply>

isFinished

protected boolean isFinished()
Description copied from class: OFMessageFuture
Called directly after handleReply, subclasses implement this method to indicate when the future can deregister itself from receiving future messages, and when it is safe to return the results to any waiting threads.

Specified by:
isFinished in class OFMessageFuture<OFFeaturesReply>
Returns:
when this Future has completed its work

unRegister

protected void unRegister()
Overrides:
unRegister in class OFMessageFuture<OFFeaturesReply>