How to deal with network problem in an IM application? [message #465597] |
Tue, 03 April 2007 01:45 |
Jian Lee Messages: 21 Registered: July 2009 |
Junior Member |
|
|
Hi, all
I'm in trouble with handling the network broken and re-establish in an
IM application, which is build on RCP.
Our requirements is to follow the way of MSN and Skype, that is to say,
when the network is broken, the main window should be closed, and only
the login dialog will be shown, and if the network connectionn is
established, the application can auto re-login.
We're using SMACK as communication protocol, and in it's version 3.0,
XMPPConnection can do re-login automatically, but the problem is, how to
close the workbench and just show the login dialog to the user?
At first, we tried PlatformUI.getWorkbench().restart(), but after this
method is executed, we'll get new XMPPConnection and ConnectionListener
objects, so they cannot listen to the re-login event and then UI cannot
get notifications.
My question is: Will there be any way that I can restart the application
without release the objects in the memory?
Any suggestions will be highly appreciated.
Thanks a lot!
Chandler.
|
|
|
Re: How to deal with network problem in an IM application? [message #465612 is a reply to message #465597] |
Tue, 03 April 2007 07:56 |
Jian Lee Messages: 21 Registered: July 2009 |
Junior Member |
|
|
or, can we forbid users from controlling UI?
Chandler wrote:
> Hi, all
>
> I'm in trouble with handling the network broken and re-establish in an
> IM application, which is build on RCP.
>
> Our requirements is to follow the way of MSN and Skype, that is to say,
> when the network is broken, the main window should be closed, and only
> the login dialog will be shown, and if the network connectionn is
> established, the application can auto re-login.
>
> We're using SMACK as communication protocol, and in it's version 3.0,
> XMPPConnection can do re-login automatically, but the problem is, how to
> close the workbench and just show the login dialog to the user?
>
> At first, we tried PlatformUI.getWorkbench().restart(), but after this
> method is executed, we'll get new XMPPConnection and ConnectionListener
> objects, so they cannot listen to the re-login event and then UI cannot
> get notifications.
>
> My question is: Will there be any way that I can restart the application
> without release the objects in the memory?
>
> Any suggestions will be highly appreciated.
>
> Thanks a lot!
>
> Chandler
|
|
|
|
Powered by
FUDForum. Page generated in 0.05161 seconds