private void fireDMConListener(TypeEvent typeEvent, Exception e) {
        java.util.List list;
        synchronized (this) {
            if (eventListeners == null) {
                return;
            }
            list = (java.util.List) eventListeners.clone();
        }
        int size = list.size();
        for (int i = 0; i < size; i++) {
            switch (typeEvent) {
                case AfterConnect:
                    ((DMConListener) list.get(i)).AfterConnect(this);
                    break;
                case BeforeConnect:
                    ((DMConListener) list.get(i)).BeforeConnect(this);
                    break;
                case AfterDisconnect:
                    ((DMConListener) list.get(i)).AfterDisconnect(this);
                    break;
                case BeforeDisconnect:
                    ((DMConListener) list.get(i)).BeforeDisconnect(this);
                    break;
                case Failover:
                    ((DMConListener) list.get(i)).Failover(this, e);
                    break;
            }
        }
    }