[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Pinging the server using Applets



Eduardo Catarino wrote:

Hi,

When using an Applet how can I check if an established connection went down? (for example if the server is disconnected or if for some reason the communication channel is interrupted) I’m trying to write a ping function to detect this case every 5sec and I used the isConnected() method, however in the situation that the server was up and suddenly was force to go down this function doesn’t detect this situation. Does anyone know how to overcome this problem?

Best regards,

Eduardo Catarino

I have added such a ping method, please checkout from svn,
you'll find an example in

xmlBlaster/demo/http/applet/HelloWorld3.java

rgds

Marcel

PS:

/**
* Returns "/qos/state/ at info"="OK" if communication from servlet to xmlBlaster is OK
* <br />
* Returns "/qos/state/ at info"="POLLING" if communication from servlet to xmlBlaster is down but polling
* <br />
* Returns "/qos/state/ at info"="DEAD" if communication from servlet to xmlBlaster is permanently lost
* at return never null, contains QoS in XJPath format
*/
public Hashtable ping(java.lang.String qos) throws Exception;