public class SysControllerFilterChain extends java.lang.Object implements ISystemFilterChain
The SystemFilterChain can contain one or several SystemController Filter instances that can be applied before a client request is executed by the SystemController. Filters allow to interact with the request parameters, add extra logic and validation etc...
Here are a few example use cases:
A complete description of the process is found in this tutorial.
SysControllerFilter,
Zone.setFilterChain(com.smartfoxserver.v2.controllers.SystemRequest, ISystemFilterChain)| Constructor and Description |
|---|
SysControllerFilterChain() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(java.lang.String filterName,
SysControllerFilter filter)
Add a filter to the Filter Chain.
|
void |
clearAll()
Remove all current filter
|
void |
remove(java.lang.String filterName)
Remove a Filter from the Filter Chain.
|
FilterAction |
runRequest(User sender,
ISFSObject params) |
int |
size()
Get the size of the Filter Chain.
|
public final void addFilter(java.lang.String filterName,
SysControllerFilter filter)
ISystemFilterChainaddFilter in interface ISystemFilterChainfilterName - the name of the filterfilter - the filter that is going to be addedpublic final void remove(java.lang.String filterName)
ISystemFilterChainremove in interface ISystemFilterChainfilterName - the name of the Filterpublic final void clearAll()
ISystemFilterChainclearAll in interface ISystemFilterChainpublic final int size()
ISystemFilterChainsize in interface ISystemFilterChainpublic FilterAction runRequest(User sender, ISFSObject params)
runRequest in interface ISystemFilterChain