Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/AsyncEndPoint.java @ 940:b77d631b9e28
remove scheduleTimeout() and cancelTimeout()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 11 Oct 2016 00:13:30 -0600 |
parents | 3428c60d7cfc |
children | 89fe80dfab2c |
comparison
equal
deleted
inserted
replaced
939:8db5996c8c89 | 940:b77d631b9e28 |
---|---|
16 // ======================================================================== | 16 // ======================================================================== |
17 // | 17 // |
18 | 18 |
19 package org.eclipse.jetty.io; | 19 package org.eclipse.jetty.io; |
20 | 20 |
21 import org.eclipse.jetty.util.thread.Timeout; | |
22 | 21 |
23 public interface AsyncEndPoint extends ConnectedEndPoint | 22 public interface AsyncEndPoint extends ConnectedEndPoint |
24 { | 23 { |
25 /* ------------------------------------------------------------ */ | 24 /* ------------------------------------------------------------ */ |
26 /** | 25 /** |
27 * Dispatch the endpoint if it is not already dispatched | 26 * Dispatch the endpoint if it is not already dispatched |
28 * | 27 * |
29 */ | 28 */ |
30 public void dispatch(); | 29 public void dispatch(); |
31 | 30 |
32 /* ------------------------------------------------------------ */ | 31 /* ------------------------------------------------------------ */ |
33 /** | 32 /** |
34 * Dispatch the endpoint. If it is already dispatched, schedule a redispatch | 33 * Dispatch the endpoint. If it is already dispatched, schedule a redispatch |
35 * | 34 * |
36 */ | 35 */ |
37 public void asyncDispatch(); | 36 public void asyncDispatch(); |
38 | 37 |
39 /* ------------------------------------------------------------ */ | 38 /* ------------------------------------------------------------ */ |
40 /** Schedule a write dispatch. | 39 /** Schedule a write dispatch. |
41 * Set the endpoint to not be writable and schedule a dispatch when | 40 * Set the endpoint to not be writable and schedule a dispatch when |
42 * it becomes writable. | 41 * it becomes writable. |
43 */ | 42 */ |
44 public void scheduleWrite(); | 43 public void scheduleWrite(); |
45 | 44 |
46 /* ------------------------------------------------------------ */ | 45 /* ------------------------------------------------------------ */ |
47 /** Callback when idle. | 46 /** Callback when idle. |
48 * <p>An endpoint is idle if there has been no IO activity for | 47 * <p>An endpoint is idle if there has been no IO activity for |
49 * {@link #getMaxIdleTime()} and {@link #isCheckForIdle()} is true. | 48 * {@link #getMaxIdleTime()} and {@link #isCheckForIdle()} is true. |
50 * @param idleForMs TODO | 49 * @param idleForMs TODO |
51 */ | 50 */ |
52 public void onIdleExpired(long idleForMs); | 51 public void onIdleExpired(long idleForMs); |
53 | 52 |
54 /* ------------------------------------------------------------ */ | 53 /* ------------------------------------------------------------ */ |
55 /** Set if the endpoint should be checked for idleness | 54 /** Set if the endpoint should be checked for idleness |
56 */ | 55 */ |
57 public void setCheckForIdle(boolean check); | 56 public void setCheckForIdle(boolean check); |
58 | 57 |
59 /* ------------------------------------------------------------ */ | 58 /* ------------------------------------------------------------ */ |
60 /** Get if the endpoint should be checked for idleness | 59 /** Get if the endpoint should be checked for idleness |
61 */ | 60 */ |
62 public boolean isCheckForIdle(); | 61 public boolean isCheckForIdle(); |
63 | 62 |
64 | 63 |
65 /* ------------------------------------------------------------ */ | 64 /* ------------------------------------------------------------ */ |
66 public boolean isWritable(); | 65 public boolean isWritable(); |
67 | 66 |
68 /* ------------------------------------------------------------ */ | 67 /* ------------------------------------------------------------ */ |
69 /** | 68 /** |
70 * @return True if IO has been successfully performed since the last call to {@link #hasProgressed()} | 69 * @return True if IO has been successfully performed since the last call to {@link #hasProgressed()} |
71 */ | 70 */ |
72 public boolean hasProgressed(); | 71 public boolean hasProgressed(); |
73 | |
74 /* ------------------------------------------------------------ */ | |
75 /** | |
76 */ | |
77 public void scheduleTimeout(Timeout.Task task, long timeoutMs); | |
78 | |
79 /* ------------------------------------------------------------ */ | |
80 /** | |
81 */ | |
82 public void cancelTimeout(Timeout.Task task); | |
83 } | 72 } |