Package org.restlet.ext.nio.internal.way
Class ClientInboundWay
- java.lang.Object
-
- org.restlet.ext.nio.internal.way.Way
-
- org.restlet.ext.nio.internal.way.InboundWay
-
- org.restlet.ext.nio.internal.way.ClientInboundWay
-
- All Implemented Interfaces:
BufferProcessor,CompletionListener,SelectionListener
- Direct Known Subclasses:
HttpClientInboundWay
@Deprecated public abstract class ClientInboundWay extends InboundWay
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.Client-side inbound way.
-
-
Constructor Summary
Constructors Constructor Description ClientInboundWay(Connection<?> connection, int bufferSize)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcopyResponseTransportHeaders(Series<Header> headers, Response response)Deprecated.Copies headers into a response.protected abstract ResponsecreateResponse(Status status)Deprecated.Creates a response object for the given status.protected StatuscreateStatus(int code)Deprecated.Returns the status corresponding to a given status code.MessagegetActualMessage()Deprecated.Returns the actual message, request or response.Connection<Client>getConnection()Deprecated.Returns the parent connection.ClientConnectionHelpergetHelper()Deprecated.Returns the parent connector helper.intgetInterestOperations()Deprecated.Returns the operations of interest.protected voidonHeadersCompleted()Deprecated.Callback invoked when a message has been received.voidonMessageCompleted(boolean endDetected)Deprecated.Callback method invoked when the current message has been completely received or sent.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.-
Methods inherited from class org.restlet.ext.nio.internal.way.InboundWay
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onError, onFill, onFillEof, onPostProcessing, onTimeOut, 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, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, hasIoInterest, isAvailable, isEmpty, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString
-
-
-
-
Constructor Detail
-
ClientInboundWay
public ClientInboundWay(Connection<?> connection, int bufferSize)
Deprecated.Constructor.- Parameters:
connection- The parent connection.bufferSize- The byte buffer size.
-
-
Method Detail
-
copyResponseTransportHeaders
protected void copyResponseTransportHeaders(Series<Header> headers, Response response)
Deprecated.Copies headers into a response.- Parameters:
headers- The headers to copy.response- The response to update.
-
createResponse
protected abstract Response createResponse(Status status)
Deprecated.Creates a response object for the given status.- Parameters:
status- The response status.- Returns:
- The new response object.
-
createStatus
protected Status createStatus(int code)
Deprecated.Returns the status corresponding to a given status code.- Parameters:
code- The status code.- Returns:
- The status corresponding to a given status code.
-
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<Client> getConnection()
Deprecated.Description copied from class:WayReturns the parent connection.- Overrides:
getConnectionin classWay- Returns:
- The parent connection.
-
getHelper
public ClientConnectionHelper getHelper()
Deprecated.Description copied from class:WayReturns the parent connector helper.
-
getInterestOperations
public int getInterestOperations()
Deprecated.Description copied from class:WayReturns the operations of interest.- Overrides:
getInterestOperationsin classInboundWay- Returns:
- The operations of interest.
-
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
-
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 classInboundWay- Parameters:
endDetected- Indicates if the end of the socket channel was detected.- Throws:
java.io.IOException
-
onReceived
protected void onReceived(Response message) throws java.io.IOException
Deprecated.Description copied from class:InboundWayCall 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
-
-