@@ -0,0 +1,1579 @@
+package neptulon.client;%0A%0Aimport java.util.logging.Logger;%0A%0Aimport neptulon.client.callbacks.ConnCallback;%0A%0A/**%0A * This class extends %7BConnImpl%7D with auto-reconnect functionality.%0A */%0Apublic class ReconnImpl extends ConnImpl %7B%0A    private static final Logger logger = Logger.getLogger(%22Titan: %22 + ReconnImpl.class.getSimpleName());%0A    private boolean firstConnection = true;%0A    private boolean manuallyDisconnected = false;%0A    private boolean retriesExhausted = false;%0A    private final int retryLimit = 5;%0A    private int retryCount = 0;%0A%0A    @Override%0A    public synchronized void connect(final ConnCallback cb) %7B%0A        super.connect(new ConnCallback() %7B%0A            @Override%0A            public void connected() %7B%0A                // only fire connected event once%0A                if (firstConnection) %7B%0A                    cb.connected();%0A                %7D%0A                firstConnection = false;%0A            %7D%0A%0A            @Override%0A            public void disconnected(String reason) %7B%0A                // only fire disconnected event when retries are exhausted or on manual disconnect call%0A                if (manuallyDisconnected %7C%7C retriesExhausted) %7B%0A                    cb.disconnected(reason);%0A                    return;%0A                %7D%0A%0A                // try to reconnect%0A                if (retryCount %3C= retryLimit) %7B%0A                    connect(this);%0A                %7D%0A%0A                retryCount++;%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Override%0A    public synchronized void close() %7B%0A        manuallyDisconnected = true;%0A        super.close();%0A    %7D%0A%7D%0A

add ReconnImpl