Package org.eclipse.jetty.server
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,org.eclipse.jetty.io.EndPoint
- Enclosing class:
- LocalConnector
public class LocalConnector.LocalEndPoint extends org.eclipse.jetty.io.ByteArrayEndPointLocal EndPoint
-
-
Constructor Summary
Constructors Constructor Description LocalEndPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoShutdownOutput()protected voidexecute(Runnable task)StringgetResponse()Wait for a response using a parser to detect the end of messageStringgetResponse(boolean head, long time, TimeUnit unit)Wait for a response using a parser to detect the end of messageByteBuffergetResponseData()Remaining output ByteBuffer after calls togetResponse()orwaitForResponse(boolean, long, TimeUnit)voidonClose()ByteBufferwaitForResponse(boolean head, long time, TimeUnit unit)Wait for a response using a parser to detect the end of messagevoidwaitUntilClosed()voidwaitUntilClosedOrIdleFor(long idleFor, TimeUnit units)-
Methods inherited from class org.eclipse.jetty.io.ByteArrayEndPoint
addInput, addInput, addInput, addInputAndExecute, addInputEOF, doClose, fill, flush, getLocalAddress, getOutput, getOutputString, getOutputString, getRemoteAddress, getTransport, hasMore, isGrowOutput, needsFillInterest, onIncompleteFlush, reset, setGrowOutput, setOutput, takeOutput, takeOutputString, takeOutputString, toString, waitForOutput
-
Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
checkFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getWriteFlusher, isFillInterested, isInputShutdown, isOpen, isOptimizedForDirectBuffers, isOutputShutdown, onClose, onIdleExpired, onOpen, setConnection, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, write
-
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeout
-
-
-
-
Method Detail
-
execute
protected void execute(Runnable task)
- Overrides:
executein classorg.eclipse.jetty.io.ByteArrayEndPoint
-
onClose
public void onClose()
- Specified by:
onClosein interfaceorg.eclipse.jetty.io.EndPoint- Overrides:
onClosein classorg.eclipse.jetty.io.AbstractEndPoint
-
doShutdownOutput
public void doShutdownOutput()
- Overrides:
doShutdownOutputin classorg.eclipse.jetty.io.ByteArrayEndPoint
-
waitUntilClosed
public void waitUntilClosed()
-
waitUntilClosedOrIdleFor
public void waitUntilClosedOrIdleFor(long idleFor, TimeUnit units)
-
getResponseData
public ByteBuffer getResponseData()
Remaining output ByteBuffer after calls togetResponse()orwaitForResponse(boolean, long, TimeUnit)- Returns:
- the remaining response data buffer
-
getResponse
public String getResponse() throws Exception
Wait for a response using a parser to detect the end of message- Returns:
- Buffer containing full response or null for EOF;
- Throws:
Exception- if the response cannot be parsed
-
getResponse
public String getResponse(boolean head, long time, TimeUnit unit) 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 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) 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 thetimeoutargument- Returns:
- Buffer containing full response or null for EOF;
- Throws:
Exception- if the response cannot be parsed
-
-