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)
FutureResponse
FutureResponse.ResponseListener
which will get notified once FutureResponse.isReady()
is trueaddListener
in interface FutureResponse
public void removeListener(FutureResponse.ResponseListener listener)
FutureResponse
FutureResponse.ResponseListener
removeListener
in interface FutureResponse
public boolean isReady()
FutureResponse
true
once the FutureResponse
is ready and calling any of the get methods will not block any more.isReady
in interface FutureResponse
public List<CharSequence> getLines()
Response
Response
before sending it to the client.public String getRetCode()
Response
getRetCode
in interface Response
public boolean isEndSession()
Response
isEndSession
in interface Response
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.