/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rebelmonkey.monkeywrench.mweb.api;

/**
 * This interface defines a filter that can be instered into the MWEB to
 * modify or react to data as it passes through the system.
 * Filtering occurs at the point in which data is received from the client.
 * For this reason, ina clustered environment, it is important that every
 * cluster node install the same set of filters or data will get filtered
 * differently depending on which client originated it.
 *
 * Multiple filters may be added to a single channel, in which case they chain
 * in the order in which they were added.
 *
 * Data sent from,
 * @author jeffpk
 */
public interface MWEBDataFilter {
    /**
     * This interface defines a filter on an MWEB channel.  The filter gets
     * passed the data to be sent  on the channel and it can either return the
     * sane data or a modified version.  What is returned gets passed on to the
     * next filter in the chain.
     *
     * @param jsonObject
     * @return
     */
    String filter(String jsonObject);
}
