public class JSONDataFilter extends Object implements DataFilter
JSONDataFilter walks an object to see if it is a JSON data structure
and calls the appropriate protected method filterString(String),
filterNumber(Number), filterBoolean(Boolean),
filterArray(ServerSession, ServerChannel, Object) or
filterMap(ServerSession, ServerChannel, Map).
Derived filters may override one or more of these methods to provide filtering of specific types.
DataFilter.Abort| Constructor and Description |
|---|
JSONDataFilter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
filter(ServerSession from,
ServerChannel to,
Object data) |
protected Object |
filterArray(ServerSession from,
ServerChannel to,
Object array) |
protected Object |
filterBoolean(Boolean bool) |
protected Object |
filterMap(ServerSession from,
ServerChannel to,
Map map) |
protected Object |
filterNumber(Number number) |
protected Object |
filterObject(ServerSession from,
ServerChannel to,
Object obj) |
protected Object |
filterString(String string) |
void |
init(Object init) |
public void init(Object init)
public Object filter(ServerSession from, ServerChannel to, Object data)
filter in interface DataFilterfrom - the Client that sends the datato - the channel the data is being sent todata - the data being sentprotected Object filterArray(ServerSession from, ServerChannel to, Object array)
protected Object filterMap(ServerSession from, ServerChannel to, Map map)
protected Object filterObject(ServerSession from, ServerChannel to, Object obj)
Copyright © 2008-2013 Dojo Foundation. All Rights Reserved.