public class BaseFilter extends java.lang.Object implements Filter
Filter processing methods.Filter| Constructor and Description |
|---|
BaseFilter() |
| Modifier and Type | Method and Description |
|---|---|
FilterChainContext |
createContext(Connection connection,
FilterChainContext.Operation operation) |
void |
exceptionOccurred(FilterChainContext ctx,
java.lang.Throwable error)
Notification about exception, occurred on the
FilterChain |
NextAction |
handleAccept(FilterChainContext ctx)
Execute a unit of processing work to be performed, when server channel
has accepted the client connection.
|
NextAction |
handleClose(FilterChainContext ctx)
Execute a unit of processing work to be performed, when connection
has been closed.
|
NextAction |
handleConnect(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel gets
connected.
|
NextAction |
handleEvent(FilterChainContext ctx,
FilterChainEvent event)
Handle custom event associated with the
Connection. |
NextAction |
handleRead(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel will
become available for reading.
|
NextAction |
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should
be written on channel.
|
void |
onAdded(FilterChain filterChain)
Method is called, when the Filter has been added to the
passed
FilterChain. |
void |
onFilterChainChanged(FilterChain filterChain)
Method is called, when the
FilterChain this Filter is part of,
has been changed. |
void |
onRemoved(FilterChain filterChain)
Method is called, when the Filter has been removed from the
passed
FilterChain. |
public void onAdded(FilterChain filterChain)
FilterChain.onAdded in interface FilterfilterChain - the FilterChain this Filter was added to.public void onFilterChainChanged(FilterChain filterChain)
FilterChain this Filter is part of,
has been changed.onFilterChainChanged in interface FilterfilterChain - the FilterChain.public void onRemoved(FilterChain filterChain)
FilterChain.onRemoved in interface FilterfilterChain - the FilterChain this Filter was removed from.public NextAction handleRead(FilterChainContext ctx) throws java.io.IOException
Filter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.handleRead in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic NextAction handleWrite(FilterChainContext ctx) throws java.io.IOException
Filter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.handleWrite in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic NextAction handleConnect(FilterChainContext ctx) throws java.io.IOException
Filter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.handleConnect in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic NextAction handleAccept(FilterChainContext ctx) throws java.io.IOException
Filter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.handleAccept in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic NextAction handleEvent(FilterChainContext ctx, FilterChainEvent event) throws java.io.IOException
Connection.
This Filter may either complete the required processing and
return StopAction, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning InvokeAction.handleEvent in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic NextAction handleClose(FilterChainContext ctx) throws java.io.IOException
Filter may either complete the required processing and
return false, or delegate remaining processing to the next
Filter in a FilterChain containing this Filter
by returning true.handleClose in interface Filterctx - FilterChainContextNextAction instruction for FilterChain, how it
should continue the executionjava.io.IOExceptionpublic void exceptionOccurred(FilterChainContext ctx, java.lang.Throwable error)
FilterChainexceptionOccurred in interface Filterctx - event processing FilterChainContexterror - error, which occurred during FilterChain executionpublic FilterChainContext createContext(Connection connection, FilterChainContext.Operation operation)
Copyright © 2013 Oracle Corporation. All Rights Reserved.