Home / Function/ shutdownInput() — netty Function Reference

shutdownInput() — netty Function Reference

Architecture documentation for the shutdownInput() function in AbstractKQueueChannel.java from the netty codebase.

Function java Buffer Search calls 6 called by 1

Entity Profile

Dependency Diagram

graph TD
  def1f904_d411_f912_d2ef_f5e394e5558d["shutdownInput()"]
  db95214c_090e_b762_6cfd_37721de6cf7b["AbstractKQueueUnsafe"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|defined in| db95214c_090e_b762_6cfd_37721de6cf7b
  2f67cad3_9f57_8aaa_bf51_d7df80344b13["readEOF()"]
  2f67cad3_9f57_8aaa_bf51_d7df80344b13 -->|calls| def1f904_d411_f912_d2ef_f5e394e5558d
  97feab9f_5cb3_069e_ea7d_d44ef47a0e25["finishConnect()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| 97feab9f_5cb3_069e_ea7d_d44ef47a0e25
  6cfc6ba6_4961_3030_0b05_046c480b76d2["close()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| 6cfc6ba6_4961_3030_0b05_046c480b76d2
  11cc8268_bfad_6df4_c15a_bc6827603433["isAllowHalfClosure()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| 11cc8268_bfad_6df4_c15a_bc6827603433
  256a1046_13b6_8eea_59fa_6b3ba7f630aa["fireEventAndClose()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| 256a1046_13b6_8eea_59fa_6b3ba7f630aa
  e583e7ca_d04e_87b8_fffb_47048fc27d3c["shouldStopReading()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| e583e7ca_d04e_87b8_fffb_47048fc27d3c
  e425e90c_5fae_6366_33cb_5a4c102b5399["clearReadFilter0()"]
  def1f904_d411_f912_d2ef_f5e394e5558d -->|calls| e425e90c_5fae_6366_33cb_5a4c102b5399
  style def1f904_d411_f912_d2ef_f5e394e5558d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java lines 461–496

        void shutdownInput(boolean readEOF) {
            // We need to take special care of calling finishConnect() if readEOF is true and we not
            // fulfilled the connectPromise yet. If we fail to do so the connectPromise will be failed
            // with a ClosedChannelException as a close() will happen and so the FD is closed before we
            // have a chance to call finishConnect() later on. Calling finishConnect() here will ensure
            // we observe the correct exception in case of a connect failure.
            if (readEOF && connectPromise != null) {
                finishConnect();
            }
            if (!socket.isInputShutdown()) {
                if (isAllowHalfClosure(config())) {
                    try {
                        socket.shutdown(true, false);
                    } catch (IOException ignored) {
                        // We attempted to shutdown and failed, which means the input has already effectively been
                        // shutdown.
                        fireEventAndClose(ChannelInputShutdownEvent.INSTANCE);
                        return;
                    } catch (NotYetConnectedException ignore) {
                        // We attempted to shutdown and failed, which means the input has already effectively been
                        // shutdown.
                    }
                    if (shouldStopReading(config())) {
                        clearReadFilter0();
                    }
                    pipeline().fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
                } else {
                    close(voidPromise());
                    return;
                }
            }
            if (!readEOF && !inputClosedSeenErrorOnRead) {
                inputClosedSeenErrorOnRead = true;
                pipeline().fireUserEventTriggered(ChannelInputShutdownReadComplete.INSTANCE);
            }
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does shutdownInput() do?
shutdownInput() is a function in the netty codebase, defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java.
Where is shutdownInput() defined?
shutdownInput() is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java at line 461.
What does shutdownInput() call?
shutdownInput() calls 6 function(s): clearReadFilter0, close, finishConnect, fireEventAndClose, isAllowHalfClosure, shouldStopReading.
What calls shutdownInput()?
shutdownInput() is called by 1 function(s): readEOF.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free