Package org.mockserver.netty.connection
Class InboundConnectionActivity
java.lang.Object
org.mockserver.netty.connection.InboundConnectionActivity
What an inbound connection is doing, so
InboundConnectionIdleHandler closes only connections
that are genuinely quiet. Present on a channel only while an idle timeout is configured; every
static helper is a no-op on a channel without it.
The exchange count is touched only on the connection's event loop (HttpExchangeTracker
runs there, and so do write-completion listeners), so it needs no synchronisation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisTracked(io.netty.channel.Channel channel) Whether an idle timeout is watching this connection, and so whether its HTTP exchanges need counting.static voidmarkLongLived(io.netty.channel.Channel channel) Exempt a connection from the idle timeout for the rest of its life: it has become a WebSocket, a raw binary relay or the loopback leg of a tunnel, whose silences are legitimate and whose traffic is not HTTP exchanges.
-
Constructor Details
-
InboundConnectionActivity
public InboundConnectionActivity()
-
-
Method Details
-
isTracked
public static boolean isTracked(io.netty.channel.Channel channel) Whether an idle timeout is watching this connection, and so whether its HTTP exchanges need counting. -
markLongLived
public static void markLongLived(io.netty.channel.Channel channel) Exempt a connection from the idle timeout for the rest of its life: it has become a WebSocket, a raw binary relay or the loopback leg of a tunnel, whose silences are legitimate and whose traffic is not HTTP exchanges. The idle handler and exchange tracker are then removed, so its traffic no longer pays for them. The client's leg of a CONNECT/SOCKS tunnel is not exempt.
-