Connection activity and closing Connection once it becomes
idle for certain amount of time. Unlike ActivityCheckFilter, this Filter assumes Connection is idle,
when no event is being executed on it. But if some event processing was suspended - this Filter still assumes
Connection is active.
ActivityCheckFilter
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| public static interface | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private final FilterChainContext. | |
| public static final Long | |
| public static final Long | |
| private static final Attribute | |
| public static final String | |
| private final DelayedExecutor. | |
| private final DelayedExecutor. | |
| private final IdleTimeoutFilter. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | IdleTimeoutFilter(final DelayedExecutor executor, final IdleTimeoutFilter.
|
| public | IdleTimeoutFilter(final DelayedExecutor executor, final long timeout, final TimeUnit timeUnit, final IdleTimeoutFilter.
|
| public | IdleTimeoutFilter(final DelayedExecutor executor, final IdleTimeoutFilter.
|
| protected | IdleTimeoutFilter(final DelayedExecutor executor, final DelayedExecutor.
|
| Modifier and Type | Method and Description |
|---|---|
| private static long | |
| public static DelayedExecutor | |
| public static DelayedExecutor | |
| public DelayedExecutor. | |
| public NextAction | handleAccept(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when server channel has accepted the client connection. |
| public NextAction | handleClose(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when connection has been closed. |
| public NextAction | handleConnect(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when channel gets connected. |
| public NextAction | handleRead(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when channel will become available for reading. |
| public NextAction | handleWrite(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when some data should be written on channel. |
| protected void | |
| public static void | setCustomTimeout(final Connection<L>
The connection, final long Connection which is having the idle detection adjusted.the new idle timeout. timeout, final TimeUnit timeunit)Provides an override mechanism for the default timeout. |
| contextCompletionListener | back to summary |
|---|---|
| private final FilterChainContext. | |
| FOREVER | back to summary |
|---|---|
| public static final Long FOREVER | |
| FOREVER_SPECIAL | back to summary |
|---|---|
| public static final Long FOREVER_SPECIAL | |
| IDLE_ATTR | back to summary |
|---|---|
| private static final Attribute<IdleTimeoutFilter. | |
| IDLE_ATTRIBUTE_NAME | back to summary |
|---|---|
| public static final String IDLE_ATTRIBUTE_NAME | |
| queue | back to summary |
|---|---|
| private final DelayedExecutor. | |
| resolver | back to summary |
|---|---|
| private final DelayedExecutor. | |
| timeoutResolver | back to summary |
|---|---|
| private final IdleTimeoutFilter. | |
| IdleTimeoutFilter | back to summary |
|---|---|
| public IdleTimeoutFilter(final DelayedExecutor executor, final long timeout, final TimeUnit timeoutUnit) | |
| IdleTimeoutFilter | back to summary |
|---|---|
public IdleTimeoutFilter(final DelayedExecutor executor, final IdleTimeoutFilter.
| |
| IdleTimeoutFilter | back to summary |
|---|---|
| public IdleTimeoutFilter(final DelayedExecutor executor, final long timeout, final TimeUnit timeUnit, final IdleTimeoutFilter. | |
| IdleTimeoutFilter | back to summary |
|---|---|
| public IdleTimeoutFilter(final DelayedExecutor executor, final IdleTimeoutFilter. | |
| IdleTimeoutFilter | back to summary |
|---|---|
| protected IdleTimeoutFilter(final DelayedExecutor executor, final DelayedExecutor. | |
| convertToMillis | back to summary |
|---|---|
| private static long convertToMillis(final long time, final TimeUnit timeUnit) | |
| createDefaultIdleDelayedExecutor | back to summary |
|---|---|
public static DelayedExecutor createDefaultIdleDelayedExecutor()
| |
| createDefaultIdleDelayedExecutor | back to summary |
|---|---|
public static DelayedExecutor createDefaultIdleDelayedExecutor(final long checkInterval, final TimeUnit checkIntervalUnit)
| |
| getResolver | back to summary |
|---|---|
public DelayedExecutor.
| |
| handleAccept | back to summary |
|---|---|
| public NextAction handleAccept(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when server channel has accepted the client connection. This
| |
| handleClose | back to summary |
|---|---|
| public NextAction handleClose(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when connection has been closed. This
| |
| handleConnect | back to summary |
|---|---|
| public NextAction handleConnect(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when channel gets connected. This
| |
| handleRead | back to summary |
|---|---|
| public NextAction handleRead(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when channel will become available for reading. This
| |
| handleWrite | back to summary |
|---|---|
| public NextAction handleWrite(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when some data should be written on channel. This
| |
| queueAction | back to summary |
|---|---|
| protected void queueAction(final FilterChainContext ctx) | |
| setCustomTimeout | back to summary |
|---|---|
| public static void setCustomTimeout(final Connection<L> connection, final long timeout, final TimeUnit timeunit) Provides an override mechanism for the default timeout.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onComplete(final FilterChainContext ctx)
Implements org. The method is called, when passed |
| ContextCompletionListener | back to summary |
|---|---|
| private ContextCompletionListener() | |
| onComplete | back to summary |
|---|---|
| public void onComplete(final FilterChainContext ctx) Implements org. Doc from org. The method is called, when passed
| |
| Modifier and Type | Field and Description |
|---|---|
| private final IdleTimeoutFilter. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | doWork(final Connection<L> connection)
Implements org. The method is executed by DelayExecutor once element's timeout expires. |
| handler | back to summary |
|---|---|
| private final IdleTimeoutFilter. | |
| DefaultWorker | back to summary |
|---|---|
| pack-priv DefaultWorker(final IdleTimeoutFilter. | |
| doWork | back to summary |
|---|---|
| public boolean doWork(final Connection<L> connection) Implements org. Doc from org. The method is executed by DelayExecutor once element's timeout expires.
| |
| Modifier and Type | Field and Description |
|---|---|
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private long | |
| private boolean | |
| private volatile boolean | |
| private volatile long | |
| private static final AtomicLongFieldUpdater |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private long | |
| private void |
| counter | back to summary |
|---|---|
| private volatile int counter | |
| counterUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<IdleTimeoutFilter. | |
| initialTimeoutMillis | back to summary |
|---|---|
| private long initialTimeoutMillis | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| isInitialSet | back to summary |
|---|---|
| private volatile boolean isInitialSet | |
| timeoutMillis | back to summary |
|---|---|
| private volatile long timeoutMillis | |
| timeoutMillisUpdater | back to summary |
|---|---|
| private static final AtomicLongFieldUpdater<IdleTimeoutFilter. | |
| IdleRecord | back to summary |
|---|---|
| private IdleRecord() | |
| close | back to summary |
|---|---|
| private void close() | |
| getInitialTimeoutMillis | back to summary |
|---|---|
| private long getInitialTimeoutMillis(final long defaultTimeoutMillis) | |
| setInitialTimeoutMillis | back to summary |
|---|---|
| private void setInitialTimeoutMillis(final long initialTimeoutMillis) | |
| Modifier and Type | Field and Description |
|---|---|
| private final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| defaultTimeoutMillis | back to summary |
|---|---|
| private final long defaultTimeoutMillis | |
| IdleTimeoutResolver | back to summary |
|---|---|
| pack-priv IdleTimeoutResolver(final long defaultTimeoutMillis) | |
| getTimeout | back to summary |
|---|---|
| public long getTimeout(final FilterChainContext ctx) Implements org.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long | getTimeoutMillis(final Connection<L> connection)
Implements org.
|
| public boolean | removeTimeout(final Connection<L> connection)
Implements org.
|
| public void | setTimeoutMillis(final Connection<L> connection, final long timeoutMillis)
Implements org.
|
| Resolver | back to summary |
|---|---|
| private Resolver() | |
| getTimeoutMillis | back to summary |
|---|---|
| public long getTimeoutMillis(final Connection<L> connection) Implements org.
| |
| removeTimeout | back to summary |
|---|---|
| public boolean removeTimeout(final Connection<L> connection) Implements org.
| |
| setTimeoutMillis | back to summary |
|---|---|
| public void setTimeoutMillis(final Connection<L> connection, final long timeoutMillis) Implements org.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| onTimeout | back to summary |
|---|---|
| public void onTimeout(final Connection<L> c) | |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| getTimeout | back to summary |
|---|---|
| public long getTimeout(FilterChainContext ctx) | |