Home / Function/ invokeLater() — netty Function Reference

invokeLater() — netty Function Reference

Architecture documentation for the invokeLater() function in AbstractHttp2StreamChannel.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  b44453f3_32d7_e262_679e_0dfc1635685a["invokeLater()"]
  2656dcfe_5cdb_7c7d_bc25_312393fe2e05["Http2ChannelUnsafe"]
  b44453f3_32d7_e262_679e_0dfc1635685a -->|defined in| 2656dcfe_5cdb_7c7d_bc25_312393fe2e05
  392e63a7_22b4_b12e_e643_274bcc99a5bf["fireChannelInactiveAndDeregister()"]
  392e63a7_22b4_b12e_e643_274bcc99a5bf -->|calls| b44453f3_32d7_e262_679e_0dfc1635685a
  215b8316_feb5_500b_88f8_49eff0eac336["close()"]
  b44453f3_32d7_e262_679e_0dfc1635685a -->|calls| 215b8316_feb5_500b_88f8_49eff0eac336
  style b44453f3_32d7_e262_679e_0dfc1635685a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java lines 821–838

        private void invokeLater(Channel channel, Runnable task) {
            try {
                // This method is used by outbound operation implementations to trigger an inbound event later.
                // They do not trigger an inbound event immediately because an outbound operation might have been
                // triggered by another inbound event handler method.  If fired immediately, the call stack
                // will look like this for example:
                //
                //   handlerA.inboundBufferUpdated() - (1) an inbound handler method closes a connection.
                //   -> handlerA.ctx.close()
                //     -> channel.unsafe.close()
                //       -> handlerA.channelInactive() - (2) another inbound handler method called while in (1) yet
                //
                // which means the execution of two inbound handler methods of the same handler overlap undesirably.
                eventLoop().execute(task);
            } catch (RejectedExecutionException e) {
                logger.warn("{} Can't invoke task later as EventLoop rejected it", channel, e);
            }
        }

Domain

Subdomains

Calls

Frequently Asked Questions

What does invokeLater() do?
invokeLater() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java.
Where is invokeLater() defined?
invokeLater() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java at line 821.
What does invokeLater() call?
invokeLater() calls 1 function(s): close.
What calls invokeLater()?
invokeLater() is called by 1 function(s): fireChannelInactiveAndDeregister.

Analyze Your Own Codebase

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

Try Supermodel Free