Partial implementation of EndPoint that uses FillInterest and WriteFlusher.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Connection | |
| private final long | |
| private final FillInterest | |
| private final AtomicReference | |
| private final WriteFlusher | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final void | close()
Overrides default org. Close any backing stream associated with the endpoint |
| public final void | close(Throwable
the reason for the close or null failure)Implements org. Close any backing stream associated with the endpoint, passing a cause |
| protected void | |
| private void | |
| protected void | |
| protected void | |
| public void | fillInterested(Callback
the callback to call when an error occurs or we are readable. The callback may implement the callback)Invocable interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.Implements org. Requests callback methods to be invoked when a call to |
| public Connection | |
| public long | |
| public FillInterest | |
| public InetSocketAddress | |
| public abstract SocketAddress | |
| public InetSocketAddress | |
| public abstract SocketAddress | getRemoteSocketAddress()
Redeclares as abstract: org.
|
| public WriteFlusher | |
| public boolean | |
| public boolean | isInputShutdown()
Implements org. Test if the input is shutdown. |
| public boolean | isOpen()
Implements abstract org. Implements org. This abstract method should be called to check if idle timeouts should still be checked. |
| public boolean | isOutputShutdown()
Implements org. Test if output is shutdown. |
| protected abstract void | |
| public final void | |
| public void | onClose(Throwable
The reason for the close, or null if a normal close. failure)Implements org. Callback method invoked when this |
| protected void | onIdleExpired(TimeoutException
a TimeoutException timeout)Implements abstract org. This abstract method is called when the idle timeout has expired. |
| protected abstract void | |
| public void | onOpen()
Overrides org. Implements org. Callback method invoked when this EndPoint is opened. |
| protected void | |
| public void | setConnection(Connection
the connection)Connection associated with this EndPointImplements org.
|
| protected final void | |
| public final void | |
| public String | |
| public String | |
| public String | |
| public boolean | tryFillInterested(Callback
the callback to call when an error occurs or we are readable. The callback may implement the callback)Invocable interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.Implements org. Requests callback methods to be invoked when a call to |
| public void | upgrade(Connection
the connection to upgrade to newConnection)Implements org. Upgrades this EndPoint from the current connection to the given new connection. |
| public void | write(Callback
the callback to call when an error occurs or the write completed. The callback may implement the callback, ByteBuffer... Invocable interface to
self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.one or more buffers)ByteBuffers that will be flushed.Overrides default org. Writes the given buffers via |
| _connection | back to summary |
|---|---|
| private volatile Connection _connection | |
| _created | back to summary |
|---|---|
| private final long _created | |
| _fillInterest | back to summary |
|---|---|
| private final FillInterest _fillInterest | |
| _state | back to summary |
|---|---|
| private final AtomicReference<AbstractEndPoint. | |
| _writeFlusher | back to summary |
|---|---|
| private final WriteFlusher _writeFlusher | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| AbstractEndPoint | back to summary |
|---|---|
| protected AbstractEndPoint(Scheduler scheduler) | |
| close | back to summary |
|---|---|
| public final void close() Overrides default org. Doc from org. Close any backing stream associated with the endpoint
| |
| close | back to summary |
|---|---|
| public final void close(Throwable failure) Implements org. Doc from org. Close any backing stream associated with the endpoint, passing a cause
| |
| doClose | back to summary |
|---|---|
| protected void doClose() | |
| doOnClose | back to summary |
|---|---|
| private void doOnClose(Throwable failure) | |
| doShutdownInput | back to summary |
|---|---|
| protected void doShutdownInput() | |
| doShutdownOutput | back to summary |
|---|---|
| protected void doShutdownOutput() | |
| fillInterested | back to summary |
|---|---|
| public void fillInterested(Callback callback) Implements org. Doc from org. Requests callback methods to be invoked when a call to | |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() Implements org.
| |
| getCreatedTimeStamp | back to summary |
|---|---|
| public long getCreatedTimeStamp() Implements org.
| |
| getFillInterest | back to summary |
|---|---|
| public FillInterest getFillInterest() | |
| getLocalAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalAddress() Implements org.
| |
| getLocalSocketAddress | back to summary |
|---|---|
| public abstract SocketAddress getLocalSocketAddress() Redeclares as abstract: org.
| |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() Implements org.
| |
| getRemoteSocketAddress | back to summary |
|---|---|
| public abstract SocketAddress getRemoteSocketAddress() Redeclares as abstract: org.
| |
| getWriteFlusher | back to summary |
|---|---|
| public WriteFlusher getWriteFlusher() | |
| isFillInterested | back to summary |
|---|---|
| public boolean isFillInterested() Implements org.
| |
| isInputShutdown | back to summary |
|---|---|
| public boolean isInputShutdown() Implements org. Doc from org. Test if the input is shutdown.
The input is shutdown if an EOF has been read while doing
a
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements abstract org. Implements org. Doc from org. This abstract method should be called to check if idle timeouts should still be checked.
| |
| isOutputShutdown | back to summary |
|---|---|
| public boolean isOutputShutdown() Implements org. Doc from org. Test if output is shutdown.
The output is shutdown by a call to
| |
| needsFillInterest | back to summary |
|---|---|
| protected abstract void needsFillInterest() throws IOException | |
| onClose | back to summary |
|---|---|
| public final void onClose() Overrides org.
| |
| onClose | back to summary |
|---|---|
| public void onClose(Throwable failure) Implements org. Doc from org. Callback method invoked when this | |
| onIdleExpired | back to summary |
|---|---|
| protected void onIdleExpired(TimeoutException timeout) Implements abstract org. Doc from org. This abstract method is called when the idle timeout has expired.
| |
| onIncompleteFlush | back to summary |
|---|---|
| protected abstract void onIncompleteFlush() | |
| onOpen | back to summary |
|---|---|
| public void onOpen() Overrides org. Implements org. Doc from org. Callback method invoked when this EndPoint is opened.
| |
| reset | back to summary |
|---|---|
| protected void reset() | |
| setConnection | back to summary |
|---|---|
| public void setConnection(Connection connection) Implements org.
| |
| shutdownInput | back to summary |
|---|---|
| protected final void shutdownInput() | |
| shutdownOutput | back to summary |
|---|---|
| public final void shutdownOutput() Implements org. Doc from org. Shutdown the output. 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
| |
| toConnectionString | back to summary |
|---|---|
| public String toConnectionString() | |
| toEndPointString | back to summary |
|---|---|
| public String toEndPointString() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| tryFillInterested | back to summary |
|---|---|
| public boolean tryFillInterested(Callback callback) Implements org. Doc from org. Requests callback methods to be invoked when a call to
| |
| upgrade | back to summary |
|---|---|
| public void upgrade(Connection newConnection) Implements org. Doc from org. Upgrades this EndPoint from the current connection to the given new connection. Closes the current connection, links this EndPoint to the new connection and then opens the new connection. If the current connection is an instance of
| |
| write | back to summary |
|---|---|
| public void write(Callback callback, ByteBuffer... buffers) throws WritePendingException Overrides default org. Doc from org. Writes the given buffers via
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final AbstractEndPoint. | |
| public static final AbstractEndPoint. | |
| public static final AbstractEndPoint. | |
| public static final AbstractEndPoint. | |
| public static final AbstractEndPoint. | |
| public static final AbstractEndPoint. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AbstractEndPoint. | |
| public static AbstractEndPoint. |
| CLOSED | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| ISHUT | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| ISHUTTING | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| OPEN | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| OSHUT | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| OSHUTTING | back to summary |
|---|---|
| public static final AbstractEndPoint. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static AbstractEndPoint. | |
| values | back to summary |
|---|---|
| public static AbstractEndPoint. | |