// Path: redux-core/src/main/java/me/tatarka/redux/Store.java
// public interface Store<S> {
// 
//     /**
//      * Returns the current state of the store.
//      */
//     S getState();
// 
//     /**
//      * Sets the state of the store. Warning! You should not call this in normal application code,
//      * instead preferring to update it through dispatching an action. It is however, useful for
//      * tests.
//      */
//     void setState(S state);
// }
// 
// Path: redux-core/src/main/java/me/tatarka/redux/middleware/Middleware.java
// public interface Middleware<A, R> {
// 
//     /**
//      * Called when an action is dispatched.
//      *
//      * @param next   Dispatch to the next middleware or actually update the state if there is none.
//      *               You can chose to call this anywhere to see the state before and after it has
//      *               changed or not at all to drop the action.
//      * @param action This action that was dispatched.
//      */
//     R dispatch(Next<A, R> next, A action);
// 
//     interface Next<A, R> {
//         R next(A action);
//     }
// }


import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.LinkedBlockingQueue;
import io.github.sac.BasicListener;
import io.github.sac.Socket;
import me.tatarka.redux.Store;
import me.tatarka.redux.middleware.Middleware;
        final Class[] basicClasses;

        public Config(String host, int port) {
            this(host, port, true, new Class[0]);
        }

        Config(String host, int port, boolean autoStart, Class[] basicClasses) {
            this.host = host;
            this.port = port;
            this.autoStart = autoStart;
            this.basicClasses = basicClasses;
        }

        public static class Builder {
            private String host = "localhost";
            private int port = 8000;
            private boolean autoStart = true;
            private Class[] basicClasses = new Class[0];

            public Builder host(String host) {
                this.host = host;
                return this;
            }

            public Builder port(int port) {
                this.port = port;
                return this;
            }

            public Builder basicClasses(Class... classes) {
// Path: redux-core/src/main/java/me/tatarka/redux/Store.java
// public interface Store<S> {
// 
//     /**
//      * Returns the current state of the store.
//      */
//     S getState();
// 
//     /**
//      * Sets the state of the store. Warning! You should not call this in normal application code,
//      * instead preferring to update it through dispatching an action. It is however, useful for
//      * tests.
//      */
//     void setState(S state);
// }
// 
// Path: redux-core/src/main/java/me/tatarka/redux/middleware/Middleware.java
// public interface Middleware<A, R> {
// 
//     /**
//      * Called when an action is dispatched.
//      *
//      * @param next   Dispatch to the next middleware or actually update the state if there is none.
//      *               You can chose to call this anywhere to see the state before and after it has
//      *               changed or not at all to drop the action.
//      * @param action This action that was dispatched.
//      */
//     R dispatch(Next<A, R> next, A action);
// 
//     interface Next<A, R> {
//         R next(A action);
//     }
// }


// Path: redux-monitor/src/main/java/me/tatarka/redux/monitor/MonitorMiddleware.java
import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.LinkedBlockingQueue;
import io.github.sac.BasicListener;
import io.github.sac.Socket;
import me.tatarka.redux.Store;
import me.tatarka.redux.middleware.Middleware;

        final Class[] basicClasses;

        public Config(String host, int port) {
            this(host, port, true, new Class[0]);
        }

        Config(String host, int port, boolean autoStart, Class[] basicClasses) {
            this.host = host;
            this.port = port;
            this.autoStart = autoStart;
            this.basicClasses = basicClasses;
        }

        public static class Builder {
            private String host = "localhost";
            private int port = 8000;
            private boolean autoStart = true;
            private Class[] basicClasses = new Class[0];

            public Builder host(String host) {
                this.host = host;
                return this;
            }

            public Builder port(int port) {
                this.port = port;
                return this;
            }

            public Builder basicClasses(Class... classes) {
                basicClasses = classes;