public class FutureResponseImpl extends Object implements FutureResponse
FutureResponse implementation which wraps a AbstractResponse implementationFutureResponse.ResponseListener| Modifier and Type | Field and Description |
|---|---|
protected Response |
response |
DISCONNECT| Constructor and Description |
|---|
FutureResponseImpl() |
FutureResponseImpl(Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(FutureResponse.ResponseListener listener)
Add a
FutureResponse.ResponseListener which will get notified once FutureResponse.isReady() is true |
protected void |
checkReady() |
List<CharSequence> |
getLines()
Return a List of all response lines stored in this Response.
|
String |
getRetCode()
Return return-code
|
boolean |
isEndSession()
Return true if the session is ended
|
boolean |
isReady()
Return
true once the FutureResponse is ready and calling any of the get methods will not block any more. |
void |
removeListener(FutureResponse.ResponseListener listener)
Remote a
FutureResponse.ResponseListener |
void |
setResponse(Response response)
Set the
Response which will be used to notify the registered
ResponseListener'. |
String |
toString() |
protected Response response
public FutureResponseImpl()
public FutureResponseImpl(Logger logger)
protected final void checkReady()
public void addListener(FutureResponse.ResponseListener listener)
FutureResponseFutureResponse.ResponseListener which will get notified once FutureResponse.isReady() is trueaddListener in interface FutureResponsepublic void removeListener(FutureResponse.ResponseListener listener)
FutureResponseFutureResponse.ResponseListenerremoveListener in interface FutureResponsepublic boolean isReady()
FutureResponsetrue once the FutureResponse is ready and calling any of the get methods will not block any more.isReady in interface FutureResponsepublic List<CharSequence> getLines()
ResponseResponse before sending it to the client.public String getRetCode()
ResponsegetRetCode in interface Responsepublic boolean isEndSession()
ResponseisEndSession in interface ResponseCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.