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, waitForOutput
close, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, isOptimizedForDirectBuffers, onIdleExpired, onOpen, setConnection, upgrade, write
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdleTimeout, setIdleTimeout
protected void execute(Runnable task)
execute
in class ByteArrayEndPoint
public void close()
EndPoint
close
in interface Closeable
close
in interface AutoCloseable
close
in interface EndPoint
close
in class ByteArrayEndPoint
public void onClose()
EndPoint
Callback method invoked when this EndPoint
is close.
onClose
in interface EndPoint
onClose
in class IdleTimeout
EndPoint.onOpen()
public void shutdownOutput()
EndPoint
This 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 EndPoint
shutdownOutput
in class ByteArrayEndPoint
public 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-2016 Webtide. All Rights Reserved.