|
||||||||||
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.ServerInboundWay
org.restlet.engine.connector.HttpServerInboundWay
public class HttpServerInboundWay
HTTP server inbound way.
Constructor Summary | |
---|---|
HttpServerInboundWay(Connection<Server> connection,
int bufferSize)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Recycles the way so it can be reused. |
protected Response |
createResponse(Request request)
Creates a response object for the given request. |
int |
getLoadScore()
Returns a score representing the way load and that could be compared with other ways of the same parent connection. |
Queue<Response> |
getMessages()
Returns the queue of messages. |
protected boolean |
hasIoInterest()
Indicates if we want to be selected for IO processing when the socket related socket is prepared. |
boolean |
isAvailable()
Indicates if the way is available to handle new messages. |
boolean |
isEmpty()
Indicates if the way is empty. |
void |
onError(Status status)
Called on error. |
protected void |
onReceived(Response message)
Call back invoked when the message is received. |
void |
onTimeOut()
Called back by the controller when an IO time out has been detected. |
Methods inherited from class org.restlet.engine.connector.ServerInboundWay |
---|
getActualMessage, getConnection, getHelper, onHeadersCompleted, readStartLine, updateState |
Methods inherited from class org.restlet.engine.connector.InboundWay |
---|
createEntity, fillLine, getBuilderIndex, getEntityRegistration, getInterestOperations, isLineReadable, onDrain, onFill, onFillEof, onMessageCompleted, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration |
Methods inherited from class org.restlet.engine.connector.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpServerInboundWay(Connection<Server> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.Method Detail |
---|
public void clear()
Way
clear
in class InboundWay
protected Response createResponse(Request request)
ServerInboundWay
createResponse
in class ServerInboundWay
request
- The parent request.
public int getLoadScore()
Way
getLoadScore
in class Way
public Queue<Response> getMessages()
protected boolean hasIoInterest()
Way
hasIoInterest
in class ServerInboundWay
public boolean isAvailable()
Way
isAvailable
in class Way
public boolean isEmpty()
Way
isEmpty
in class Way
public void onError(Status status)
Way
onError
in class InboundWay
status
- The error status.protected void onReceived(Response message) throws IOException
ServerInboundWay
onReceived
in class ServerInboundWay
message
- The new message received.
IOException
public void onTimeOut()
Way
onTimeOut
in class InboundWay
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |