42 void setDynamic(boolean dynamic); |
42 void setDynamic(boolean dynamic); |
43 |
43 |
44 /** |
44 /** |
45 * The status of a connection |
45 * The status of a connection |
46 */ |
46 */ |
47 public interface IStatus { |
47 public interface IConnectionStatus { |
48 enum EStatus { |
48 enum EConnectionStatus { |
49 READY, NOT_READY, IN_USE, IN_USE_DISCONNECTED |
49 READY, NOT_READY, IN_USE, IN_USE_DISCONNECTED |
50 }; |
50 }; |
51 |
51 |
52 EStatus getEStatus(); |
52 EConnectionStatus getEConnectionStatus(); |
53 |
53 |
54 String getDescription(); |
54 String getDescription(); |
55 } |
55 } |
56 |
56 |
57 /** |
57 /** |
58 * Gets this connection's status |
58 * Gets this connection's status |
59 * @return IStatus |
59 * @return IStatus |
60 */ |
60 */ |
61 IStatus getStatus(); |
61 IConnectionStatus getStatus(); |
62 |
62 |
63 /** |
63 /** |
64 * Sets this connection's status |
64 * Sets this connection's status |
65 * @see IConnection2#getStatus() |
65 * @see IConnection2#getStatus() |
66 * @param status IStatus |
66 * @param status IStatus |
67 */ |
67 */ |
68 void setStatus(IStatus status); |
68 void setStatus(IConnectionStatus status); |
69 |
69 |
70 /** |
70 /** |
71 * A listener for status changes |
71 * A listener for status changes |
72 */ |
72 */ |
73 public interface IStatusChangedListener { |
73 public interface IConnectionStatusChangedListener { |
74 void statusChanged(IStatus status); |
74 void statusChanged(IConnectionStatus status); |
75 } |
75 } |
76 |
76 |
77 /** |
77 /** |
78 * Adds a listener for status changes |
78 * Adds a listener for status changes |
79 * @param listener IStatusChangedListener |
79 * @param listener IStatusChangedListener |
80 */ |
80 */ |
81 void addStatusChangedListener(IStatusChangedListener listener); |
81 void addStatusChangedListener(IConnectionStatusChangedListener listener); |
82 |
82 |
83 /** |
83 /** |
84 * Removes a listener for status changes |
84 * Removes a listener for status changes |
85 * @param listener IStatusChangedListener |
85 * @param listener IStatusChangedListener |
86 */ |
86 */ |
87 void removeStatusChangedListener(IStatusChangedListener listener); |
87 void removeStatusChangedListener(IConnectionStatusChangedListener listener); |
88 |
88 |
89 /** |
89 /** |
90 * An optional icon representing this connection. |
90 * An optional icon representing this connection. |
91 * If none is set, the default icon is used. |
91 * If none is set, the default icon is used. |
92 * @return ImageDescriptor |
92 * @return ImageDescriptor |