net.tomp2p.futures
Class FutureData

java.lang.Object
  extended by net.tomp2p.futures.BaseFutureImpl
      extended by net.tomp2p.futures.FutureResponse
          extended by net.tomp2p.futures.FutureData
All Implemented Interfaces:
BaseFuture, Cancellable

public class FutureData
extends FutureResponse


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.tomp2p.futures.BaseFuture
BaseFuture.FutureType
 
Field Summary
 
Fields inherited from class net.tomp2p.futures.BaseFutureImpl
completed, lock, reason, type
 
Constructor Summary
FutureData(Message requestMessage, boolean raw)
          Creates the request message for raw data.
 
Method Summary
 org.jboss.netty.buffer.ChannelBuffer getBuffer()
           
 Object getObject()
           
 void setResponse(Message responseMessage)
          Gets called if a peer responds.
 
Methods inherited from class net.tomp2p.futures.FutureResponse
cancelTimeout, getReplyTimeout, getRequest, getResponse, setReplyTimeout, setReplyTimeoutHandler
 
Methods inherited from class net.tomp2p.futures.BaseFutureImpl
addCancellation, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeCancellation, removeListener, setCompletedAndNotify, setFailed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureData

public FutureData(Message requestMessage,
                  boolean raw)
Creates the request message for raw data. Note that the response might have a null payload. This is ok since a response might be empty and only send an ack that the message has arrived.

Parameters:
requestMessage -
Method Detail

setResponse

public void setResponse(Message responseMessage)
Description copied from class: FutureResponse
Gets called if a peer responds. Note that either this method or responseFailed() is always called.

Overrides:
setResponse in class FutureResponse

getBuffer

public org.jboss.netty.buffer.ChannelBuffer getBuffer()

getObject

public Object getObject()


Copyright © 2011. All Rights Reserved.