View | Details | Raw Unified | Return to bug 250716
Collapse All | Expand All

(-)src/org/eclipse/ecf/remoteservice/IRemoteServiceContainerAdapter.java (-16 / +40 lines)
Lines 14-25 Link Here
14
import java.util.Dictionary;
14
import java.util.Dictionary;
15
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IAdaptable;
16
import org.eclipse.ecf.core.identity.ID;
16
import org.eclipse.ecf.core.identity.ID;
17
import org.osgi.framework.Filter;
17
import org.eclipse.ecf.core.identity.Namespace;
18
import org.osgi.framework.InvalidSyntaxException;
18
import org.eclipse.ecf.core.util.IFutureStatus;
19
import org.osgi.framework.*;
19
20
20
/**
21
/**
21
 * Entry point remote service container adapter. This is the entry point
22
 * Entry point remote service container adapter. This is the entry point
22
 * innterface for accessing remote services through ECF containers.
23
 * interface for accessing remote services through ECF containers.
23
 * 
24
 * 
24
 */
25
 */
25
public interface IRemoteServiceContainerAdapter extends IAdaptable {
26
public interface IRemoteServiceContainerAdapter extends IAdaptable {
Lines 117-125 Link Here
117
	 * services that were registered under the specified class and match the
118
	 * services that were registered under the specified class and match the
118
	 * specified idFilter, and filter criteria.
119
	 * specified idFilter, and filter criteria.
119
	 * <p>
120
	 * <p>
120
	 * The IAsyncResult is returned immediately, and subsequent calls to {@link IAsyncResult#get()}
121
	 * The IFutureStatus is returned immediately, and subsequent calls to {@link IFutureStatus#get()}
121
	 * or {@link IAsyncResult#get(long)} will return the actual results received.  The type of
122
	 * or {@link IFutureStatus#get(long)} will return the actual results received.  The type of
122
	 * the Object returned from {@link IAsyncResult#get()} will be IRemoteServiceReference [].
123
	 * the Object returned from {@link IFutureStatus#get()} will be IRemoteServiceReference [].
123
	 * 
124
	 * 
124
	 * <p>
125
	 * <p>
125
	 * The list is valid at the time of the call to this method, however since
126
	 * The list is valid at the time of the call to this method, however since
Lines 140-151 Link Here
140
	 * properties objects contain keys and values which satisfy the filter. See
141
	 * properties objects contain keys and values which satisfy the filter. See
141
	 * {@link Filter} for a description of the filter string syntax.
142
	 * {@link Filter} for a description of the filter string syntax.
142
	 * 
143
	 * 
143
	 * <p>
144
	 * If <code>filter</code> is <code>null</code>, all registered services
145
	 * are considered to match the filter. If <code>filter</code> cannot be
146
	 * parsed, an {@link InvalidSyntaxException} will be thrown with a human
147
	 * readable message where the filter became unparsable.
148
	 * 
149
	 * @param idFilter
144
	 * @param idFilter
150
	 *            an array of ID instances that will restrict the search for
145
	 *            an array of ID instances that will restrict the search for
151
	 *            matching container ids If null, all remote containers will be
146
	 *            matching container ids If null, all remote containers will be
Lines 157-169 Link Here
157
	 *            the desired service. Must not be <code>null</code>.
152
	 *            the desired service. Must not be <code>null</code>.
158
	 * @param filter
153
	 * @param filter
159
	 *            The filter criteria. May be <code>null</code>.
154
	 *            The filter criteria. May be <code>null</code>.
160
	 * @return IAsyncResult that through subsequent calls to IAsyncResult#get() will return
155
	 * @return IFutureStatus that through subsequent calls to IFutureStatus#get() will return
161
	 *         IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. 
156
	 *         IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. 
162
	 *         Will not return <code>null</code>.
157
	 *         Will not return <code>null</code>.
163
	 * 
158
	 * 
164
	 * @throws InvalidSyntaxException If filter contains an invalid filter string that cannot be parsed.
159
	 * @since 3.0
165
	 */
160
	 */
166
	//public IAsyncResult asyncGetRemoteServiceReferences(ID[] idFilter, String clazz, String filter) throws InvalidSyntaxException;
161
	public IFutureStatus asyncGetRemoteServiceReferences(ID[] idFilter, String clazz, String filter);
162
167
	/**
163
	/**
168
	 * Get remote service for given IRemoteServiceReference. Note that clients
164
	 * Get remote service for given IRemoteServiceReference. Note that clients
169
	 * that call this method successfully should later call
165
	 * that call this method successfully should later call
Lines 200-205 Link Here
200
	 */
196
	 */
201
	public boolean ungetRemoteService(IRemoteServiceReference reference);
197
	public boolean ungetRemoteService(IRemoteServiceReference reference);
202
198
203
	//public IRemoteFilter createFilter(String filter) throws InvalidSyntaxException;
199
	/**
200
	 * Get namespace to use for this remote service provider.
201
	 * @return Namespace to use for creating IDs for this remote service provider.  Will
202
	 * not return <code>null</code>.
203
	 * @since 3.0
204
	 */
205
	public Namespace getRemoteServiceNamespace();
204
206
207
	/**
208
	 * Creates a <code>IRemoteFilter</code> object. This <code>IRemoteFilter</code> object may
209
	 * be used to match a <code>IRemoteServiceReference</code> object or a
210
	 * <code>Dictionary</code> object.
211
	 * 
212
	 * <p>
213
	 * If the filter cannot be parsed, an {@link InvalidSyntaxException} will be
214
	 * thrown with a human readable message where the filter became unparsable.
215
	 * 
216
	 * @param filter The filter string.
217
	 * @return A <code>IRemoteFilter</code> object encapsulating the filter string.
218
	 * @throws InvalidSyntaxException If <code>filter</code> contains an invalid
219
	 *         filter string that cannot be parsed.
220
	 * @throws NullPointerException If <code>filter</code> is null.
221
	 * @throws java.lang.IllegalStateException If this IRemoteServiceContainerAdapter is no
222
	 *         longer valid.
223
	 * 
224
	 * @since 3.0
225
	 * @see "Framework specification for a description of the filter string syntax."
226
	 * @see FrameworkUtil#createFilter(String)
227
	 */
228
	public IRemoteFilter createRemoteFilter(String filter) throws InvalidSyntaxException;
205
}
229
}

Return to bug 250716