Package org.restlet.ext.nio.internal.way
Class HttpServerInboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.InboundWay
-
- org.restlet.ext.nio.internal.way.ServerInboundWay
-
- org.restlet.ext.nio.internal.way.HttpServerInboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpsServerInboundWay
@Deprecated public class HttpServerInboundWay extends ServerInboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.HTTP server inbound way.
-
-
Constructor Summary
Constructors Constructor Description HttpServerInboundWay(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.protected ResponsecreateResponse(Request request)Deprecated.Creates a response object for the given request.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.booleanisAvailable()Deprecated.Indicates if the way is available to handle new messages.booleanisEmpty()Deprecated.Indicates if the way is empty.voidonError(Status status)Deprecated.Called on error.protected voidonReceived(Response message)Deprecated.Call back invoked when the message is received.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.ServerInboundWay
getActualMessage, getConnection, getHelper, onHeadersCompleted, readStartLine, updateState
-
Methods inherited from class org.restlet.ext.nio.internal.way.InboundWay
createEntity, fillLine, getBuilderIndex, getEntityRegistration, getInterestOperations, isLineReadable, onDrain, onFill, onFillEof, onMessageCompleted, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration
-
Methods inherited from class org.restlet.ext.nio.internal.way.Way
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, 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
-
HttpServerInboundWay
public HttpServerInboundWay(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 classInboundWay
-
createResponse
protected Response createResponse(Request request)
Deprecated.Description copied from class:ServerInboundWayCreates a response object for the given request.- Specified by:
createResponsein classServerInboundWay- Parameters:
request- The parent request.- 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 classServerInboundWay- Returns:
- True if we want to be selected for IO processing when the socket is ready.
-
isAvailable
public boolean isAvailable()
Deprecated.Description copied from class:WayIndicates if the way is available to handle new messages.- Overrides:
isAvailablein classWay- Returns:
- True if the way is available to handle new messages.
-
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.
-
onReceived
protected void onReceived(Response message) throws java.io.IOException
Deprecated.Description copied from class:ServerInboundWayCall back invoked when the message is received.- Overrides:
onReceivedin classServerInboundWay- Parameters:
message- The new message received.- 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
-
-