comparison src/org/eclipse/jetty/io/Connection.java @ 972:5ee36654b383

simplify AbstractHttpConnection
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 15 Oct 2016 22:42:05 -0600
parents 866f2e801618
children 4d9fe9cc554d
comparison
equal deleted inserted replaced
971:f997df37cec1 972:5ee36654b383
32 * 32 *
33 * @see org.eclipse.jetty.io.nio.SelectorManager 33 * @see org.eclipse.jetty.io.nio.SelectorManager
34 */ 34 */
35 public interface Connection 35 public interface Connection
36 { 36 {
37 /* ------------------------------------------------------------ */ 37 /* ------------------------------------------------------------ */
38 /** 38 /**
39 * Handle the connection. 39 * Handle the connection.
40 * @throws IOException if the handling of I/O operations fail 40 * @throws IOException if the handling of I/O operations fail
41 */ 41 */
42 void handle() throws IOException; 42 void handle() throws IOException;
43 43
44 /** 44 /**
45 * @return the timestamp at which the connection was created 45 * @return the timestamp at which the connection was created
46 */ 46 */
47 long getTimeStamp(); 47 long getTimeStamp();
48 48
49 /** 49 /**
50 * @return whether this connection is idle, that is not parsing and not generating 50 * @return whether this connection is idle, that is not parsing and not generating
51 * @see #onIdleExpired(long) 51 * @see #onIdleExpired(long)
52 */ 52 */
53 boolean isIdle(); 53 boolean isIdle();
54 54
55 /** 55 /**
56 * <p>The semantic of this method is to return true to indicate interest in further reads, 56 * Called when the connection idle timeout expires
57 * or false otherwise, but it is misnamed and should be really called <code>isReadInterested()</code>.</p> 57 * @param idleForMs how long the connection has been idle
58 * 58 * @see #isIdle()
59 * @return true to indicate interest in further reads, false otherwise 59 */
60 */ 60 void onIdleExpired(long idleForMs);
61 // TODO: rename to isReadInterested() in the next release
62 boolean isSuspended();
63
64 /**
65 * Called when the connection idle timeout expires
66 * @param idleForMs how long the connection has been idle
67 * @see #isIdle()
68 */
69 void onIdleExpired(long idleForMs);
70 } 61 }