Package org.restlet.ext.nio.internal.way
Class ServerInboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.InboundWay
-
- org.restlet.ext.nio.internal.way.ServerInboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpServerInboundWay
@Deprecated public abstract class ServerInboundWay extends InboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.Server-side inbound way.
-
-
Constructor Summary
Constructors Constructor Description ServerInboundWay(Connection<?> connection, int bufferSize)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract ResponsecreateResponse(Request request)Deprecated.Creates a response object for the given request.MessagegetActualMessage()Deprecated.Returns the actual message, request or response.Connection<Server>getConnection()Deprecated.Returns the parent connection.ServerConnectionHelpergetHelper()Deprecated.Returns the parent connector helper.protected booleanhasIoInterest()Deprecated.Indicates if we want to be selected for IO processing when the socket related socket is prepared.protected voidonHeadersCompleted()Deprecated.Callback invoked when a message has been received.protected voidonReceived(Response message)Deprecated.Call back invoked when the message is received.protected voidreadStartLine()Deprecated.Read the start line of the current message received.voidupdateState()Deprecated.Updates the way IO and message states.-
Methods inherited from class org.restlet.ext.nio.internal.way.InboundWay
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, getInterestOperations, isLineReadable, onDrain, onError, onFill, onFillEof, onMessageCompleted, onPostProcessing, onTimeOut, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration
-
Methods inherited from class org.restlet.ext.nio.internal.way.Way
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, isAvailable, isEmpty, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString
-
-
-
-
Constructor Detail
-
ServerInboundWay
public ServerInboundWay(Connection<?> connection, int bufferSize)
Deprecated.Constructor.- Parameters:
connection- The parent connection.bufferSize- The byte buffer size.
-
-
Method Detail
-
createResponse
protected abstract Response createResponse(Request request)
Deprecated.Creates a response object for the given request.- Parameters:
request- The parent request.- Returns:
- The new response object.
-
getActualMessage
public Message getActualMessage()
Deprecated.Description copied from class:WayReturns the actual message, request or response.- Specified by:
getActualMessagein classWay- Returns:
- The actual message, request or response.
-
getConnection
public Connection<Server> getConnection()
Deprecated.Description copied from class:WayReturns the parent connection.- Overrides:
getConnectionin classWay- Returns:
- The parent connection.
-
getHelper
public ServerConnectionHelper getHelper()
Deprecated.Description copied from class:WayReturns the parent connector helper.
-
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.
-
onHeadersCompleted
protected void onHeadersCompleted() throws java.io.IOExceptionDeprecated.Description copied from class:InboundWayCallback invoked when a message has been received. Note that only the start line and the headers must have been received, not the optional body.- Overrides:
onHeadersCompletedin classInboundWay- Throws:
java.io.IOException
-
onReceived
protected void onReceived(Response message) throws java.io.IOException
Deprecated.Call back invoked when the message is received.- Specified by:
onReceivedin classInboundWay- Parameters:
message- The new message received.- Throws:
java.io.IOException
-
readStartLine
protected void readStartLine() throws java.io.IOExceptionDeprecated.Description copied from class:InboundWayRead the start line of the current message received.- Specified by:
readStartLinein classInboundWay- Throws:
java.io.IOException
-
updateState
public void updateState()
Deprecated.Description copied from class:WayUpdates the way IO and message states.- Overrides:
updateStatein classInboundWay
-
-