Class LocalConnector.LocalEndPoint
java.lang.Object
org.eclipse.jetty.io.IdleTimeout
org.eclipse.jetty.io.AbstractEndPoint
org.eclipse.jetty.io.ByteArrayEndPoint
org.eclipse.jetty.server.LocalConnector.LocalEndPoint
- All Implemented Interfaces:
Closeable, AutoCloseable, EndPoint
- Enclosing class:
LocalConnector
Local EndPoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface EndPoint
EndPoint.Pipe, EndPoint.SslSessionData, EndPoint.Wrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidWait for a response using a parser to detect the end of messagegetResponse(boolean head, long time, TimeUnit unit) Wait for a response using a parser to detect the end of messageRemaining output ByteBuffer after calls togetResponse()orwaitForResponse(boolean, long, TimeUnit)voidCallback method invoked when thisEndPointis closed.waitForResponse(boolean head, long time, TimeUnit unit) Wait for a response using a parser to detect the end of messagewaitForResponse(boolean head, long time, TimeUnit unit, Consumer<Integer> statusConsumer) Wait for a response using a parser to detect the end of messagevoidvoidwaitUntilClosedOrIdleFor(long idleFor, TimeUnit units) Methods inherited from class ByteArrayEndPoint
addInput, addInput, addInput, addInputAndExecute, addInputAndExecute, addInputEOF, doClose, fill, flush, getLocalSocketAddress, getOutput, getOutputString, getOutputString, getRemoteSocketAddress, getTransport, hasMore, isGrowOutput, needsFillInterest, onIncompleteFlush, reset, setGrowOutput, setOutput, takeOutput, takeOutputString, takeOutputString, toString, waitForOutputMethods inherited from class AbstractEndPoint
close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, isInputShutdown, isOpen, isOutputShutdown, onClose, onIdleExpired, onOpen, setConnection, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, writeMethods inherited from class IdleTimeout
checkIdleTimeout, getIdleFor, getIdleTimeout, getScheduler, notIdle, setIdleTimeoutMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EndPoint
getIdleTimeout, getSslSessionData, isSecure, receive, send, setIdleTimeout, write
-
Constructor Details
-
LocalEndPoint
public LocalEndPoint()
-
-
Method Details
-
execute
- Overrides:
executein classByteArrayEndPoint
-
onClose
-
doShutdownOutput
public void doShutdownOutput()- Overrides:
doShutdownOutputin classByteArrayEndPoint
-
waitUntilClosed
public void waitUntilClosed() -
waitUntilClosedOrIdleFor
-
getResponseData
Remaining output ByteBuffer after calls togetResponse()orwaitForResponse(boolean, long, TimeUnit)- Returns:
- the remaining response data buffer
-
getResponse
-
getResponse
Wait for a response using a parser to detect the end of message- Parameters:
head- whether the request is a HEAD requesttime- the maximum time to waitunit- the time unit of thetimeoutargument- Returns:
- Buffer containing full response or null for EOF;
- Throws:
Exception- if the response cannot be parsed
-
waitForResponse
Wait for a response using a parser to detect the end of message- Parameters:
head- whether the request is a HEAD requesttime- the maximum time to waitunit- the time unit of thetimeoutargument- Returns:
- Buffer containing full response or null for EOF;
- Throws:
Exception- if the response cannot be parsed
-
waitForResponse
public ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit, Consumer<Integer> statusConsumer) throws Exception Wait for a response using a parser to detect the end of message- Parameters:
head- whether the request is a HEAD requesttime- the maximum time to waitunit- the time unit of thetimeoutargumentstatusConsumer- a consumer to be called with the response's status code- Returns:
- Buffer containing full response or null for EOF;
- Throws:
Exception- if the response cannot be parsed
-