public interface IFilter
The advantage of pluggable Filters is that they don't get in the way of your Extension code, their execution order can be altered and they can even stop the execution flow if necessary. An example of this could be a custom ban filter where User credentials are checked against a black list before the request is passed to your Login Handler. Another example of usage would be logging or filtering public and private messages.
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This is invoked when the Extension is destroyed
|
FilterAction |
handleClientRequest(java.lang.String requestId,
User sender,
ISFSObject params)
Handles a client request
|
FilterAction |
handleServerEvent(ISFSEvent event)
Handles a server side event
|
void |
init(SFSExtension ext)
Initialize the Filter
|
void init(SFSExtension ext)
ext
- a reference to the related Extensionvoid destroy()
FilterAction handleClientRequest(java.lang.String requestId, User sender, ISFSObject params) throws SFSException
requestId
- the request idsender
- the sender of the requestparams
- the parameters of the requestSFSException
FilterAction
FilterAction handleServerEvent(ISFSEvent event) throws SFSException
event
- the eventSFSException