diff options
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.remoteservice/src/org')
28 files changed, 234 insertions, 94 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRSAContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRSAContainer.java index 2869d97cf..9cd00a409 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRSAContainer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRSAContainer.java @@ -41,7 +41,7 @@ public abstract class AbstractRSAContainer extends AbstractContainer { * @param registration the RSARemoteServiceRegistration that is being registered. Will not * be <code>null</code>. * - * @return Map<String, Object> of extra properties to add to the RSA EndpointDescription. + * @return Map of extra properties to add to the RSA EndpointDescription. * Any properties in the returned map will override or add to the endpoint description. For example, * if one of the properties in the returned Map is a String value for the key 'ecf.endpoint.id', * then the value from the map will override this property in the endpoint description. The result diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java index 926f83e18..241fa6779 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java @@ -47,6 +47,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.2 + * @param call the remote call to get the ExecutorService for + * @return ExecutorService */ protected ExecutorService getFutureExecutorService(IRemoteCall call) { synchronized (this) { @@ -58,6 +60,7 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.2 + * @param executorService the ExecutorService to use for this remote service */ protected void setFutureExecutorService(ExecutorService executorService) { this.futureExecutorService = executorService; @@ -70,6 +73,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.2 + * @param call the IRemoteCall to get the IExecutor for + * @return IExecutor the executor to use for the given call instance. */ protected IExecutor getIFutureExecutor(IRemoteCall call) { synchronized (this) { @@ -80,6 +85,7 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ } /** + * @param executor executor * @since 8.2 */ protected void setIFutureExecutor(IExecutor executor) { @@ -98,6 +104,10 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 6.0 + * @param cl the ClassLoader to load the interface class. Will not be <code>null</code> + * @param className the interface class to load + * @return Class the class loaded. Must not be <code>null</code> + * @throws ClassNotFoundException if class cannot be found */ protected Class loadInterfaceClass(ClassLoader cl, String className) throws ClassNotFoundException { return Class.forName(className, true, cl); @@ -150,6 +160,7 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 6.0 + * @param classes the interface classes to add to */ protected void addRemoteServiceProxyToProxy(List classes) { IRemoteServiceReference rsReference = getRemoteServiceReference(); @@ -169,6 +180,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.3 + * @param cl ClassLoader to use to add async proxy classes + * @param interfaces the Class[] of interface classes + * @return List the list of interfaces plus any async proxy interface classes. */ protected List addAsyncProxyClasses(ClassLoader cl, Class[] interfaces) { List intfs = Arrays.asList(interfaces); @@ -243,6 +257,7 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.0 + * @return IRemoteServiceProxyCreator */ protected IRemoteServiceProxyCreator getRemoteServiceProxyCreator() { ServiceTracker st = new ServiceTracker(Activator.getDefault().getContext(), IRemoteServiceProxyCreator.class, null); @@ -254,6 +269,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 6.0 + * @param cl ClassLoader for proxy creation + * @param classes the Class[] for proxy classes + * @return Object the proxy implementing the given Class[] */ protected Object createProxy(ClassLoader cl, Class[] classes) { IRemoteServiceProxyCreator proxyCreator = getRemoteServiceProxyCreator(); @@ -268,6 +286,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 3.3 + * @param c Class + * @return Class */ protected Class findAsyncRemoteServiceProxyClass(Class c) { String proxyClassName = convertInterfaceNameToAsyncInterfaceName(c.getName()); @@ -284,6 +304,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 6.0 + * @param cl ClassLoader + * @param c Class + * @return Class */ protected Class findAsyncRemoteServiceProxyClass(ClassLoader cl, Class c) { String proxyClassName = convertInterfaceNameToAsyncInterfaceName(c.getName()); @@ -354,6 +377,10 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.3 + * @param proxy proxy instance + * @param method the java Method invoked + * @param args arguments + * @return true if given proxy/method/args combination represents an async proxy class */ protected boolean isAsync(Object proxy, Method method, Object[] args) { return (Arrays.asList(method.getDeclaringClass().getInterfaces()).contains(IAsyncRemoteServiceProxy.class) || method.getName().endsWith(IAsyncRemoteServiceProxy.ASYNC_METHOD_SUFFIX)); @@ -361,6 +388,10 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.3 + * @param callMethod call method + * @param callParameters call parameters + * @param callTimeout call timeout + * @return IRemoteCall remote call created. Should not be <code>null</code> */ protected IRemoteCall createRemoteCall(final String callMethod, final Object[] callParameters, final long callTimeout) { return new IRemoteCall() { @@ -380,6 +411,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.6 + * @param message message for exception + * @param t Throwable to wrap + * @throws ServiceException thrown if subclasses do not override */ protected void handleProxyException(String message, Throwable t) throws ServiceException { if (t instanceof ServiceException) @@ -389,6 +423,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.6 + * @param methodName method name + * @param e exception thrown if subclasses do not override + * @throws Throwable thrown if subclasses to not override */ protected void handleInvokeSyncException(String methodName, ECFException e) throws Throwable { Throwable cause = e.getCause(); @@ -478,6 +515,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.4 + * @param invokeMethodName invoke method name + * @param asyncArgs asynch arguments + * @return RemoteCall remote call created. Should not be <code>null</code> */ protected RemoteCall getAsyncRemoteCall(String invokeMethodName, Object[] asyncArgs) { return new RemoteCall(invokeMethodName, asyncArgs, IRemoteCall.DEFAULT_TIMEOUT); @@ -485,6 +525,10 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 3.3 + * @param method java Method invoked + * @param args arguments + * @return Object async future result. Should be of type IFuture, Future, or CompletableFuture + * @throws Throwable thrown if some problem invoking async */ protected Object invokeAsync(final Method method, final Object[] args) throws Throwable { final String invokeMethodName = getAsyncInvokeMethodName(method); @@ -496,6 +540,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.2 + * @param call remote call + * @param listener remote call listener + * @return Object will be <code>null</code> unless subclasses override */ protected Object callAsyncWithResult(IRemoteCall call, IRemoteCallListener listener) { callAsync(call, listener); @@ -504,6 +551,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.4 + * @param call abstract remote call + * @param completable async proxy completable */ @Override protected void callCompletableAsync(AbstractAsyncProxyRemoteCall call, final IAsyncProxyCompletable completable) { @@ -519,6 +568,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.4 + * @param call abstract async proxy remote call + * @return Future future result */ @Override protected Future callFutureAsync(AbstractAsyncProxyRemoteCall call) { @@ -527,6 +578,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 8.2 + * @param call remote call + * @return Future future result */ protected Future callFutureAsync(final IRemoteCall call) { ExecutorService executorService = getFutureExecutorService(call); @@ -541,6 +594,9 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 3.3 + * @param method method + * @param args args + * @return AsyncArgs async arguments */ protected AsyncArgs getAsyncArgs(Method method, Object[] args) { IRemoteCallListener listener = null; @@ -570,6 +626,8 @@ public abstract class AbstractRemoteService extends AbstractAsyncProxyRemoteServ /** * @since 3.3 + * @param method java method invoked + * @return String synchronous method name without asynchronous suffix (i.e. fooAsync to foo) */ protected String getAsyncInvokeMethodName(Method method) { String methodName = method.getName(); diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AsyncMethod.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AsyncMethod.java index 1804e9d5d..1fef198d0 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AsyncMethod.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AsyncMethod.java @@ -19,6 +19,7 @@ public @interface AsyncMethod { /** * value values are: "none", "callback", "future", "both". All other values * will be ignored + * @return String type value */ String type(); } diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java index e7fb02d9c..cf7146eee 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java @@ -11,10 +11,6 @@ package org.eclipse.ecf.remoteservice; -import java.util.Map; -import org.eclipse.ecf.core.IContainerFactory; -import org.eclipse.ecf.core.security.IConnectContext; - /** * Remote service API constants. * @@ -211,48 +207,48 @@ public interface Constants { * ECF discovery service type for Remote Service Admin. All ECF remote * services published by Remote Service Admin advertisers should have this * value as one of the entries in the list returned from - * {@link IServiceTypeID#getServices()}. + * IServiceTypeID#getServices(). * @since 8.9 */ public static final String DISCOVERY_SERVICE_TYPE = "ecfosgirsvc"; //$NON-NLS-1$ /** * ECF discovery scope property. Value type is String+. If set, the value - * will be used by the {@link IServiceInfoFactory} during - * {@link IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription)} - * to create an {@link IServiceTypeID} via - * {@link IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String)} + * will be used by the IServiceInfoFactory during + * IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription) + * to create an IServiceTypeID via + * IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String) * . The scopes value determines the third parameter. If not explicitly set, - * the {@link IServiceTypeID#DEFAULT_SCOPE} is used. + * the IServiceTypeID#DEFAULT_SCOPE is used. * @since 8.9 */ public static final String DISCOVERY_SCOPE = "ecf.endpoint.discovery.scope"; //$NON-NLS-1$ /** * ECF discovery protocols property. Value type is String+. If set, the - * value will be used by the {@link IServiceInfoFactory} during - * {@link IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription)} - * to create an {@link IServiceTypeID} via - * {@link IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String)} + * value will be used by the IServiceInfoFactory during + * IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription) + * to create an IServiceTypeID via + * IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String) * . The protocols value determines the fourth parameter. If not explicitly - * set, the {@link IServiceTypeID#DEFAULT_PROTO} is used. + * set, the IServiceTypeID#DEFAULT_PROTO is used. * @since 8.9 */ public static final String DISCOVERY_PROTOCOLS = "ecf.endpoint.discovery.protocols"; //$NON-NLS-1$ /** * ECF discovery naming authority property. Value type is String. If set, - * the value will be used by the {@link IServiceInfoFactory} during - * {@link IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription)} - * to create an {@link IServiceTypeID} via - * {@link IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String)} + * the value will be used by the IServiceInfoFactory during + * IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription) + * to create an IServiceTypeID via + * IServiceIDFactory#createServiceTypeID(org.eclipse.ecf.core.identity.Namespace, String[], String[], String[], String) * . The protocols value determines the fifth parameter. If not explicitly - * set, the {@link IServiceTypeID#DEFAULT_NA} is used. + * set, the IServiceTypeID#DEFAULT_NA is used. * @since 8.9 */ public static final String DISCOVERY_NAMING_AUTHORITY = "ecf.endpoint.discovery.namingauthority"; //$NON-NLS-1$ /** * ECF discovery service name property. Value type is String. If set, the - * value will be used by the {@link IServiceInfoFactory} during - * {@link IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription)} - * to create an {@link IServiceInfo} with a given name. The default is a + * value will be used by the IServiceInfoFactory during + * IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription) + * to create an IServiceInfo with a given name. The default is a * globally unique identifier. Note that if this value is explicitly set, * care should be taken to not have the name conflict with other remote * service names. @@ -266,27 +262,27 @@ public interface Constants { */ public static final String DISCOVERY_DEFAULT_SERVICE_NAME_PREFIX = "osgirsvc_"; //$NON-NLS-1$ /** - * ECF {@link EndpointDescription} property (with value of type String) that - * defines the unique {@link org.eclipse.ecf.core.identity.Namespace} name. - * If present in the {@link EndpointDescription}, the value will be used to + * ECF EndpointDescription property (with value of type String) that + * defines the unique org.eclipse.ecf.core.identity.Namespace name. + * If present in the EndpointDescription, the value will be used to * create the containerID for accessing a remote service. The Namespace name * is optional because typically the ID protocol specifier (e.g. 'ecftcp' in * ID with name: 'ecftcp://localhost:3282/server') can be used to * unambiguously determine the appropriate - * {@link org.eclipse.ecf.core.identity.Namespace} used to create the + * org.eclipse.ecf.core.identity.Namespace used to create the * container ID for remote service import. * @since 8.9 */ public static final String ENDPOINT_CONTAINER_ID_NAMESPACE = "ecf.endpoint.id.ns"; //$NON-NLS-1$ /** - * ECF {@link EndpointDescription} property (with value of type String) that + * ECF EndpointDescription property (with value of type String) that * defines the ecf endpoint id (typically the container id). * * @since 8.9 */ public static final String ENDPOINT_ID = "ecf.endpoint.id"; //$NON-NLS-1$ /** - * ECF {@link EndpointDescription} property (with value of type Long) that + * ECF EndpointDescription property (with value of type Long) that * defines a service timestamp set upon initial export of the remote * service. * @@ -294,7 +290,7 @@ public interface Constants { */ public static final String ENDPOINT_TIMESTAMP = "ecf.endpoint.ts"; //$NON-NLS-1$ /** - * Optional ECF {@link EndpointDescription} property (with value of type + * Optional ECF EndpointDescription property (with value of type * String) that defines a connect target ID. If set/non-<code>null</code>, * this property can be used by remote service consumers to connect to a * specific container, and access a remote service exposed by some @@ -303,18 +299,18 @@ public interface Constants { */ public static final String ENDPOINT_CONNECTTARGET_ID = "ecf.endpoint.connecttarget.id"; //$NON-NLS-1$ /** - * Optional ECF {@link EndpointDescription} property (with value of type + * Optional ECF EndpointDescription property (with value of type * String+) that defines one or more IDs used for filtering remote service * references during - * {@link RemoteServiceAdmin#importService(org.osgi.service.remoteserviceadmin.EndpointDescription)} + * RemoteServiceAdmin#importService(org.osgi.service.remoteserviceadmin.EndpointDescription) * . * @since 8.9 */ public static final String ENDPOINT_IDFILTER_IDS = "ecf.endpoint.idfilter.ids"; //$NON-NLS-1$ /** - * Optional ECF {@link EndpointDescription} property (with value of type + * Optional ECF EndpointDescription property (with value of type * String), that defines a remote services properties filter used during - * {@link RemoteServiceAdmin#importService(org.osgi.service.remoteserviceadmin.EndpointDescription)} + * RemoteServiceAdmin#importService(org.osgi.service.remoteserviceadmin.EndpointDescription) * . * @since 8.9 */ @@ -325,14 +321,14 @@ public interface Constants { * specified as a service property upon remote service registration, this * property allows ECF containers to be initialized and configured upon * creation during the call to - * {@link HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[])} + * HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[]) * . The type of the value may be String, ID, or Object[]. The * IContainerFactory.createContainer method is then selected based upon the * type of the value...i.e. - * {@link IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, String)} + * IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, String) * , - * {@link IContainerFactory#createContainer(org.eclipse.ecf.core.identity.ID)} - * , or {@link IContainerFactory#createContainer(String, Object[])}, and the + * IContainerFactory#createContainer(org.eclipse.ecf.core.identity.ID) + * , or IContainerFactory#createContainer(String, Object[]), and the * value is passed in for container creation. * @since 8.9 */ @@ -342,8 +338,8 @@ public interface Constants { * as a service property for remote service export, this property allows ECF * containers to have given a connect context for authentication upon * container connection by - * {@link HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[])} - * . The type of the value is {@link IConnectContext}. + * HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[]) + * . The type of the value is IConnectContext. * @since 8.9 */ public static final String SERVICE_EXPORTED_CONTAINER_CONNECT_CONTEXT = "ecf.exported.containerconnectcontext"; //$NON-NLS-1$ @@ -351,7 +347,7 @@ public interface Constants { * Container ID of the target host container for remote service export. If * specified as a service property for remote service export, this property * is used to match against the set of available containers in - * {@link HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[])} + * HostContainerSelector#selectHostContainers(org.osgi.framework.ServiceReference, Map, String[], String[], String[]) * . The type of the value is ID. * @since 8.9 */ @@ -362,25 +358,25 @@ public interface Constants { * the async interfaces under which this service will be exported on the * remote proxy. This list must be a subset of the types service was * exported (i.e. subset of interfaces specified by # - * {@link org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_EXPORTED_INTERFACES} + * org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_EXPORTED_INTERFACES * . The single value of an asterisk ("*", \u002A) indicates * all the interface types under which the service was exported. * <p> * The interfaces in the String[] can either be * <ol> * <li>The same fully qualified name as an interface in the # - * {@link org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_EXPORTED_INTERFACES} + * org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_EXPORTED_INTERFACES * property</li> * <li>The fully qualified name of an interface that follows the * asynchronous proxy conventions to match with one of the existing exported * types.</li> - * + * </ol> * <p> - * This property may be supplied in the {@code properties} - * {@code Dictionary} object passed to the - * {@code BundleContext.registerService} method. The value of this property - * must be of type {@code String}, {@code String[]}, or {@code Collection} - * of {@code String}. + * This property may be supplied in the properties + * Dictionary object passed to the + * BundleContext.registerService method. The value of this property + * must be of type String, String[], or Collection + * of String. * @since 8.9 * */ @@ -389,10 +385,10 @@ public interface Constants { /** * Allows exporting ECF containers to determine the type of value associated * with the - * {@link org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_IMPORTED} + * org.osgi.service.remoteserviceadmin.RemoteConstants#SERVICE_IMPORTED * property on the OSGi remote service consumer. For ECF, the default value - * type is {@link IRemoteService}. If set to some other value (e.g. - * {@link Boolean} by the exporting host container, then consumers can use + * type is IRemoteService. If set to some other value (e.g. + * Boolean by the exporting host container, then consumers can use * the SERVICE_IMPORTED value appropriately. * @since 8.9 */ diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteCallListener.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteCallListener.java index 20e0244c1..776235119 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteCallListener.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteCallListener.java @@ -26,13 +26,11 @@ import org.eclipse.ecf.remoteservice.events.IRemoteCallEvent; * </ol> * * <p> - * </p> * Note these methods will be called asynchronously when notifications of remote * changes are received by the provider implementation code. The provider is * free to call the methods below with an arbitrary thread, so the * implementation of these methods must be appropriately prepared. * <p> - * </p> * For example, if the code implementing any of these methods must interact with * user interface code, then it should use code such as the following to execute * on the SWT UI thread: diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java index b382c2c5f..adf76034b 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java @@ -19,7 +19,7 @@ import org.eclipse.equinox.concurrent.future.IFuture; * implementing this interface will be returned from the * IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference) and * may then be used to communicate with a remote service. The methods on this - * interface support accessing the remote service in several ways:<br/> + * interface support accessing the remote service in several ways:<br> * <ul> * <li>callSync -- A synchronous invocation that will block the calling thread * until complete (or timeout) and return the result from the remote or throw @@ -37,15 +37,8 @@ import org.eclipse.equinox.concurrent.future.IFuture; * method failure information</li> * <li>getProxy -- Access to a local proxy for the remote service that will * expose the appropriate interface to the caller, and synchronously call the - * remote methods when invoked. For example:</li> - * - * <pre> - * IRemoteServiceReference[] references = serviceContainer - * .getRemoteServiceReferences(null, "java.lang.Runnable", null); - * IRemoteService remoteService = serviceContainer.getRemoteService(references[0]); - * Runnable runnable = (Runnable) remoteService.getProxy(); - * runnable.run(); - * </pre> + * remote methods when invoked. + * </ul> * */ public interface IRemoteService { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceConsumer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceConsumer.java index 3a39ba32d..1af065505 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceConsumer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceConsumer.java @@ -46,7 +46,6 @@ public interface IRemoteServiceConsumer extends IAdaptable { * returned array of <code>IRemoteServiceReference</code> objects contains * services that were registered under the specified class and match the * specified idFilter, and filter criteria. - * </p> * <p> * Note this method assumes that the enclosing container has previously * been connected, and uses the idFilter to filter among targets within the @@ -93,6 +92,7 @@ public interface IRemoteServiceConsumer extends IAdaptable { * <code>null</code> if no services are found that match the search. * * @throws InvalidSyntaxException If filter contains an invalid filter string that cannot be parsed. + * @throws ContainerConnectException if container cannot connect * @since 5.0 */ public IRemoteServiceReference[] getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException; @@ -156,7 +156,6 @@ public interface IRemoteServiceConsumer extends IAdaptable { * returned array of <code>IRemoteServiceReference</code> objects contains * services that were registered under the specified class and match the * specified idFilter, and filter criteria. - * </p> * <p> * Note this method assumes that the enclosing container has previously * been connected, and uses the idFilter to filter among targets within the @@ -243,6 +242,7 @@ public interface IRemoteServiceConsumer extends IAdaptable { * <code>null</code> if no services are found that match the search. * * @throws InvalidSyntaxException If filter contains an invalid filter string that cannot be parsed. + * @throws ContainerConnectException if container cannot connect * @since 3.0 */ public IRemoteServiceReference[] getRemoteServiceReferences(ID target, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException; diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainerAdapter.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainerAdapter.java index d7117c172..d5cf4c9bb 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainerAdapter.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainerAdapter.java @@ -76,7 +76,6 @@ public interface IRemoteServiceContainerAdapter extends IRemoteServiceHost, IRem * returned array of <code>IRemoteServiceReference</code> objects contains * services that were registered under the specified class and match the * specified idFilter, and filter criteria. - * </p> * <p> * Note this method assumes that the enclosing container has previously * been connected, and uses the idFilter to filter among targets within the @@ -186,7 +185,6 @@ public interface IRemoteServiceContainerAdapter extends IRemoteServiceHost, IRem * returned array of <code>IRemoteServiceReference</code> objects contains * services that were registered under the specified class and match the * specified idFilter, and filter criteria. - * </p> * <p> * Note this method assumes that the enclosing container has previously * been connected, and uses the idFilter to filter among targets within the diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceListener.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceListener.java index 9eae9e759..bb47651e0 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceListener.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceListener.java @@ -17,13 +17,11 @@ import org.eclipse.ecf.remoteservice.events.*; * Listener for remote service changes (register and unregister). * * <p> - * </p> * Note these methods will be called asynchronously when notifications of remote * changes are received by the provider implementation code. The provider is * free to call the methods below with an arbitrary thread, so the * implementation of these methods must be appropriately prepared. * <p> - * </p> * For example, if the code implementing any of these methods must interact with * user interface code, then it should use code such as the following to execute * on the SWT UI thread: diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java index 9e436219c..c3fe86559 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java @@ -33,6 +33,7 @@ public class RemoteServiceContainer implements IRemoteServiceContainer { /** * @since 3.2 + * @param container container */ @SuppressWarnings("cast") public RemoteServiceContainer(IContainer container) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainerAdapterImpl.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainerAdapterImpl.java index 784fe3994..1eeb2d429 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainerAdapterImpl.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainerAdapterImpl.java @@ -413,7 +413,8 @@ public class RemoteServiceContainerAdapterImpl implements IRemoteServiceContaine } /** - * @throws ContainerConnectException + * @param target the ID target + * @throws ContainerConnectException container connect exception if cannot connect */ protected void connectToRemoteServiceTarget(ID target) throws ContainerConnectException { // Do nothing by default diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceFilterImpl.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceFilterImpl.java index 13ecd6b07..8292a7c1a 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceFilterImpl.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceFilterImpl.java @@ -1,7 +1,6 @@ package org.eclipse.ecf.remoteservice; import org.eclipse.ecf.remoteservice.util.RemoteFilterImpl; - import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; @@ -11,7 +10,9 @@ import org.osgi.framework.ServiceReference; public class RemoteServiceFilterImpl extends RemoteFilterImpl { /** - * @param createFilter + * @param createFilter filter as string + * @throws InvalidSyntaxException thrown if given String filter cannot be converted + * into a valid filter */ public RemoteServiceFilterImpl(String createFilter) throws InvalidSyntaxException { super(createFilter); diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceHelper.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceHelper.java index e3bb9f351..d530ba934 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceHelper.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceHelper.java @@ -84,6 +84,7 @@ public class RemoteServiceHelper { * @param method the method to invoke. Must not be <code>null</code>. * @param parameters the parameters associated with the method to invoke. May be <code>null</code> (no parameters). * @param timeout the timeout (in ms) for the remote call. + * @return IFuture the future created */ public static IFuture futureExec(IRemoteService remoteService, final String method, final Object[] parameters, final long timeout) { Assert.isNotNull(remoteService); @@ -111,6 +112,7 @@ public class RemoteServiceHelper { * @param remoteService the IRemoteService to invoke. Must not be <code>null</code>. * @param method the method to invoke. Must not be <code>null</code>. * @param parameters the parameters associated with the method to invoke. May be <code>null</code> (no parameters). + * @return IFuture the future created */ public static IFuture futureExec(IRemoteService remoteService, final String method, final Object[] parameters) { return futureExec(remoteService, method, parameters, getDefaultTimeout()); @@ -124,6 +126,8 @@ public class RemoteServiceHelper { * @param method the method to invoke. Must not be <code>null</code>. * @param parameters the parameters associated with the method to invoke. May be <code>null</code> (no parameters). * @param timeout the timeout (in ms) for the remote call. + * @return Object the result of this synchronous execution + * @throws ECFException if some problem with execution */ public static Object syncExec(IRemoteService remoteService, final String method, final Object[] parameters, final long timeout) throws ECFException { Assert.isNotNull(remoteService); @@ -152,6 +156,8 @@ public class RemoteServiceHelper { * @param remoteService the IRemoteService to invoke. Must not be <code>null</code>. * @param method the method to invoke. Must not be <code>null</code>. * @param parameters the parameters associated with the method to invoke. May be <code>null</code> (no parameters). + * @return Object the result of this synchronous execution + * @throws ECFException if some problem with execution */ public static Object syncExec(IRemoteService remoteService, final String method, final Object[] parameters) throws ECFException { return syncExec(remoteService, method, parameters, getDefaultTimeout()); diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistrationImpl.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistrationImpl.java index 53cf8df6b..ac42b17e3 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistrationImpl.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistrationImpl.java @@ -395,6 +395,7 @@ public class RemoteServiceRegistrationImpl implements IRemoteServiceRegistration /** * @since 8.9 + * @return String[] the interface classes associated with this registration */ public String[] getInterfaces() { return this.clazzes; diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistryImpl.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistryImpl.java index c9500afda..3cbd8ec6d 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistryImpl.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceRegistryImpl.java @@ -57,6 +57,7 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param containerID the containerID to set * @since 3.4 */ public void setContainerID(ID containerID) { @@ -191,6 +192,9 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param remoteServiceID the remote service id to find the registration for. + * @return RemoteServiceRegistrationImpl the registration found for the given remoteServiceID. + * Will be <code>null</code> if no remote service registration found for given remoteServiceID * @since 3.0 */ protected RemoteServiceRegistrationImpl findRegistrationForRemoteServiceId(IRemoteServiceID remoteServiceID) { @@ -209,6 +213,8 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param serviceid the container relative service id + * @return the IRemoteServiceID with same container and giveen serviceid * @since 3.0 */ public IRemoteServiceID createRemoteServiceID(long serviceid) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java index dce456d51..3e7e67430 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java @@ -269,6 +269,10 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** + * @param serviceType serviceType + * @param callables callables + * @param properties properties + * @return IRemoteServiceRegistration registration created for registration * @since 8.5 */ public IRemoteServiceRegistration registerCallables(Class<?> serviceType, IRemoteCallable[] callables, Dictionary properties) { @@ -383,6 +387,11 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** + * @param uri uri + * @param call remote call + * @param callable callable + * @return IRemoteCallParameter[] remote call parameters prepared + * @throws NotSerializableException if cannot be serialized * @since 8.5 */ protected IRemoteCallParameter[] prepareCallParameters(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException { @@ -414,6 +423,11 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** + * @param uri uri + * @param call call + * @param callable callable + * @return IRemoteCallParameter[] extra parameters + * @throws NotSerializableException if not serializable * @since 8.5 */ protected IRemoteCallParameter[] prepareExtraParameters(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException { @@ -451,9 +465,15 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** - * Serialze the parameter using the container's parameterSerializer. If there is no serializer for this container, return null. + * Serialize the parameter using the container's parameterSerializer. If there is no serializer for this container, return null. * - * @return the serialized parameter or null if there is no parameterSerializer for this container + * @param uri uri + * @param call call + * @param callable callable + * @param defaultParameter default parameter + * @param parameterValue parameter value + * @return IRemoteCallParameter the serialized parameter or null if there is no parameterSerializer for this container + * @throws NotSerializableException thrown if parameters cannot be serialized * @see IRemoteCallParameterSerializer#serializeParameter(String, IRemoteCall, IRemoteCallable, IRemoteCallParameter, Object) * @since 4.1 */ @@ -465,6 +485,15 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** + * Serialize the parameter using the container's parameterSerializer. If there is no serializer for this container, return null. + * + * @param uri uri + * @param call call + * @param callable callable + * @param currentParameters current parameters + * @param parameterValue parameter value + * @return IRemoteCallParameter[] parameters for given + * @throws NotSerializableException thrown if parameters cannot be serialized * @since 8.0 */ protected IRemoteCallParameter[] serializeParameter(String uri, IRemoteCall call, IRemoteCallable callable, List currentParameters, Object[] parameterValue) throws NotSerializableException { @@ -476,6 +505,13 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } /** + * @param uri uri + * @param call call + * @param callable callable + * @param responseHeaders http response headers + * @param responseBody response body as byte[] + * @return Object response deserialized via response deserializer + * @throws NotSerializableException if response cannot be deserialized for processing * @since 8.0 */ protected Object processResponse(String uri, IRemoteCall call, IRemoteCallable callable, Map responseHeaders, byte[] responseBody) throws NotSerializableException { @@ -502,6 +538,10 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen protected abstract String prepareEndpointAddress(IRemoteCall call, IRemoteCallable callable); /** + * @param endpoint endpoint + * @param call call + * @param callable callable + * @return UriRequest to use for request. May be <code>null</code> * @since 8.5 */ public UriRequest createUriRequest(String endpoint, IRemoteCall call, IRemoteCallable callable) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientService.java index 8ae67188a..ec9dac64c 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientService.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientService.java @@ -203,6 +203,13 @@ public abstract class AbstractClientService extends AbstractRemoteService { } /** + * @param uri uri + * @param call call + * @param callable callable + * @param responseHeaders responseHeaders + * @param responseBody responseBody + * @return Object processed response + * @throws NotSerializableException if response cannot be deserialized * @since 8.0 */ protected Object processResponse(String uri, IRemoteCall call, IRemoteCallable callable, Map responseHeaders, byte[] responseBody) throws NotSerializableException { @@ -249,6 +256,10 @@ public abstract class AbstractClientService extends AbstractRemoteService { } /** + * @param endpoint endpoint + * @param call call + * @param callable callable + * @return UriRequest new UriRequest * @since 8.5 */ protected UriRequest createUriRequest(String endpoint, IRemoteCall call, IRemoteCallable callable) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractRSAClientService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractRSAClientService.java index 5a5a2962c..b5cd74514 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractRSAClientService.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractRSAClientService.java @@ -44,7 +44,10 @@ public abstract class AbstractRSAClientService extends AbstractClientService { } /** - * @throws ECFException + * @param call the remote call to invoke + * @param callable the remote callable to invoke + * @return Object result of remote call + * @throws ECFException if invoke fails */ @Override protected Object invokeRemoteCall(IRemoteCall call, IRemoteCallable callable) throws ECFException { @@ -62,6 +65,7 @@ public abstract class AbstractRSAClientService extends AbstractClientService { * * @param remoteCall the RSARemoteCall to use to make the asynchronous remote call. Will not be <code>null</code>. * @return Object. Should return a non-null instance of {@link org.eclipse.equinox.concurrent.future.IFuture}, {@link java.util.concurrent.Future}, or {@link java.util.concurrent.CompletableFuture} + * @throws ECFException if async cannot be invoked */ protected abstract Object invokeAsync(RSARemoteCall remoteCall) throws ECFException; diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/IRemoteServiceClientContainerAdapter.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/IRemoteServiceClientContainerAdapter.java index 43028ac71..11d399e5d 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/IRemoteServiceClientContainerAdapter.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/IRemoteServiceClientContainerAdapter.java @@ -30,10 +30,9 @@ public interface IRemoteServiceClientContainerAdapter extends IRemoteServiceCont * instances and associate an array of IRemoteCallables with each given serviceInterfaceName, so that subsequent lookup operations result in * appropriate remote service registrations. The IRemoteCallable instances should correspond to <b>methods</b> within the * particular service interface class.</p> - * <p></p> - * <p>Note that the number of serviceInterfaceNames (i.e. the length of the given String[]) <b>must</b> be equal to + * <p> + * Note that the number of serviceInterfaceNames (i.e. the length of the given String[]) <b>must</b> be equal to * the number of rows of the remoteCallable two-dimensional array. </p> - * <p></p> * <p>For example, suppose we have a service interface "org.eclipse.ecf.IFoo": * <pre> * public interface IFoo { @@ -49,7 +48,8 @@ public interface IRemoteServiceClientContainerAdapter extends IRemoteServiceCont * IRemoteServiceRegistration reg = this.registerRemoteCallable(new String[] { "org.eclipse.ecf.IFoo" }, callables, null); * </pre> * - * @param remoteCallables the IRemoteCallables to register. Each IRemoteCallable represents a specific method->resourcePath mapping. + * @param serviceInterfaceNames service interface names + * @param remoteCallables the IRemoteCallables to register. Each IRemoteCallable represents a specific method to resourcePath mapping. * Must not be <code>null</code>. * @param properties any service properties to associate with the given registration. * @return IRemoteServiceRegistration to use to unregister the remote service. Will not be <code>null</code>. @@ -60,7 +60,7 @@ public interface IRemoteServiceClientContainerAdapter extends IRemoteServiceCont * Register remoteCallables for remote service client. This method allows providers to register {@link IRemoteCallable} * instances, so that subsequent lookup operations result in appropriate remote service registrations. * - * @param remoteCallables the IRemoteCallables to register. Each IRemoteCallable represents a specific method->resourcePath mapping. + * @param remoteCallables the IRemoteCallables to register. Each IRemoteCallable represents a specific method to resourcePath mapping. * Must not be <code>null</code>. * @param properties any service properties to associate with the given registration. * @return IRemoteServiceRegistration to use to unregister the remote service. Will not be <code>null</code>. diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameter.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameter.java index a2de7dc23..f5c0c33cd 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameter.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameter.java @@ -74,6 +74,8 @@ public class RemoteCallParameter implements IRemoteCallParameter { } /** + * @param param remote call parameter to add + * @return Builder the builder * @since 8.8 */ public Builder addParameter(IRemoteCallParameter param) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameterFactory.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameterFactory.java index 2dccc9cde..dfaee5de2 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameterFactory.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteCallParameterFactory.java @@ -47,7 +47,7 @@ public class RemoteCallParameterFactory { * The order given reflects in the order during call time, e.g. * - model object A will be serialized to the first element, B to the second, ... * Make sure to use a LinkedHashMap that preserves insertion order!!! - * @param nameValues + * @param nameValues name values map for remote call parameters * @return Map of params converted into a IRemoteCallParameter array */ public static IRemoteCallParameter[] createParameters(Map nameValues) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteServiceClientRegistry.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteServiceClientRegistry.java index 825da132b..d56be6592 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteServiceClientRegistry.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/RemoteServiceClientRegistry.java @@ -92,6 +92,13 @@ public class RemoteServiceClientRegistry implements Serializable { } /** + * @param target target + * @param idFilter id filter + * @param clazz the interface class to use for lookup + * @param filter a remote service filter to use to look for remote service references + * @return IRemoteServiceReference[] remote service references matching the given + * input params + * @throws ContainerConnectException if container cannot be connected * @since 5.0 */ public IRemoteServiceReference[] getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, IRemoteFilter filter) throws ContainerConnectException { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/StringParameterSerializer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/StringParameterSerializer.java index 0a1602b4d..c17ae276c 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/StringParameterSerializer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/StringParameterSerializer.java @@ -21,7 +21,13 @@ import org.eclipse.ecf.remoteservice.IRemoteCall; public class StringParameterSerializer extends AbstractParameterSerializer implements IRemoteCallParameterSerializer { /** - * @throws NotSerializableException + * @param uri uri + * @param call call + * @param callable callable + * @param paramDefault parameter default + * @param paramToSerialize the parameter to serialize + * @return IRemoteCallParameter created as result of serialization + * @throws NotSerializableException if input parameters cannot be serialized */ public IRemoteCallParameter serializeParameter(String uri, IRemoteCall call, IRemoteCallable callable, IRemoteCallParameter paramDefault, Object paramToSerialize) throws NotSerializableException { if (paramToSerialize == null) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/IRemoteServiceDistributionProvider.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/IRemoteServiceDistributionProvider.java index fff991e8d..0d90afb45 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/IRemoteServiceDistributionProvider.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/IRemoteServiceDistributionProvider.java @@ -35,7 +35,7 @@ public interface IRemoteServiceDistributionProvider { /** * Return any properties that are to be used when registering the ContainerTypeDescription * returned by above method. <code>Null</code> may be returned. - * @return Dictionary<String, ?> to use when registering the ContainerTypeDescription. + * @return Dictionary to use when registering the ContainerTypeDescription * May be <code>null</code>. */ Dictionary<String, ?> getContainerTypeDescriptionProperties(); @@ -53,7 +53,7 @@ public interface IRemoteServiceDistributionProvider { /** * Return any properties that are to be used when registering the Namespace * returned by above method. <code>Null</code> may be returned. - * @return Dictionary<String, ?> to use when registering this provider's Namespace. + * @return Dictionary to use when registering this provider's Namespace. * May be <code>null</code>. */ Dictionary<String, ?> getNamespaceProperties(); diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/RemoteServiceContainerInstantiator.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/RemoteServiceContainerInstantiator.java index 7159612c3..909056798 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/RemoteServiceContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/provider/RemoteServiceContainerInstantiator.java @@ -40,6 +40,8 @@ public abstract class RemoteServiceContainerInstantiator extends BaseContainerIn protected Map<String, List<String>> exporterConfigToImporterConfigs; /** + * @param exportingProvider exporting provider (e.g. server or service host) + * @param importingProvider importing provider (e.g. client or service client) * @since 8.9 */ protected RemoteServiceContainerInstantiator(String exportingProvider, String importingProvider) { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteCallMethod.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteCallMethod.java index c11e00af5..e0f8d0a38 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteCallMethod.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteCallMethod.java @@ -48,6 +48,9 @@ public class RemoteCallMethod extends RemoteCall implements IRemoteCall { } /** + * @param method method + * @param parameters parameters + * @throws NotSerializableException if given parameters cannot be serialized * @since 4.0 */ public void setParameters(Method method, Object[] parameters) throws NotSerializableException { diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteFilterImpl.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteFilterImpl.java index b6906d83e..aa48e2ba4 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteFilterImpl.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/RemoteFilterImpl.java @@ -35,7 +35,8 @@ public class RemoteFilterImpl implements IRemoteFilter { long rsId = 0; /** - * @param createFilter + * @param createFilter filter + * @throws InvalidSyntaxException if the createFilter is not of valid syntax */ public RemoteFilterImpl(String createFilter) throws InvalidSyntaxException { this(Activator.getDefault().getContext(), createFilter); @@ -59,6 +60,7 @@ public class RemoteFilterImpl implements IRemoteFilter { } /** + * @return long the remote service container relative id * @since 8.4 */ public long getRsId() { @@ -66,7 +68,9 @@ public class RemoteFilterImpl implements IRemoteFilter { } /** - * @param createFilter + * @param context bundle context + * @param createFilter filter + * @throws InvalidSyntaxException if given createFilter is not of valid filter syntax * @since 6.0 */ public RemoteFilterImpl(BundleContext context, String createFilter) throws InvalidSyntaxException { @@ -156,7 +160,8 @@ public class RemoteFilterImpl implements IRemoteFilter { } /** - * @see org.osgi.framework.Filter#matches(java.util.Map) + * @param map map + * @return boolean true if map matches this filter, false otherwise * @since 6.0 */ @SuppressWarnings("unchecked") diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.java index 545785252..64cce1c4b 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.java @@ -35,7 +35,7 @@ public class RemoteServiceTracker implements IRemoteServiceTrackerCustomizer { /** * IRemoteServiceContainerAdapter containerAdapter against which - * this <code>RemoteServiceTracker</code></code> is tracking. + * this <code>RemoteServiceTracker</code> is tracking. */ protected final IRemoteServiceContainerAdapter containerAdapter; /** @@ -96,15 +96,16 @@ public class RemoteServiceTracker implements IRemoteServiceTrackerCustomizer { private volatile IRemoteService cachedService; /** - * Create a <code>RemoteServiceTracker</code></code> on the specified + * Create a <code>RemoteServiceTracker</code> on the specified * <code>IRemoteServiceReference</code>. * * <p> * The remote service referenced by the specified <code>IRemoteServiceReference</code> - * object will be tracked by this <code>RemoteServiceTracker</code></code> object. + * object will be tracked by this <code>RemoteServiceTracker</code> object. * * @param containerAdapter <code>IRemoteServiceContainerAdapter</code> against which the * tracking is done. + * @param containerIDs container IDs * @param reference <code>IRemoteServiceReference</code> for the remote service * to be tracked. * @param customizer The customizer object to call when services are added, @@ -143,6 +144,7 @@ public class RemoteServiceTracker implements IRemoteServiceTrackerCustomizer { * * @param containerAdapter <code>BundleContext</code> object against which the * tracking is done. + * @param containerIDs container ids * @param clazz Class name of the services to be tracked. * @param customizer The customizer object to call when services are added, * modified, or removed in this <code>RemoteServiceTracker</code> object. @@ -268,7 +270,7 @@ public class RemoteServiceTracker implements IRemoteServiceTrackerCustomizer { * <code>IRemoteServiceTrackerCustomizer.addingService</code> method. * * <p> - * This method is only called when this <code>RemoteServiceTracker</code></code> object + * This method is only called when this <code>RemoteServiceTracker</code> object * has been constructed with a <code>null IRemoteServiceTrackerCustomizer</code> * argument. * @@ -285,7 +287,7 @@ public class RemoteServiceTracker implements IRemoteServiceTrackerCustomizer { * @param reference Reference to service being added to this * <code>RemoteServiceTracker</code> object. * @return The IRemoteService object to be tracked for the service added to this - * <code>RemoteServiceTracker</code></code> object. + * <code>RemoteServiceTracker</code> object. * @see IRemoteServiceTrackerCustomizer */ public IRemoteService addingService(IRemoteServiceReference reference) { |