1 /*------------------------------------------------------------------------------
 2 Name:      I_ConnectionHandler.java
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 ------------------------------------------------------------------------------*/
 6 package org.xmlBlaster.client;
 7 
 8 import org.xmlBlaster.util.Global;
 9 import org.xmlBlaster.util.XmlBlasterException;
10 import org.xmlBlaster.util.queue.I_Queue;
11 import org.xmlBlaster.util.dispatch.ConnectionStateEnum;
12 import org.xmlBlaster.client.qos.ConnectQos;
13 import org.xmlBlaster.client.qos.ConnectReturnQos;
14 
15 
16 /**
17  * Access the connection handler to access connection status information or manipulate queued messages. 
18  * <p>
19  * @author xmlBlaster@marcelruff.info
20  */
21 public interface I_ConnectionHandler
22 {
23    /**
24     * @return The queue used to store tailback messages. 
25     */
26    I_Queue getQueue();
27 
28    /**
29     * Get the connection state, usable for nice logging like this:<br />
30     * con.getState().toString()
31     * @return "UNDEF", "ALIVE", "POLLING", "DEAD"
32     */
33    ConnectionStateEnum getState();
34 
35    /**
36     * @return true if the connection to xmlBlaster is operational
37     */
38    boolean isAlive();
39 
40    /**
41     * @return true if we are polling for the server
42     */
43    boolean isPolling();
44 
45    /**
46     * @return true if we have definitely lost the connection to xmlBlaster and gave up
47     */
48    boolean isDead();
49 }


syntax highlighted by Code2HTML, v. 0.9.1