Exemplo n.º 1
0
        public void callConnectionEvent()
        {
            ErrorEvent evt = new ErrorEvent();

            evt.setServerType("02");   // AEMS Server Code : 02
            evt.setEvtCode(EVENT_TYPE.ON_CONNECTION);
            evt.setCurAemsIP((string)currentServer["IP"]);
            evt.setEvtMsg("AEMS Connection Success!!");
            finesseObj.raiseEvent(evt);
        }
Exemplo n.º 2
0
        public int fnDisconnect()
        {
            logwrite.write("", "");
            logwrite.write("fnConnect", "\t ** call fnDisconnect() ** ");

            ErrorEvent evt = new ErrorEvent();

            evt.setEvtCode(EVENT_TYPE.ON_DISCONNECTION);

            if (FinesseClient != null)
            {
                FinesseClient.disconnect();
                evt.setEvtMsg("Finesse Session Disconnected");
                evt.setCurFinesseIP(FinesseClient.getCurrentServerIP());
                raiseEvent(evt);
            }
            if (AEMSClient != null)
            {
                AEMSClient.disconnect();
                evt.setEvtMsg("AEMS Session Disconnected");
                evt.setCurAemsIP(AEMSClient.getCurrentServerIP());
                raiseEvent(evt);
            }
            if (ISPSClient != null)
            {
                ISPSClient.disconnect();
                evt.setEvtMsg("ISPS Session Disconnected");
                evt.setCurIspsIP(ISPSClient.getCurrentServerIP());
                raiseEvent(evt);
            }

            isFinesseConnected = false;
            isAEMSConnected    = false;
            isISPSConnected    = false;
            logwrite.write("fnDisconnect", "\t Return Data : " + ERRORCODE.SUCCESS);
            return(ERRORCODE.SUCCESS);
        }