|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.connector.Way
org.restlet.engine.connector.InboundWay
org.restlet.engine.connector.ClientInboundWay
org.restlet.engine.connector.HttpClientInboundWay
public class HttpClientInboundWay
HTTP client inbound way.
Constructor Summary | |
---|---|
HttpClientInboundWay(Connection<Client> connection,
int bufferSize)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Recycles the way so it can be reused. |
protected Response |
createResponse(Status status)
Creates a response object for the given status. |
int |
getLoadScore()
Returns a score representing the way load and that could be compared with other ways of the same parent connection. |
java.util.Queue<Response> |
getMessages()
Returns the queue of messages. |
boolean |
isEmpty()
Indicates if the way is empty. |
protected boolean |
isReady()
Indicates if the IoState.READY state can be granted. |
void |
onCompleted(boolean endDetected)
Callback method invoked when the current message has been completely received or sent. |
void |
onError(Status status)
Called on error. |
void |
onTimeOut()
Called back by the controller when an IO time out has been detected. |
void |
updateState()
Updates the way IO and message states. |
Methods inherited from class org.restlet.engine.connector.ClientInboundWay |
---|
copyResponseTransportHeaders, createStatus, getActualMessage, getConnection, getHelper, getInterestOperations, onReceived, onReceived, readStartLine |
Methods inherited from class org.restlet.engine.connector.InboundWay |
---|
createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onFill, onFillEof, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration |
Methods inherited from class org.restlet.engine.connector.Way |
---|
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, isAvailable, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpClientInboundWay(Connection<Client> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.
java.io.IOException
Method Detail |
---|
public void clear()
Way
clear
in class InboundWay
protected Response createResponse(Status status)
ClientInboundWay
createResponse
in class ClientInboundWay
status
- The response status.
public int getLoadScore()
Way
getLoadScore
in class Way
public java.util.Queue<Response> getMessages()
public boolean isEmpty()
Way
isEmpty
in class Way
protected boolean isReady()
IoState.READY
state can be granted.
IoState.READY
state can be granted.public void onCompleted(boolean endDetected) throws java.io.IOException
Way
onCompleted
in interface CompletionListener
onCompleted
in class ClientInboundWay
endDetected
- Indicates if the end of the socket channel was detected.
java.io.IOException
public void onError(Status status)
Way
onError
in class InboundWay
status
- The error status.public void onTimeOut()
Way
onTimeOut
in class InboundWay
public void updateState()
Way
updateState
in class InboundWay
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |