54 void storeConnections(); |
54 void storeConnections(); |
55 |
55 |
56 |
56 |
57 /** |
57 /** |
58 * Listener interface for connections which are added, removed and set as current |
58 * Listener interface for connections which are added, removed and set as current |
59 * @since 3.0 |
59 * @since 2.5 |
60 */ |
60 */ |
61 public interface IConnectionListener { |
61 public interface IConnectionListener { |
62 void connectionAdded(IConnection connection); |
62 void connectionAdded(IConnection connection); |
63 void connectionRemoved(IConnection connection); |
63 void connectionRemoved(IConnection connection); |
64 void currentConnectionSet(IConnection connection); |
64 void currentConnectionSet(IConnection connection); |
141 IConnectedService createConnectedService(IService service, IConnection connection); |
141 IConnectedService createConnectedService(IService service, IConnection connection); |
142 |
142 |
143 /** |
143 /** |
144 * Add new IConnectionListener |
144 * Add new IConnectionListener |
145 * @param listener IConnectionListener |
145 * @param listener IConnectionListener |
146 * @since 3.0 |
146 * @since 2.5 |
147 */ |
147 */ |
148 void addConnectionListener(IConnectionListener listener); |
148 void addConnectionListener(IConnectionListener listener); |
149 |
149 |
150 /** |
150 /** |
151 * Remove IConnectionListener |
151 * Remove IConnectionListener |
152 * @param listener IConnectionListener |
152 * @param listener IConnectionListener |
153 * @since 3.0 |
153 * @since 2.5 |
154 */ |
154 */ |
155 void removeConnectionListener(IConnectionListener listener); |
155 void removeConnectionListener(IConnectionListener listener); |
156 |
156 |
157 /** |
157 /** |
158 * Sets the current connection. |
158 * Sets the current connection. |
159 * @param connection IConnection |
159 * @param connection IConnection |
160 * @since 3.0 |
160 * @since 2.5 |
161 */ |
161 */ |
162 void setCurrentConnection(IConnection connection); |
162 void setCurrentConnection(IConnection connection); |
163 |
163 |
164 /** |
164 /** |
165 * Returns the current connection. |
165 * Returns the current connection. |
166 * @return IConnection |
166 * @return IConnection |
167 * @since 3.0 |
167 * @since 2.5 |
168 */ |
168 */ |
169 IConnection getCurrentConnection(); |
169 IConnection getCurrentConnection(); |
170 |
170 |
171 /** |
171 /** |
172 * Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that |
172 * Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that |
173 * are supported by the service. Connection list UI as well as new and edit wizards are filtered. |
173 * are supported by the service. Connection list UI as well as new and edit wizards are filtered. |
174 * Allows selecting a "current" connection which maps to #getCurrentConnection() |
174 * Allows selecting a "current" connection which maps to #getCurrentConnection() |
175 * when you use #ensureConenction(). |
175 * when you use #ensureConenction(). |
176 * @param service IService |
176 * @param service IService |
177 * @return IClientServiceSiteUI2 |
177 * @return IClientServiceSiteUI2 |
178 * @since 3.0 |
178 * @since 2.5 |
179 */ |
179 */ |
180 IClientServiceSiteUI2 getClientSiteUI2(IService service); |
180 IClientServiceSiteUI2 getClientSiteUI2(IService service); |
181 |
181 |
182 /** |
182 /** |
183 * Can be called by specific service implementors (e.g., debugger) to ensure some connection |
183 * Can be called by specific service implementors (e.g., debugger) to ensure some connection |
187 * a valid connection in the system that supports the service. |
187 * a valid connection in the system that supports the service. |
188 * @param connectionId String |
188 * @param connectionId String |
189 * @param service IService |
189 * @param service IService |
190 * @return IConnection |
190 * @return IConnection |
191 * @throws CoreException |
191 * @throws CoreException |
192 * @since 3.0 |
192 * @since 2.5 |
193 */ |
193 */ |
194 IConnection ensureConnection(String connectionId, IService service) throws CoreException; |
194 IConnection ensureConnection(String connectionId, IService service) throws CoreException; |
195 |
195 |
196 /** |
196 /** |
197 * Returns a connection from an id (including the current connection id) or null if none found. |
197 * Returns a connection from an id (including the current connection id) or null if none found. |
198 * @param connectionId String |
198 * @param connectionId String |
199 * @param service IService |
199 * @param service IService |
200 * @return IConnection |
200 * @return IConnection |
201 * @throws CoreException |
201 * @throws CoreException |
202 * @since 3.0 |
202 * @since 2.5 |
203 */ |
203 */ |
204 IConnection findConnection(String connectionId); |
204 IConnection findConnection(String connectionId); |
205 |
205 |
206 /** |
206 /** |
207 * Sets a dynamic connection as disconnected. Is no-op on user generated connections. |
207 * Sets a dynamic connection as disconnected. Is no-op on user generated connections. |
208 * If a dynamic connection is disconnected, it is transitioned to a disconnected state while it |
208 * If a dynamic connection is disconnected, it is transitioned to a disconnected state while it |
209 * is in use by some client service, and is eventually removed from the system once it is |
209 * is in use by some client service, and is eventually removed from the system once it is |
210 * no longer in use. |
210 * no longer in use. |
211 * @param connection IConnection2 |
211 * @param connection IConnection2 |
212 * @since 3.0 |
212 * @since 2.5 |
213 */ |
213 */ |
214 void disconnect(IConnection2 connection); |
214 void disconnect(IConnection2 connection); |
215 |
215 |
216 /** |
216 /** |
217 * Attempts to set a disconnected dynamic connection back to its in-use state. |
217 * Attempts to set a disconnected dynamic connection back to its in-use state. |
218 * If the connection has not been removed from the system, and is still in-use, |
218 * If the connection has not been removed from the system, and is still in-use, |
219 * it will be restored. Returns true if successful in restoring the connection. |
219 * it will be restored. Returns true if successful in restoring the connection. |
220 * @param connection IConnection2 |
220 * @param connection IConnection2 |
221 * @since 3.0 |
221 * @since 2.5 |
222 */ |
222 */ |
223 boolean reconnect(IConnection2 connection); |
223 boolean reconnect(IConnection2 connection); |
224 } |
224 } |