Package org.restlet.ext.nio.internal.way
Class HttpClientInboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.InboundWay
-
- org.restlet.ext.nio.internal.way.ClientInboundWay
-
- org.restlet.ext.nio.internal.way.HttpClientInboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpsClientInboundWay
@Deprecated public class HttpClientInboundWay extends ClientInboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.HTTP client inbound way.
-
-
Constructor Summary
Constructors Constructor Description HttpClientInboundWay(Connection<Client> connection, int bufferSize)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.Recycles the way so it can be reused.protected ResponsecreateResponse(Status status)Deprecated.Creates a response object for the given status.intgetLoadScore()Deprecated.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()Deprecated.Returns the queue of messages.protected booleanhasIoInterest()Deprecated.Indicates if we want to be selected for IO processing when the socket related socket is prepared.booleanisEmpty()Deprecated.Indicates if the way is empty.voidonError(Status status)Deprecated.Called on error.voidonMessageCompleted(boolean endDetected)Deprecated.Callback method invoked when the current message has been completely received or sent.voidonTimeOut()Deprecated.Called back by the controller when an IO time out has been detected.-
Methods inherited from class org.restlet.ext.nio.internal.way.ClientInboundWay
copyResponseTransportHeaders, createStatus, getActualMessage, getConnection, getHelper, getInterestOperations, onHeadersCompleted, onReceived, readStartLine
-
Methods inherited from class org.restlet.ext.nio.internal.way.InboundWay
createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onFill, onFillEof, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration, updateState
-
Methods inherited from class org.restlet.ext.nio.internal.way.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
-
-
-
-
Field Detail
-
messages
private final java.util.Queue<Response> messages
Deprecated.The queue of messages.
-
-
Constructor Detail
-
HttpClientInboundWay
public HttpClientInboundWay(Connection<Client> connection, int bufferSize)
Deprecated.Constructor.- Parameters:
connection- The parent connection.bufferSize- The byte buffer size.- Throws:
java.io.IOException
-
-
Method Detail
-
clear
public void clear()
Deprecated.Description copied from class:WayRecycles the way so it can be reused. Typically invoked by a connection pool.- Overrides:
clearin classInboundWay
-
createResponse
protected Response createResponse(Status status)
Deprecated.Description copied from class:ClientInboundWayCreates a response object for the given status.- Specified by:
createResponsein classClientInboundWay- Parameters:
status- The response status.- Returns:
- The new response object.
-
getLoadScore
public int getLoadScore()
Deprecated.Description copied from class:WayReturns a score representing the way load and that could be compared with other ways of the same parent connection.- Overrides:
getLoadScorein classWay- Returns:
- A score representing the way load.
-
getMessages
public java.util.Queue<Response> getMessages()
Deprecated.Returns the queue of messages.- Returns:
- The queue of messages.
-
hasIoInterest
protected boolean hasIoInterest()
Deprecated.Description copied from class:WayIndicates if we want to be selected for IO processing when the socket related socket is prepared.- Overrides:
hasIoInterestin classWay- Returns:
- True if we want to be selected for IO processing when the socket is ready.
-
isEmpty
public boolean isEmpty()
Deprecated.Description copied from class:WayIndicates if the way is empty.
-
onError
public void onError(Status status)
Deprecated.Description copied from class:WayCalled on error.- Overrides:
onErrorin classInboundWay- Parameters:
status- The error status.
-
onMessageCompleted
public void onMessageCompleted(boolean endDetected) throws java.io.IOExceptionDeprecated.Description copied from class:WayCallback method invoked when the current message has been completely received or sent.- Specified by:
onMessageCompletedin interfaceCompletionListener- Overrides:
onMessageCompletedin classClientInboundWay- Parameters:
endDetected- Indicates if the end of the socket channel was detected.- Throws:
java.io.IOException
-
onTimeOut
public void onTimeOut()
Deprecated.Description copied from class:WayCalled back by the controller when an IO time out has been detected.- Overrides:
onTimeOutin classInboundWay
-
-