|
||||||||||
| 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.OutboundWay
org.restlet.engine.connector.ServerOutboundWay
org.restlet.engine.connector.HttpServerOutboundWay
public class HttpServerOutboundWay
HTTP server outbound way.
| Constructor Summary | |
|---|---|
HttpServerOutboundWay(Connection<Server> connection,
int bufferSize)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Recycles the way so it can be reused. |
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 void |
handle(Response response)
Add a message to the outbound way. |
boolean |
isEmpty()
Indicates if the way is empty. |
void |
onError(Status status)
Called on error. |
void |
onMessageCompleted(boolean endDetected)
Callback method invoked when the current message has been completely received or sent. |
void |
onTimeOut()
Called back by the controller when an IO time out has been detected. |
void |
updateState()
Updates the way IO and message states. |
| Methods inherited from class org.restlet.engine.connector.ServerOutboundWay |
|---|
addHeaders, addResponseHeaders, getActualMessage, getConnection, writeStartLine |
| Methods inherited from class org.restlet.engine.connector.OutboundWay |
|---|
addEntityHeaders, addGeneralHeaders, flushBuffer, getEntityChannel, getEntityChannelType, getEntityFileChannel, getEntityInterestOps, getEntitySelectableChannel, getEntitySelectionKey, getHeaderIndex, getInterestOperations, getVersion, hasIoInterest, onDrain, onFill, onFillEof, onHeadersCompleted, onPostProcessing, processIoBuffer, setEntityChannel, setEntityChannelType, setEntitySelectionKey, setHeaderIndex, shouldBeChunked, writeLine |
| Methods inherited from class org.restlet.engine.connector.Way |
|---|
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getHelper, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, isAvailable, 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 HttpServerOutboundWay(Connection<Server> connection,
int bufferSize)
connection - The parent connection.bufferSize - The byte buffer size.| Method Detail |
|---|
public void clear()
Way
clear in class OutboundWaypublic int getLoadScore()
Way
getLoadScore in class Waypublic Queue<Response> getMessages()
protected void handle(Response response)
OutboundWay
handle in class OutboundWaypublic boolean isEmpty()
Way
isEmpty in class Way
public void onMessageCompleted(boolean endDetected)
throws IOException
Way
onMessageCompleted in interface CompletionListeneronMessageCompleted in class ServerOutboundWayendDetected - Indicates if the end of the socket channel was detected.
IOExceptionpublic void onError(Status status)
Way
onError in class OutboundWaystatus - The error status.public void onTimeOut()
Way
onTimeOut in class OutboundWaypublic void updateState()
Way
updateState in class OutboundWay
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||