public class LocalConnector.LocalEndPoint extends ByteArrayEndPoint
NOIP| Constructor and Description |
|---|
LocalEndPoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any backing stream associated with the endpoint
|
protected void |
execute(Runnable task) |
String |
getResponse()
Wait for a response using a parser to detect the end of message
|
String |
getResponse(boolean head,
long time,
TimeUnit unit)
Wait for a response using a parser to detect the end of message
|
void |
onClose()
Callback method invoked when this
EndPoint is close. |
void |
shutdownOutput()
Shutdown the output.
|
ByteBuffer |
waitForResponse(boolean head,
long time,
TimeUnit unit)
Wait for a response using a parser to detect the end of message
|
void |
waitUntilClosed() |
void |
waitUntilClosedOrIdleFor(long idleFor,
TimeUnit units) |
addInput, addInput, addInput, addInputAndExecute, addInputEOF, fill, flush, getOutput, getOutputString, getOutputString, getTransport, hasMore, isGrowOutput, isInputShutdown, isOpen, isOutputShutdown, needsFillInterest, onIncompleteFlush, reset, setGrowOutput, setOutput, shutdownInput, takeOutput, takeOutputString, takeOutputString, toString, waitForOutputclose, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, isOptimizedForDirectBuffers, onIdleExpired, onOpen, setConnection, tryFillInterested, upgrade, writecheckIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdleTimeout, setIdleTimeoutprotected void execute(Runnable task)
execute in class ByteArrayEndPointpublic void close()
EndPointclose in interface Closeableclose in interface AutoCloseableclose in interface EndPointclose in class ByteArrayEndPointpublic void onClose()
EndPointCallback method invoked when this EndPoint is close.
onClose in interface EndPointonClose in class IdleTimeoutEndPoint.onOpen()public void shutdownOutput()
EndPointThis call indicates that no more data will be sent on this endpoint that that the remote end should read an EOF once all previously sent data has been consumed. Shutdown may be done either at the TCP/IP level, as a protocol exchange (Eg TLS close handshake) or both.
If the endpoint has EndPoint.isInputShutdown() true, then this call has the same effect
as EndPoint.close().
shutdownOutput in interface EndPointshutdownOutput in class ByteArrayEndPointpublic void waitUntilClosed()
public void waitUntilClosedOrIdleFor(long idleFor,
TimeUnit units)
public String getResponse() throws Exception
Exception - if the response cannot be parsedpublic String getResponse(boolean head, long time, TimeUnit unit) throws Exception
head - whether the request is a HEAD requesttime - the maximum time to waitunit - the time unit of the timeout argumentException - if the response cannot be parsedpublic ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit) throws Exception
head - whether the request is a HEAD requesttime - the maximum time to waitunit - the time unit of the timeout argumentException - if the response cannot be parsedCopyright © 1995–2021 Webtide. All rights reserved.