Package org.restlet.ext.nio.internal.way
Class HttpServerOutboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.OutboundWay
-
- org.restlet.ext.nio.internal.way.ServerOutboundWay
-
- org.restlet.ext.nio.internal.way.HttpServerOutboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpsServerOutboundWay
@Deprecated public class HttpServerOutboundWay extends ServerOutboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.HTTP server outbound way.
-
-
Constructor Summary
Constructors Constructor Description HttpServerOutboundWay(Connection<Server> 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.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.ServerOutboundWay
addHeaders, addResponseHeaders, 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, onHeadersCompleted, 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
-
HttpServerOutboundWay
public HttpServerOutboundWay(Connection<Server> 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.
-
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 classServerOutboundWay- 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
-
-