Ejemplo n.º 1
0
 public SessionRefreshThread(SessionHelper session, Glacier2.RouterPrx router, int period)
 {
     _session = session;
     _router = router;
     _period = period;
     _done = false;
 }
Ejemplo n.º 2
0
 connectFailed(Glacier2.SessionHelper session, System.Exception exception)
 {
     try
     {
         throw exception;
     }
     catch(Glacier2.PermissionDeniedException)
     {
         Console.Out.WriteLine("ok");
         lock(me)
         {
             wakeUp();
         }
     }
     catch(System.Exception)
     {
         test(false);
     }
 }
Ejemplo n.º 3
0
 public void disconnected(Glacier2.SessionHelper session)
 {
     test(false);
 }
Ejemplo n.º 4
0
 public void connectFailed(Glacier2.SessionHelper session, System.Exception ex)
 {
     Console.Out.WriteLine(ex.ToString());
     test(false);
 }
Ejemplo n.º 5
0
 public void disconnected(Glacier2.SessionHelper session)
 {
     Console.Out.WriteLine("ok");
     me.lck.Lock();
     try
     {
         wakeUp();
     }
     finally
     {
         me.lck.Unlock();
     }
 }
Ejemplo n.º 6
0
 public SessionRefreshTask(Application app, Glacier2.RouterPrx router)
 {
     _app = app;
     _router = router;
 }
Ejemplo n.º 7
0
 disconnected(Glacier2.SessionHelper session)
 {
     Console.Out.WriteLine("ok");
     lock(me)
     {
         wakeUp();
     }
 }
Ejemplo n.º 8
0
        public void connectFailed(Glacier2.SessionHelper session, Exception exception)
        {
            //
            // Ignore callbacks during shutdown.
            //
            if(_exit)
            {
                return;
            }

            try
            {
                throw exception;
            }
            catch(Glacier2.CannotCreateSessionException ex)
            {
                setError("Login failed (Glacier2.CannotCreateSessionException):\n" + ex.reason);
            }
            catch(Glacier2.PermissionDeniedException ex)
            {
                setError("Login failed (Glacier2.PermissionDeniedException):\n" + ex.reason);
            }
            catch(Ice.Exception ex)
            {
                setError("Login failed (" + ex.ice_id() + ").\n" +
                         "Please check your configuration.");
            }
            catch(System.Exception ex)
            {
                setError("Login failed:\n" + ex.ToString());
            }
        }
Ejemplo n.º 9
0
 connectFailed(Glacier2.SessionHelper session, System.Exception exception)
 {
     try
     {
         throw exception;
     }
     catch(Ice.CommunicatorDestroyedException)
     {
         Console.Out.WriteLine("ok");
         lock(me)
         {
             wakeUp();
         }
     }
     catch(System.Exception)
     {
         test(false);
     }
 }
Ejemplo n.º 10
0
 public SessionRefreshTask(SessionHelper session, Glacier2.RouterPrx router)
 {
     _session = session;
     _router = router;
 }
Ejemplo n.º 11
0
        public void disconnected(Glacier2.SessionHelper session)
        {
            //
            // Ignore callbacks during shutdown.
            //
            if(_exit)
            {
                return;
            }

            _username = "";
            if(_model.State == ClientState.Disconnecting) // Connection closed by user logout/exit
            {
                setState(ClientState.Disconnected);
            }
            else if(_model.State == ClientState.Connected) // Connection lost while user was chatting
            {
                setError(
                    "<system-message> - The connection with the server was unexpectedly lost.\n" +
                    "You can try Login again from the File menu.");
            }
            else // Connection lost while user was connecting
            {
                setError(
                    "<system-message> - The connection with the server was unexpectedly lost.\n" +
                    "Try again.");
            }
        }
Ejemplo n.º 12
0
 public void createdCommunicator(Glacier2.SessionHelper session)
 {
 }
Ejemplo n.º 13
0
        public async void connected(Glacier2.SessionHelper session)
        {

            //
            // Ignore callbacks during shutdown.
            //
            if(_exit)
            {
                return;
            }

            //
            // If the session has been reassigned avoid the spurious callback.
            //
            if(session != _session)
            {
                return;
            }

            Chat.ChatRoomCallbackPrx callback = Chat.ChatRoomCallbackPrxHelper.uncheckedCast(
                                _session.addWithUUID(new ChatRoomCallbackI(this)));

            _chat = Chat.ChatSessionPrxHelper.uncheckedCast(_session.session());
            try
            {
                await _chat.setCallbackAsync(callback);
                _username = ChatUtils.formatUsername(_info.Username);
                _info.save();
                setState(ClientState.Connected);
            }
            catch(Ice.CommunicatorDestroyedException)
            {
                //Ignore client session was destroyed.
            }
            catch(Exception)
            {
                destroySession();
            }
        }
Ejemplo n.º 14
0
 public void connectFailed(Glacier2.SessionHelper session, System.Exception exception)
 {
     try
     {
         throw exception;
     }
     catch(Ice.ConnectionRefusedException)
     {
         Console.Out.WriteLine("ok");
         me.lck.Lock();
         try
         {
             wakeUp();
         }
         finally
         {
             me.lck.Unlock();
         }
     }
     catch(System.Exception)
     {
         test(false);
     }
 }
Ejemplo n.º 15
0
 connected(Glacier2.SessionHelper session)
 {
      test(false);
 }
Ejemplo n.º 16
0
 public void createdCommunicator(Glacier2.SessionHelper session)
 {
     test(session.communicator() != null);
 }
Ejemplo n.º 17
0
 public SessionPingThread(Application app, Glacier2.RouterPrx router, long period)
 {
     _app = app;
     _router = router;
     _period = period;
     _done = false;
 }