*
* @param filter Instance receives payloads and is able to change it.
*/
public void addWebSocketFilter(WebSocketFilter filter) {
ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
ExtensionFilter extFilter = (ExtensionFilter) extLoader.getExtension(ExtensionFilter.NAME);
if (extFilter != null) {
filter.initView(getView());
extFilter.addFilter(filter);
wsFilterListener.addFilter(filter);
} else {
logger.warn("Filter '" + filter.getClass().toString() + "' couldn't be added as the filter extension is not available!");
}