|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.connector.Way
org.restlet.engine.connector.InboundWay
org.restlet.engine.connector.ClientInboundWay
public abstract class ClientInboundWay
Client-side inbound way.
Constructor Summary | |
---|---|
ClientInboundWay(Connection<?> connection,
int bufferSize)
Constructor. |
Method Summary | |
---|---|
protected void |
copyResponseTransportHeaders(Series<Header> headers,
Response response)
Copies headers into a response. |
protected abstract Response |
createResponse(Status status)
Creates a response object for the given status. |
protected Status |
createStatus(int code)
Returns the status corresponding to a given status code. |
Message |
getActualMessage()
Returns the actual message, request or response. |
Connection<Client> |
getConnection()
Returns the parent connection. |
ClientConnectionHelper |
getHelper()
Returns the parent connector helper. |
int |
getInterestOperations()
Returns the operations of interest. |
protected void |
onHeadersCompleted()
Callback invoked when a message has been received. |
void |
onMessageCompleted(boolean endDetected)
Callback method invoked when the current message has been completely received or sent. |
protected void |
onReceived(Response message)
Call back invoked when the message is received. |
protected void |
readStartLine()
Read the start line of the current message received. |
Methods inherited from class org.restlet.engine.connector.InboundWay |
---|
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onError, onFill, onFillEof, onPostProcessing, onTimeOut, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration, updateState |
Methods inherited from class org.restlet.engine.connector.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClientInboundWay(Connection<?> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.Method Detail |
---|
protected void copyResponseTransportHeaders(Series<Header> headers, Response response)
headers
- The headers to copy.response
- The response to update.protected abstract Response createResponse(Status status)
status
- The response status.
protected Status createStatus(int code)
code
- The status code.
public Message getActualMessage()
Way
getActualMessage
in class Way
public Connection<Client> getConnection()
Way
getConnection
in class Way
public ClientConnectionHelper getHelper()
Way
getHelper
in class Way
public int getInterestOperations()
Way
getInterestOperations
in class InboundWay
protected void onHeadersCompleted() throws IOException
InboundWay
onHeadersCompleted
in class InboundWay
IOException
public void onMessageCompleted(boolean endDetected) throws IOException
Way
onMessageCompleted
in interface CompletionListener
onMessageCompleted
in class InboundWay
endDetected
- Indicates if the end of the socket channel was detected.
IOException
protected void onReceived(Response message) throws IOException
InboundWay
onReceived
in class InboundWay
message
- The new message received.
IOException
protected void readStartLine() throws IOException
InboundWay
readStartLine
in class InboundWay
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |