Package org.restlet.ext.nio.internal.way
Class HttpClientOutboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.OutboundWay
-
- org.restlet.ext.nio.internal.way.ClientOutboundWay
-
- org.restlet.ext.nio.internal.way.HttpClientOutboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpsClientOutboundWay
@Deprecated public class HttpClientOutboundWay extends ClientOutboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.HTTP client outbound way.
-
-
Constructor Summary
Constructors Constructor Description HttpClientOutboundWay(Connection<?> 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.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.voidhandle(Response response)Deprecated.Add a message to the outbound way.booleanisEmpty()Deprecated.Indicates if the way is empty.voidonError(Status status)Deprecated.Called on error.voidonHeadersCompleted()Deprecated.Callback invoked when a message has been sent.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.voidupdateState()Deprecated.Updates the way IO and message states.-
Methods inherited from class org.restlet.ext.nio.internal.way.ClientOutboundWay
addHeaders, addRequestHeaders, getActualMessage, getConnection, writeStartLine
-
Methods inherited from class org.restlet.ext.nio.internal.way.OutboundWay
addEntityHeaders, addGeneralHeaders, flushBuffer, getEntityChannel, getEntityChannelType, getEntityFileChannel, getEntityInterestOps, getEntitySelectableChannel, getEntitySelectionKey, getHeaderIndex, getInterestOperations, getVersion, hasIoInterest, onDrain, onFill, onFillEof, onPostProcessing, processIoBuffer, setEntityChannel, setEntityChannelType, setEntitySelectionKey, setHeaderIndex, shouldBeChunked, writeLine
-
Methods inherited from class org.restlet.ext.nio.internal.way.Way
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getHelper, 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
-
HttpClientOutboundWay
public HttpClientOutboundWay(Connection<?> connection, int bufferSize)
Deprecated.Constructor.- Parameters:
connection- The parent connection.bufferSize- The byte buffer size.
-
-
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 classOutboundWay
-
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.
-
handle
public void handle(Response response)
Deprecated.Description copied from class:OutboundWayAdd a message to the outbound way.- Specified by:
handlein classOutboundWay
-
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 classOutboundWay- Parameters:
status- The error status.
-
onHeadersCompleted
public void onHeadersCompleted() throws java.io.IOExceptionDeprecated.Description copied from class:OutboundWayCallback invoked when a message has been sent. Note that only the start line and the headers must have been sent, not the optional body.- Overrides:
onHeadersCompletedin classOutboundWay- Throws:
java.io.IOException
-
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 classClientOutboundWay- 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 classOutboundWay
-
updateState
public void updateState()
Deprecated.Description copied from class:WayUpdates the way IO and message states.- Overrides:
updateStatein classOutboundWay
-
-