Beispiel #1
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);
        }