diff options
author | slewis | 2016-03-12 01:50:15 +0000 |
---|---|---|
committer | slewis | 2016-03-12 01:50:15 +0000 |
commit | 37b90f840fbce66f3240b80698798885f6f162e2 (patch) | |
tree | 99593e7111a42e2911873cb5432c6ef7bd23c037 | |
parent | d5d525fe2b7a025097345d6c4199fa235dd20b78 (diff) | |
download | org.eclipse.ecf-37b90f840fbce66f3240b80698798885f6f162e2.tar.gz org.eclipse.ecf-37b90f840fbce66f3240b80698798885f6f162e2.tar.xz org.eclipse.ecf-37b90f840fbce66f3240b80698798885f6f162e2.zip |
Javadocs updates
Change-Id: I0f6ea74aa2c2402fa7f3f42c423e88ad84544c69
123 files changed, 1366 insertions, 791 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/AbstractDiscoveryContainerAdapter.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/AbstractDiscoveryContainerAdapter.java index c84bc936d..d67ec89c2 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/AbstractDiscoveryContainerAdapter.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/AbstractDiscoveryContainerAdapter.java @@ -21,28 +21,25 @@ import org.eclipse.ecf.discovery.identity.IServiceTypeID; import org.eclipse.ecf.internal.discovery.*; import org.eclipse.equinox.concurrent.future.*; -public abstract class AbstractDiscoveryContainerAdapter extends - AbstractContainer implements IDiscoveryLocator, IDiscoveryAdvertiser { +public abstract class AbstractDiscoveryContainerAdapter extends AbstractContainer + implements IDiscoveryLocator, IDiscoveryAdvertiser { /** - * Collection of service listeners i.e. Collection<IServiceListener>. NOTE: - * Access to this collection is synchronized, so subclasses should take this - * into account. + * Collection of service listeners. NOTE: Access to this collection is + * synchronized, so subclasses should take this into account. */ protected final Set allServiceListeners; private DiscoveryContainerConfig config; /** - * Map of service type to collection of service listeners i.e. - * <String,Collection<IServiceListener>>. NOTE: Access to this map is - * synchronized, so subclasses should take this into account. + * Map of service type to collection of service listeners. NOTE: Access to + * this map is synchronized, so subclasses should take this into account. */ protected final Map serviceListeners; protected final String servicesNamespaceName; /** - * Collection of service type listeners i.e. - * Collection<IServiceTypeListener>. NOTE: Access to this collection is + * Collection of service type listeners. NOTE: Access to this collection is * synchronized, so subclasses should take this into account. */ protected final Collection serviceTypeListeners; @@ -55,10 +52,11 @@ public abstract class AbstractDiscoveryContainerAdapter extends /** * @param aNamespaceName + * namespace name * @param aConfig + * discovery container config */ - public AbstractDiscoveryContainerAdapter(String aNamespaceName, - DiscoveryContainerConfig aConfig) { + public AbstractDiscoveryContainerAdapter(String aNamespaceName, DiscoveryContainerConfig aConfig) { servicesNamespaceName = aNamespaceName; Assert.isNotNull(servicesNamespaceName); config = aConfig; @@ -67,10 +65,8 @@ public abstract class AbstractDiscoveryContainerAdapter extends serviceListeners = Collections.synchronizedMap(new HashMap()); allServiceListeners = Collections.synchronizedSet(new HashSet()); - discoveryServiceListener = new DiscoveryServiceListener(this, - IServiceListener.class); - discoveryServiceTypeListener = new DiscoveryServiceListener(this, - IServiceTypeListener.class); + discoveryServiceListener = new DiscoveryServiceListener(this, IServiceListener.class); + discoveryServiceTypeListener = new DiscoveryServiceListener(this, IServiceTypeListener.class); discoveryServiceListenerComparator = new ServiceTypeComparator(); @@ -95,8 +91,7 @@ public abstract class AbstractDiscoveryContainerAdapter extends for (int i = 0; i < services.length; i++) { final IServiceInfo iServiceInfo = services[i]; - aListener.serviceDiscovered(getServiceEvent( - iServiceInfo, getConfig().getID())); + aListener.serviceDiscovered(getServiceEvent(iServiceInfo, getConfig().getID())); } allServiceListeners.add(aListener); return null; @@ -108,6 +103,11 @@ public abstract class AbstractDiscoveryContainerAdapter extends } /** + * @param iServiceInfo + * service info + * @param id + * id + * @return IServiceEvent created service event * @since 5.0 */ protected IServiceEvent getServiceEvent(IServiceInfo iServiceInfo, ID id) { @@ -122,8 +122,7 @@ public abstract class AbstractDiscoveryContainerAdapter extends * (org.eclipse.ecf.discovery.identity.IServiceTypeID, * org.eclipse.ecf.discovery.IServiceListener) */ - public void addServiceListener(final IServiceTypeID aType, - final IServiceListener aListener) { + public void addServiceListener(final IServiceTypeID aType, final IServiceListener aListener) { Assert.isNotNull(aListener); Assert.isNotNull(aType); @@ -135,8 +134,7 @@ public abstract class AbstractDiscoveryContainerAdapter extends for (int i = 0; i < services.length; i++) { final IServiceInfo iServiceInfo = services[i]; - aListener.serviceDiscovered(getServiceEvent( - iServiceInfo, getConfig().getID())); + aListener.serviceDiscovered(getServiceEvent(iServiceInfo, getConfig().getID())); } // Add the listener _after_ explicitly discovering services // to _reduce_ the chance of notifying the listener more @@ -155,8 +153,7 @@ public abstract class AbstractDiscoveryContainerAdapter extends } } - private void addServiceListener0(final IServiceTypeID aType, - final IServiceListener aListener) { + private void addServiceListener0(final IServiceTypeID aType, final IServiceListener aListener) { synchronized (serviceListeners) { // put-if-absent idiom race // condition Collection v = (Collection) serviceListeners.get(aType); @@ -171,9 +168,8 @@ public abstract class AbstractDiscoveryContainerAdapter extends /* * (non-Javadoc) * - * @see - * org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#addServiceTypeListener - * (org.eclipse.ecf.discovery.IServiceTypeListener) + * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter# + * addServiceTypeListener (org.eclipse.ecf.discovery.IServiceTypeListener) */ public void addServiceTypeListener(IServiceTypeListener aListener) { Assert.isNotNull(aListener); @@ -210,14 +206,12 @@ public abstract class AbstractDiscoveryContainerAdapter extends */ protected void fireServiceDiscovered(IServiceEvent aServiceEvent) { Assert.isNotNull(aServiceEvent); - final Collection listeners = getListeners(aServiceEvent - .getServiceInfo().getServiceID().getServiceTypeID()); + final Collection listeners = getListeners(aServiceEvent.getServiceInfo().getServiceID().getServiceTypeID()); if (listeners != null) { for (final Iterator i = listeners.iterator(); i.hasNext();) { final IServiceListener l = (IServiceListener) i.next(); l.serviceDiscovered(aServiceEvent); - Trace.trace(DiscoveryPlugin.PLUGIN_ID, - DiscoveryDebugOption.METHODS_TRACING, this.getClass(), + Trace.trace(DiscoveryPlugin.PLUGIN_ID, DiscoveryDebugOption.METHODS_TRACING, this.getClass(), "fireServiceDiscovered", aServiceEvent.toString()); //$NON-NLS-1$ } } @@ -240,8 +234,7 @@ public abstract class AbstractDiscoveryContainerAdapter extends for (final Iterator i = notify.iterator(); i.hasNext();) { final IServiceTypeListener l = (IServiceTypeListener) i.next(); l.serviceTypeDiscovered(aServiceTypeEvent); - Trace.trace(DiscoveryPlugin.PLUGIN_ID, - DiscoveryDebugOption.METHODS_TRACING, this.getClass(), + Trace.trace(DiscoveryPlugin.PLUGIN_ID, DiscoveryDebugOption.METHODS_TRACING, this.getClass(), "fireServiceTypeDiscovered", aServiceTypeEvent.toString()); //$NON-NLS-1$ } } @@ -255,14 +248,12 @@ public abstract class AbstractDiscoveryContainerAdapter extends */ protected void fireServiceUndiscovered(IServiceEvent aServiceEvent) { Assert.isNotNull(aServiceEvent); - final Collection listeners = getListeners(aServiceEvent - .getServiceInfo().getServiceID().getServiceTypeID()); + final Collection listeners = getListeners(aServiceEvent.getServiceInfo().getServiceID().getServiceTypeID()); if (listeners != null) { for (final Iterator i = listeners.iterator(); i.hasNext();) { final IServiceListener l = (IServiceListener) i.next(); l.serviceUndiscovered(aServiceEvent); - Trace.trace(DiscoveryPlugin.PLUGIN_ID, - DiscoveryDebugOption.METHODS_TRACING, this.getClass(), + Trace.trace(DiscoveryPlugin.PLUGIN_ID, DiscoveryDebugOption.METHODS_TRACING, this.getClass(), "fireServiceUndiscovered", aServiceEvent.toString()); //$NON-NLS-1$ } } @@ -321,14 +312,11 @@ public abstract class AbstractDiscoveryContainerAdapter extends Assert.isNotNull(aServiceType); Collection listeners = new HashSet(); synchronized (serviceListeners) { - for (Iterator itr = serviceListeners.keySet().iterator(); itr - .hasNext();) { + for (Iterator itr = serviceListeners.keySet().iterator(); itr.hasNext();) { final IServiceTypeID typeID = (IServiceTypeID) itr.next(); - int compare = discoveryServiceListenerComparator.compare( - aServiceType, typeID); + int compare = discoveryServiceListenerComparator.compare(aServiceType, typeID); if (compare == 0) { - Collection collection = (Collection) serviceListeners - .get(typeID); + Collection collection = (Collection) serviceListeners.get(typeID); if (collection != null) { listeners.addAll(collection); } @@ -355,9 +343,8 @@ public abstract class AbstractDiscoveryContainerAdapter extends /* * (non-Javadoc) * - * @see - * org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#removeServiceListener - * (org.eclipse.ecf.discovery.IServiceListener) + * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter# + * removeServiceListener (org.eclipse.ecf.discovery.IServiceListener) */ public void removeServiceListener(IServiceListener aListener) { Assert.isNotNull(aListener); @@ -367,13 +354,11 @@ public abstract class AbstractDiscoveryContainerAdapter extends /* * (non-Javadoc) * - * @see - * org.eclipse.ecf.discovery.IDiscoveryContainerAdapter#removeServiceListener - * (org.eclipse.ecf.discovery.identity.IServiceTypeID, + * @see org.eclipse.ecf.discovery.IDiscoveryContainerAdapter# + * removeServiceListener (org.eclipse.ecf.discovery.identity.IServiceTypeID, * org.eclipse.ecf.discovery.IServiceListener) */ - public void removeServiceListener(IServiceTypeID aType, - IServiceListener aListener) { + public void removeServiceListener(IServiceTypeID aType, IServiceListener aListener) { Assert.isNotNull(aListener); Assert.isNotNull(aType); synchronized (serviceListeners) { diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/DiscoveryContainerConfig.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/DiscoveryContainerConfig.java index f7975e7f5..b09bb9c13 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/DiscoveryContainerConfig.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/DiscoveryContainerConfig.java @@ -18,12 +18,15 @@ public class DiscoveryContainerConfig { /** * @param anID + * an ID */ public DiscoveryContainerConfig(ID anID) { id = anID; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.eclipse.ecf.discovery.IContainerConfig#getID() */ public ID getID() { diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java index 3083e56ed..9d2bfe2b1 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java @@ -17,8 +17,8 @@ import org.eclipse.ecf.discovery.identity.IServiceID; * Service information contract. Defines the information associated with a * remotely discoverable service * - * @see "http://www.dns-sd.org/ServiceTypes.html" - * @see "http://www.ietf.org/rfc/rfc2782.txt" + * see http://www.dns-sd.org/ServiceTypes.html and + * http://www.ietf.org/rfc/rfc2782.txt * */ public interface IServiceInfo extends IAdaptable { @@ -32,15 +32,18 @@ public interface IServiceInfo extends IAdaptable { /** * Get ServiceID for service. * - * @return ServiceID the serviceID for the service. Will not be <code>null</code>. + * @return ServiceID the serviceID for the service. Will not be + * <code>null</code>. */ public IServiceID getServiceID(); /** * The priority for the service * - * Priority: The priority of this target host. A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; - * target hosts with the same priority SHOULD be tried in an order defined by the weight field. + * Priority: The priority of this target host. A client MUST attempt to + * contact the target host with the lowest-numbered priority it can reach; + * target hosts with the same priority SHOULD be tried in an order defined + * by the weight field. * * @return int the priority. 0 if no priority information for service. */ @@ -49,10 +52,12 @@ public interface IServiceInfo extends IAdaptable { /** * The weight for the service. 0 if no weight information for service. * - * Weight: A server selection mechanism. The weight field specifies a relative weight for entries with the same priority. - * Larger weights SHOULD be given a proportionately higher probability of being selected. - * Domain administrators SHOULD use Weight 0 when there isn't any server selection to do. - * In the presence of records containing weights greater than 0, records with weight 0 should have a very small chance of being selected. + * Weight: A server selection mechanism. The weight field specifies a + * relative weight for entries with the same priority. Larger weights SHOULD + * be given a proportionately higher probability of being selected. Domain + * administrators SHOULD use Weight 0 when there isn't any server selection + * to do. In the presence of records containing weights greater than 0, + * records with weight 0 should have a very small chance of being selected. * * @return int the weight */ @@ -72,10 +77,11 @@ public interface IServiceInfo extends IAdaptable { * Map with any/all properties associated with the service. Properties are * assumed to be name/value pairs, both of type String. * - * @return Map the properties associated with this service. Will not be <code>null</code>. + * @return Map the properties associated with this service. Will not be + * <code>null</code>. */ public IServiceProperties getServiceProperties(); - + /** * A user choose label used for pretty printing this service. * diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java index 3810e61fc..73b670a7e 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java @@ -13,13 +13,11 @@ package org.eclipse.ecf.discovery; * Listener for receiving service events * * <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: @@ -32,8 +30,8 @@ package org.eclipse.ecf.discovery; * }); * </pre> * - * Further, the code in the implementations of these methods should <b>not block</b> - * via I/O operations or blocking UI calls. + * Further, the code in the implementations of these methods should <b>not + * block</b> via I/O operations or blocking UI calls. */ public interface IServiceListener { @@ -45,18 +43,21 @@ public interface IServiceListener { * {@link IServiceEvent} will be fired asynchronously. */ public boolean triggerDiscovery(); - + /** - * Notification that a service has been discovered (the service is fully resolved). + * Notification that a service has been discovered (the service is fully + * resolved). * - * @param anEvent Will not be <code>null</code> + * @param anEvent + * Will not be <code>null</code> */ public void serviceDiscovered(IServiceEvent anEvent); /** * Notification that a previously discovered service has been undiscovered. * - * @param anEvent Will not be <code>null</code> + * @param anEvent + * Will not be <code>null</code> */ public void serviceUndiscovered(IServiceEvent anEvent); } diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java index 4c469d1cf..bccb57e7e 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java @@ -12,13 +12,11 @@ package org.eclipse.ecf.discovery; /** * Listener for service type notifications * <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: @@ -31,15 +29,16 @@ package org.eclipse.ecf.discovery; * }); * </pre> * - * Further, the code in the implementations of these methods should <b>not block</b> - * via I/O operations or blocking UI calls. + * Further, the code in the implementations of these methods should <b>not + * block</b> via I/O operations or blocking UI calls. */ public interface IServiceTypeListener { /** * Notification that a service type has been discovered * - * @param event Must not be <code>null</code>. + * @param event + * Must not be <code>null</code>. */ public void serviceTypeDiscovered(IServiceTypeEvent event); } diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java index 5c91bc06e..3ace71000 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java @@ -9,15 +9,12 @@ package org.eclipse.ecf.discovery; -import org.eclipse.ecf.discovery.identity.ServiceID; - import java.io.Serializable; import java.net.URI; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.ecf.core.identity.Namespace; -import org.eclipse.ecf.discovery.identity.IServiceID; -import org.eclipse.ecf.discovery.identity.IServiceTypeID; +import org.eclipse.ecf.discovery.identity.*; import org.eclipse.ecf.internal.discovery.DiscoveryPlugin; /** @@ -48,7 +45,7 @@ public class ServiceInfo implements IServiceInfo, Serializable { protected int weight; protected IServiceProperties properties; - + /** * @since 4.0 */ @@ -59,49 +56,105 @@ public class ServiceInfo implements IServiceInfo, Serializable { } /** + * Create an IServiceInfo instance. + * + * @param anURI + * The (absolute) location of the service. + * @param aServiceName + * a user chosen service name. Only ASCII characters are allowed. + * @param aServiceTypeID + * the service type identifier. * @since 3.0 - * @see ServiceInfo#ServiceInfo(URI, String, IServiceTypeID, int, int, IServiceProperties) */ public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID) { this(anURI, aServiceName, aServiceTypeID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, null); } - + /** + * Create an IServiceInfo instance. + * + * @param anURI + * The (absolute) location of the service. + * @param aServiceName + * a user chosen service name. Only ASCII characters are allowed. + * @param aServiceTypeID + * the service type identifier. + * @param props + * generic service properties. * @since 3.0 - * @see ServiceInfo#ServiceInfo(URI, String, IServiceTypeID, int, int, IServiceProperties) */ public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID, IServiceProperties props) { this(anURI, aServiceName, aServiceTypeID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, props); } - /** + * Create an IServiceInfo instance. + * + * @param anURI + * The (absolute) location of the service. + * @param aServiceName + * a user chosen service name. Only ASCII characters are allowed. + * @param aServiceTypeID + * the service type identifier. + * @param priority + * the service priority. The priority of this target host. A + * client MUST attempt to contact the target host with the + * lowest-numbered priority it can reach; target hosts with the + * same priority SHOULD be tried in an order defined by the + * weight field. + * + * @param weight + * the service weight. A server selection mechanism. The weight + * field specifies a relative weight for entries with the same + * priority. Larger weights SHOULD be given a proportionately + * higher probability of being selected. Domain administrators + * SHOULD use Weight 0 when there isn't any server selection to + * do. In the presence of records containing weights greater than + * 0, records with weight 0 should have a very small chance of + * being selected. + * @param props + * generic service properties. * @since 3.0 - * @see ServiceInfo#ServiceInfo(URI, String, IServiceTypeID, int, int, IServiceProperties) */ - public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID, int priority, - int weight, IServiceProperties props) { + public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID, int priority, int weight, + IServiceProperties props) { this(anURI, aServiceName, aServiceTypeID, priority, weight, props, DEFAULT_TTL); } + /** * Create an IServiceInfo instance. - * @param anURI The (absolute) location of the service. - * @param aServiceName a user chosen service name. Only ASCII characters are allowed. - * @param aServiceTypeID the service type identifier. - * @param priority the service priority. The priority of this target host. A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; - * target hosts with the same priority SHOULD be tried in an order defined by the weight field. + * + * @param anURI + * The (absolute) location of the service. + * @param aServiceName + * a user chosen service name. Only ASCII characters are allowed. + * @param aServiceTypeID + * the service type identifier. + * @param priority + * the service priority. The priority of this target host. A + * client MUST attempt to contact the target host with the + * lowest-numbered priority it can reach; target hosts with the + * same priority SHOULD be tried in an order defined by the + * weight field. * - * @param weight the service weight. A server selection mechanism. The weight field specifies a relative weight for entries with the same priority. - * Larger weights SHOULD be given a proportionately higher probability of being selected. - * Domain administrators SHOULD use Weight 0 when there isn't any server selection to do. - * In the presence of records containing weights greater than 0, records with weight 0 should have a very small chance of being selected. - * @param props generic service properties. - * @param ttl time to live + * @param weight + * the service weight. A server selection mechanism. The weight + * field specifies a relative weight for entries with the same + * priority. Larger weights SHOULD be given a proportionately + * higher probability of being selected. Domain administrators + * SHOULD use Weight 0 when there isn't any server selection to + * do. In the presence of records containing weights greater than + * 0, records with weight 0 should have a very small chance of + * being selected. + * @param props + * generic service properties. + * @param ttl + * time to live * * @since 4.0 */ - public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID, int priority, - int weight, IServiceProperties props, long ttl) { + public ServiceInfo(URI anURI, String aServiceName, IServiceTypeID aServiceTypeID, int priority, int weight, + IServiceProperties props, long ttl) { Assert.isNotNull(anURI); Assert.isNotNull(aServiceName); Assert.isNotNull(aServiceTypeID); @@ -157,19 +210,19 @@ public class ServiceInfo implements IServiceInfo, Serializable { fragment = "#" + fragment; } URI uri = URI.create(scheme + "://" + userInfo + host + ":" + port + path + query + fragment); - + // service id Namespace ns = aServiceTypeID.getNamespace(); - this.serviceID = (IServiceID) ns.createInstance(new Object[]{aServiceTypeID, uri}); + this.serviceID = (IServiceID) ns.createInstance(new Object[] { aServiceTypeID, uri }); ((ServiceID) serviceID).setServiceInfo(this); - + this.serviceName = aServiceName; - + this.weight = weight; this.priority = priority; - + properties = (props == null) ? new ServiceProperties() : props; - + this.timeToLive = ttl; } @@ -226,9 +279,11 @@ public class ServiceInfo implements IServiceInfo, Serializable { public String toString() { final StringBuffer buf = new StringBuffer("ServiceInfo["); //$NON-NLS-1$ buf.append("uri=").append(getLocation()).append(";id=").append(serviceID) //$NON-NLS-1$ //$NON-NLS-2$ - .append(";priority=").append( //$NON-NLS-1$ - priority).append(";weight=").append(weight).append( //$NON-NLS-1$ - ";props=").append(properties).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ + .append(";priority=") //$NON-NLS-1$ + .append(priority).append(";weight=").append(weight) //$NON-NLS-1$ + .append( + ";props=") + .append(properties).append("]"); //$NON-NLS-1$ return buf.toString(); } @@ -241,8 +296,7 @@ public class ServiceInfo implements IServiceInfo, Serializable { if (adapter.isInstance(this)) { return this; } - final IAdapterManager adapterManager = DiscoveryPlugin.getDefault() - .getAdapterManager(); + final IAdapterManager adapterManager = DiscoveryPlugin.getDefault().getAdapterManager(); if (adapterManager == null) return null; return adapterManager.loadAdapter(this, adapter.getName()); @@ -250,15 +304,17 @@ public class ServiceInfo implements IServiceInfo, Serializable { /** * (non-Javadoc) - * @see org.eclipse.ecf.discovery.IServiceInfo#getServiceName() + * + * @see org.eclipse.ecf.discovery.IServiceInfo#getServiceName() * @since 3.0 */ public String getServiceName() { return serviceName; } - + /** * (non-Javadoc) + * * @see org.eclipse.ecf.discovery.IServiceInfo#getTTL() * @since 4.0 */ diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceProperties.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceProperties.java index 43c32945f..352df0006 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceProperties.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceProperties.java @@ -35,6 +35,7 @@ public class ServiceProperties implements IServiceProperties { * Creates a copy of the given {@link IServiceProperties} * * @param sp + * service properties * @since 2.1 */ public ServiceProperties(IServiceProperties sp) { diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/IServiceID.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/IServiceID.java index c013b2188..f363b2206 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/IServiceID.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/IServiceID.java @@ -11,11 +11,9 @@ package org.eclipse.ecf.discovery.identity; -import org.eclipse.ecf.discovery.IServiceInfo; - import java.net.URI; - import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.discovery.IServiceInfo; /** * Service identity contract. @@ -24,19 +22,21 @@ public interface IServiceID extends ID { /** * Get service type ID for this ID. - * @return IServiceTypeID. Will not be <code>null</code>. + * + * @return IServiceTypeID. Will not be <code>null</code>. */ public IServiceTypeID getServiceTypeID(); /** - * Get service name for this ID. + * Get service name for this ID. * - * @return String service name. May be <code>null</code>. + * @return String service name. May be <code>null</code>. * @deprecated Use {@link IServiceInfo#getServiceName()} instead */ public String getServiceName(); - + /** + * @return URI the location for this serviceID * @since 3.0 */ public URI getLocation(); diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceID.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceID.java index 6dd17c271..7466c048f 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceID.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceID.java @@ -35,6 +35,12 @@ public class ServiceID extends BaseID implements IServiceID { protected URI location; /** + * @param namespace + * namespace should not be <code>null</code> + * @param type + * service type ID should not be <code>null</code> + * @param anURI + * uri for service location should not be <code>null</code> * @since 3.0 */ protected ServiceID(Namespace namespace, IServiceTypeID type, URI anURI) { @@ -136,9 +142,8 @@ public class ServiceID extends BaseID implements IServiceID { */ public String toString() { final StringBuffer buf = new StringBuffer("ServiceID["); //$NON-NLS-1$ - buf - .append("type=").append(type).append(";location=").append(getLocation()).append( //$NON-NLS-1$ //$NON-NLS-2$ - ";full=" + getFullyQualifiedName()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("type=").append(type).append(";location=").append(getLocation()).append( //$NON-NLS-1$ //$NON-NLS-2$ + ";full=" + getFullyQualifiedName()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ return buf.toString(); } @@ -177,8 +182,7 @@ public class ServiceID extends BaseID implements IServiceID { public int hashCode() { final int prime = 31; int result = super.hashCode(); - result = prime * result - + ((location == null) ? 0 : location.hashCode()); + result = prime * result + ((location == null) ? 0 : location.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); return result; } diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceTypeID.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceTypeID.java index 09a2be666..3dfecbc7b 100644 --- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceTypeID.java +++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/identity/ServiceTypeID.java @@ -35,8 +35,8 @@ public class ServiceTypeID extends BaseID implements IServiceTypeID { super(namespace); } - protected ServiceTypeID(Namespace namespace, String[] services, - String[] scopes, String[] protocols, String namingAuthority) { + protected ServiceTypeID(Namespace namespace, String[] services, String[] scopes, String[] protocols, + String namingAuthority) { super(namespace); Assert.isNotNull(services); this.services = services; @@ -51,8 +51,7 @@ public class ServiceTypeID extends BaseID implements IServiceTypeID { } protected ServiceTypeID(Namespace ns, IServiceTypeID id) { - this(ns, id.getServices(), id.getScopes(), id.getProtocols(), id - .getNamingAuthority()); + this(ns, id.getServices(), id.getScopes(), id.getProtocols(), id.getNamingAuthority()); } /** @@ -60,7 +59,9 @@ public class ServiceTypeID extends BaseID implements IServiceTypeID { * and/or {@link ServiceIDFactory} instead. * * @param namespace + * namespace should not be <code>null</code> * @param aType + * type should not be <code>null</code> */ public ServiceTypeID(Namespace namespace, String aType) { this(namespace); @@ -88,8 +89,7 @@ public class ServiceTypeID extends BaseID implements IServiceTypeID { // protocol and scope String string = split[--offset]; - String[] protoAndScope = StringUtils.split(string, - ".", string.indexOf(".") - 1); //$NON-NLS-1$ //$NON-NLS-2$ + String[] protoAndScope = StringUtils.split(string, ".", string.indexOf(".") - 1); //$NON-NLS-1$ //$NON-NLS-2$ this.protocols = new String[] { protoAndScope[0] }; this.scopes = new String[] { protoAndScope[1] }; diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java index 374eaf211..259af1fa2 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java @@ -56,6 +56,7 @@ public class FileTransferJob extends Job { } /** + * @param fileTransfer file transfer instance * @since 3.0 */ public final void setFileTransfer(IFileTransfer fileTransfer) { diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java index 30d381aff..2a55a5b3f 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java @@ -34,7 +34,7 @@ public interface IFileRangeSpecification { * Get the end position of transfer range. The position is in bytes, and byte 0 is the first byte * of the file, N-1 is the last position in the file, where N is the length of the file in bytes. * @return the position in the file (in bytes) to indicate the end of range to retrieve. If equal to -1, - * then this means that no end position is specified, and the download will continue to the end of file. If >= 0, + * then this means that no end position is specified, and the download will continue to the end of file. If gt or eq 0, * but less than the {@link #getStartPosition()} then this range specification is invalid. If greater than or * equal to N (where N is length of the file in bytes), then the remaining part of the given file will * be downloaded. If both {@link #getStartPosition()} and {@link #getEndPosition()} are valid, then diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java index 69434cc3f..a1be76d95 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java @@ -56,7 +56,7 @@ public interface IFileTransfer extends IAdaptable, IIdentifiable { * completed unsuccessfully (some exception occurred), then * {@link #isDone()} will return true, and this method will return a * non-null Exception instance that occurred. - * <p></p> + * <p> * If the the file transfer was canceled by the user, then the exception * returned will be an instance of {@link UserCancelledException}. * @@ -86,6 +86,7 @@ public interface IFileTransfer extends IAdaptable, IIdentifiable { * -1 will be returned. Note that if a {@link IFileRangeSpecification} is provided that the returned * file length is the expected file length of just the range retrieved (and not the entire file). * + *@return long file length * @since 2.0 */ public long getFileLength(); diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java index 29a4f6a62..3687b9ab4 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java @@ -17,13 +17,11 @@ import org.eclipse.ecf.filetransfer.events.IFileTransferEvent; * to have this method called asynchronously by an arbitrary thread. * * <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.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java index eabc4418e..f1d573746 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java @@ -32,14 +32,14 @@ public interface IFileTransferPausable { * successfully paused. Returns false if the implementing file transfer * cannot be paused, or transfer has already completed. * - * @return true if file transfer successfully paused. False if cannot be + * @return boolean true if file transfer successfully paused. False if cannot be * paused, or the transfer has already completed */ public boolean pause(); /** * - * @return true if file transfer paused, false if not paused + * @return boolean true if file transfer paused, false if not paused */ public boolean isPaused(); @@ -48,6 +48,7 @@ public interface IFileTransferPausable { * then returns true. If the associated IFileShare is not already paused, or * has already completed then this method returns false. * + * @return boolean true if transfer is successfully resumed, false otherwise */ public boolean resume(); } diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java index 8a26db2b9..057ee3d0d 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java @@ -36,6 +36,7 @@ public interface IRemoteFileSystemBrowserContainerAdapter extends IAdaptable { * @param listener the listener that will be notified asynchronously when a response to this request is received. Must not be * <code>null</code>. * @return IRemoteFileSystemRequest the request instance. + * @throws RemoteFileSystemException if browse request cannot be accomplished */ public IRemoteFileSystemRequest sendBrowseRequest(IFileID directoryOrFileID, IRemoteFileSystemListener listener) throws RemoteFileSystemException; diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java index 23c50997e..57bd8e779 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java @@ -17,13 +17,11 @@ import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemEvent; * Listener for handling events associated with remote file * browsing activities. * <p> - * </p> * Note this method 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.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java index 6a4496320..9655ae9fb 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java @@ -64,6 +64,10 @@ public class IncomingFileTransferException extends ECFException { } /** + * @param message message + * @param cause cause + * @param errorCode errorCode + * @param responseHeaders responseHeaders * @since 4.0 */ public IncomingFileTransferException(String message, Throwable cause, int errorCode, Map responseHeaders) { @@ -73,6 +77,9 @@ public class IncomingFileTransferException extends ECFException { } /** + * @param message message + * @param errorCode errorCode + * @param responseHeaders responseHeaders * @since 4.0 */ public IncomingFileTransferException(String message, int errorCode, Map responseHeaders) { @@ -82,6 +89,9 @@ public class IncomingFileTransferException extends ECFException { } /** + * @param cause cause + * @param errorCode errorCode + * @param responseHeaders responseHeaders * @since 4.0 */ public IncomingFileTransferException(Throwable cause, int errorCode, Map responseHeaders) { @@ -96,6 +106,7 @@ public class IncomingFileTransferException extends ECFException { /** * @since 4.0 + * @return Map response headers */ public Map getResponseHeaders() { return responseHeaders; diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java index 333ac5f9a..b67cb44bc 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java @@ -23,7 +23,7 @@ public class InvalidFileRangeSpecificationException extends IncomingFileTransfer private IFileRangeSpecification rangeSpec = null; /** - * + * @param rangeSpec rangeSpec */ public InvalidFileRangeSpecificationException(IFileRangeSpecification rangeSpec) { super(); @@ -31,7 +31,8 @@ public class InvalidFileRangeSpecificationException extends IncomingFileTransfer } /** - * @param status + * @param status status + * @param rangeSpec range spec */ public InvalidFileRangeSpecificationException(IStatus status, IFileRangeSpecification rangeSpec) { super(status); @@ -39,8 +40,9 @@ public class InvalidFileRangeSpecificationException extends IncomingFileTransfer } /** - * @param message - * @param cause + * @param message message + * @param cause cause + * @param rangeSpec range spec */ public InvalidFileRangeSpecificationException(String message, Throwable cause, IFileRangeSpecification rangeSpec) { super(message, cause); @@ -48,7 +50,8 @@ public class InvalidFileRangeSpecificationException extends IncomingFileTransfer } /** - * @param message + * @param message message + * @param rangeSpec range spec */ public InvalidFileRangeSpecificationException(String message, IFileRangeSpecification rangeSpec) { super(message); @@ -56,7 +59,8 @@ public class InvalidFileRangeSpecificationException extends IncomingFileTransfer } /** - * @param cause + * @param cause cause + * @param rangeSpec range spec */ public InvalidFileRangeSpecificationException(Throwable cause, IFileRangeSpecification rangeSpec) { super(cause); diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java index 8c5481e0d..492672659 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java @@ -29,29 +29,29 @@ public class RemoteFileSystemException extends ECFException { } /** - * @param status + * @param status status */ public RemoteFileSystemException(IStatus status) { super(status); } /** - * @param message - * @param cause + * @param message message + * @param cause cause */ public RemoteFileSystemException(String message, Throwable cause) { super(message, cause); } /** - * @param message + * @param message message */ public RemoteFileSystemException(String message) { super(message); } /** - * @param cause + * @param cause cause */ public RemoteFileSystemException(Throwable cause) { super(cause); diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java index 24773a869..f9124485f 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java @@ -23,7 +23,7 @@ public interface IIncomingFileTransferReceiveDoneEvent extends IIncomingFileTran * <code>null</code>. If the file transfer completed unsuccessfully (some * exception occurred), then this method will return a non-<code>null</code> * Exception instance that occurred. - * <p></p> + * <p> * If the the file transfer was canceled by the user, then the exception * returned will be an instance of {@link UserCancelledException}. * diff --git a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java index c7a952e36..2b421a5ec 100644 --- a/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java +++ b/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java @@ -34,7 +34,7 @@ public interface ISocketConnectedEvent extends ISocketEvent { * {@link #getSocket()} will be the same. * Otherwise {@link #getSocket()} will return the passed in socket. * </p> - * @param socket + * @param socket socket */ void setSocket(Socket socket); } diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java index f2a5f483e..fa91ca875 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java @@ -139,6 +139,7 @@ public class ProviderPlugin implements BundleActivator { /** * Returns the shared instance. + * @return ProviderPlugin default instance */ public synchronized static ProviderPlugin getDefault() { if (plugin == null) { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/AsynchMessage.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/AsynchMessage.java index 98ab059e0..016d91027 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/AsynchMessage.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/AsynchMessage.java @@ -25,6 +25,7 @@ public class AsynchMessage implements Serializable { } /** + * @param data data for message * @since 4.3 */ public AsynchMessage(Serializable data) { @@ -32,6 +33,7 @@ public class AsynchMessage implements Serializable { } /** + * @return Serializable data from this message * @since 4.3 */ public Serializable getData() { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java index cec28cd0f..53ca8a534 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java @@ -162,6 +162,10 @@ public final class Client implements ISynchAsynchConnection { } /** + * @param remote remote URI + * @param timeout timeout + * @return Socket the created socket + * @throws ECFException if socket cannot be created for input parameters * @since 4.4 */ protected Socket createConnectSocket(URI remote, int timeout) throws ECFException { @@ -177,6 +181,9 @@ public final class Client implements ISynchAsynchConnection { } /** + * @param remote the remtoe ID + * @return URI the parsed remote ID + * @throws ECFException if remote ID cannot be parsed * @since 4.4 */ protected URI parseRemoteID(ID remote) throws ECFException { @@ -543,6 +550,7 @@ public final class Client implements ISynchAsynchConnection { } /** + * @return Object the output stream lock * @since 4.6 */ public Object getOutputStreamLock() { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java index 5605b289a..c0aedab2b 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Server.java @@ -36,6 +36,12 @@ public class Server extends ServerSocket { } /** + * @param group thread group for created threads + * @param port port + * @param backlog backlog + * @param bindAddress a bindAddress + * @param handler the socket accept handler + * @throws IOException if server setup cannot be done * @since 4.4 */ public Server(ThreadGroup group, int port, int backlog, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException { @@ -49,6 +55,11 @@ public class Server extends ServerSocket { } /** + * @param group thread group for created threads + * @param port port + * @param bindAddress a bindAddress + * @param handler the socket accept handler + * @throws IOException if server setup cannot be done * @since 4.4 */ public Server(ThreadGroup group, int port, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException { @@ -56,6 +67,11 @@ public class Server extends ServerSocket { } /** + * @param group thread group for created threads + * @param port port + * @param backlog backlog + * @param handler the socket accept handler + * @throws IOException if server setup cannot be done * @since 4.4 */ public Server(ThreadGroup group, int port, int backlog, ISocketAcceptHandler handler) throws IOException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SocketFactory.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SocketFactory.java index ef9f8bfa6..b68ed01a6 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SocketFactory.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SocketFactory.java @@ -35,6 +35,11 @@ public class SocketFactory implements IClientSocketFactory, IServerSocketFactory } /** + * @param port port + * @param backlog backlog + * @param bindAddress bindAddress + * @return ServerSocket server socket created + * @throws IOException if server socket cannot be created * @since 4.4 */ public ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress) throws IOException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SynchMessage.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SynchMessage.java index 5b6b78f4c..1339e0d84 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SynchMessage.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/SynchMessage.java @@ -17,6 +17,7 @@ public class SynchMessage extends AsynchMessage { private static final long serialVersionUID = 3906091152452434226L; /** + * @param data data * @since 4.3 */ public SynchMessage(Serializable data) { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java index c424edafc..daa18c39a 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java @@ -270,9 +270,9 @@ public abstract class ClientSOContainer extends SOContainer implements ISharedOb } /** - * @param from - * @param excluding - * @param data + * @param from from + * @param excluding excluding + * @param data data * @throws IOException not thrown by this implementation. */ protected void forwardExcluding(ID from, ID excluding, ContainerMessage data) throws IOException { @@ -311,10 +311,10 @@ public abstract class ClientSOContainer extends SOContainer implements ISharedOb } /** - * @param from - * @param excluding - * @param msg - * @param data + * @param from from + * @param excluding excluding + * @param msg msg + * @param data data * @throws IOException not thrown by this implementation. */ protected void forwardExcluding(ID from, ID excluding, byte msg, Serializable data) throws IOException { @@ -322,9 +322,9 @@ public abstract class ClientSOContainer extends SOContainer implements ISharedOb } /** - * @param from - * @param to - * @param message + * @param from from + * @param to to + * @param message message * @throws IOException not thrown by this implementation. */ protected void forwardToRemote(ID from, ID to, ContainerMessage message) throws IOException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java index 5610c659b..32650c77b 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java @@ -108,6 +108,7 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe } /** + * @return InetAddress the bind address. May be <code>null</code> * @since 4.5 */ public InetAddress getBindAddress() { @@ -116,6 +117,9 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe } /** + * @param args arguments + * @return GenericContainerArgs the client args created + * @throws IDCreateException if the client args cannot be retrieved from given args * @since 3.0 */ protected GenericContainerArgs getClientArgs(Object[] args) throws IDCreateException { @@ -155,6 +159,9 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe } /** + * @param args arguments + * @return GenericContainerArgs the server args created + * @throws IDCreateException if the server args cannot be retrieved from given args * @since 3.0 */ protected GenericContainerArgs getServerArgs(Object[] args) throws IDCreateException { @@ -269,6 +276,9 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe } /** + * @param gcargs the generic container args + * @return IContainer the created container + * @throws Exception if something goes wrong * @since 4.5 */ protected IContainer createClientContainer(GenericContainerArgs gcargs) throws Exception { @@ -276,6 +286,9 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe } /** + * @param gcargs the generic container args + * @return IContainer the created container + * @throws Exception if something goes wrong * @since 4.5 */ protected IContainer createServerContainer(GenericContainerArgs gcargs) throws Exception { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java index 311125db2..a91051e64 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java @@ -179,6 +179,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @return ISharedObjectMessageSerializer the shared object message serializer * @since 2.0 */ protected ISharedObjectMessageSerializer getSharedObjectMessageSerializer() { @@ -438,8 +439,8 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb abstract protected void forwardToRemote(ID from, ID to, ContainerMessage data) throws IOException; /** - * @param sd - * @return Object [] + * @param sd shared object description + * @return Object[] arguments from the shared object description properties */ protected Object[] getArgsFromProperties(SharedObjectDescription sd) { if (sd == null) @@ -459,8 +460,8 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param sd - * @return String [] + * @param sd shared object description + * @return String[] arguments types from shared object description properties */ protected String[] getArgTypesFromProperties(SharedObjectDescription sd) { if (sd == null) @@ -494,8 +495,8 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param sd - * @return ClassLoader + * @param sd shared object description + * @return ClassLoader classloader to used for given shared object description */ protected ClassLoader getClassLoaderForSharedObject(SharedObjectDescription sd) { return getClassLoaderForContainer(); @@ -545,6 +546,8 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @param message message + * @param t exception to print to system error * @since 2.0 */ protected static void printToSystemError(String message, Throwable t) { @@ -561,6 +564,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @return ISynchAsyncEventHandler message receiver * @since 4.7 */ public ISynchAsynchEventHandler getMessageReceiver() { @@ -659,11 +663,13 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param mess + * @param mess leave group message */ protected abstract void handleLeaveGroupMessage(ContainerMessage mess); /** + * @param containerID containerID + * @return boolean true if verified, false otherwise * @since 4.0 */ protected boolean verifySharedObjectMessageTarget(ID containerID) { @@ -735,6 +741,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @param resp response message * @since 4.0 */ protected void handleUndeliveredSharedObjectMessage(SharedObjectMessage resp) { @@ -742,7 +749,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param mess + * @param mess message * @throws IOException not thrown by this implementation. */ protected void handleUnidentifiedMessage(ContainerMessage mess) throws IOException { @@ -767,9 +774,9 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param id - * @param obj - * @param props + * @param id id + * @param obj obj + * @param props props * @return SOConfig a non-<code>null</code> instance. * @throws ECFException not thrown by this implementation. */ @@ -850,7 +857,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param event + * @param event event * @throws IOException not thrown by this implementation. */ protected void processAsynch(AsynchEvent event) throws IOException { @@ -985,6 +992,10 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @param sharedObjectID shared object ID + * @param message message + * @return byte[] serialized message + * @throws IOException if some problem serializing * @since 2.0 */ protected byte[] defaultSerializeSharedObjectMessage(ID sharedObjectID, Object message) throws IOException { @@ -998,6 +1009,10 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** + * @param bytes data to deserialized + * @return Object the deserialized shared object message + * @throws IOException if deserialization cannot be done + * @throws ClassNotFoundException if deserialization cannot be done * @since 2.0 */ protected Object defaultDeserializeSharedObjectMessage(byte[] bytes) throws IOException, ClassNotFoundException { @@ -1058,7 +1073,7 @@ public abstract class SOContainer extends AbstractContainer implements ISharedOb } /** - * @param containerEvent + * @param containerEvent container event */ protected void fireDelegateContainerEvent(IContainerEvent containerEvent) { super.fireContainerEvent(containerEvent); diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainerGroup.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainerGroup.java index 118f232d1..d94d78bbd 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainerGroup.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainerGroup.java @@ -67,6 +67,9 @@ public class SOContainerGroup implements ISocketAcceptHandler { } /** + * @param aSocket socket + * @return ObjectOutputStream new object output stream for socket + * @throws IOException if object output stream cannot be created * @since 4.7 */ protected ObjectOutputStream createObjectOutputStream(Socket aSocket) throws IOException { @@ -74,6 +77,9 @@ public class SOContainerGroup implements ISocketAcceptHandler { } /** + * @param aSocket socket + * @return ObjectInputStream new object input stream for socket + * @throws IOException if object input stream cannot be created * @since 4.7 */ protected ObjectInputStream createObjectInputStream(Socket aSocket) throws IOException { @@ -81,6 +87,10 @@ public class SOContainerGroup implements ISocketAcceptHandler { } /** + * @param ins object input stream. Will not be <code>null</code> + * @return ConnectRequestMessage connect request message read from object input stream + * @throws IOException if object cannot be read from stream + * @throws ClassNotFoundException if object cannot be read from stream * @since 4.7 */ protected ConnectRequestMessage readConnectRequestMessage(ObjectInputStream ins) throws IOException, ClassNotFoundException { @@ -91,6 +101,7 @@ public class SOContainerGroup implements ISocketAcceptHandler { } /** + * @param aSocket socket * @since 4.7 */ public void handleAccept(Socket aSocket) throws Exception { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLClientSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLClientSOContainer.java index 7fc73594a..e6477b8b7 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLClientSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLClientSOContainer.java @@ -42,8 +42,8 @@ public class SSLClientSOContainer extends ClientSOContainer { } /** - * @param remoteSpace - * @param data + * @param remoteSpace remote space + * @param data data * @return ISynchAsynchConnection a non-<code>null</code> instance. * @throws ConnectionCreateException not thrown by this implementation. */ diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLGenericContainerInstantiator.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLGenericContainerInstantiator.java index 442cc037d..bf524d6d6 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLGenericContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLGenericContainerInstantiator.java @@ -123,6 +123,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @return InetAddress the bind address. May be <code>null</code> * @since 4.5 */ public InetAddress getBindAddress() { @@ -130,6 +131,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @return boolean true if wants client auth * @since 4.6 */ public boolean getWantClientAuth() { @@ -137,6 +139,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @return boolean true if needs client auth * @since 4.6 */ public boolean getNeedClientAuth() { @@ -144,6 +147,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @return boolean retrieve whether client auth is needed or wanted * @since 4.6 */ public boolean getClientAuth() { @@ -152,6 +156,9 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @param args arguments + * @return GenericContainerArgs generic container args instance + * @throws IDCreateException if some problem creating arguments * @since 3.0 */ protected GenericContainerArgs getClientArgs(Object[] args) throws IDCreateException { @@ -187,6 +194,9 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @param args arguments + * @return GenericContainerArgs the client args created + * @throws IDCreateException if the client args cannot be retrieved from given args * @since 3.0 */ protected GenericContainerArgs getServerArgs(Object[] args) throws IDCreateException { @@ -280,6 +290,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @return SSLServerSocketFactory server socket factory * @since 4.6 */ private SSLServerSocketFactory getServerSocketFactory() { @@ -322,6 +333,9 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @param gcargs the generic container args + * @return IContainer the created container + * @throws Exception if something goes wrong * @since 4.5 */ protected IContainer createClientContainer(GenericContainerArgs gcargs) throws Exception { @@ -329,6 +343,10 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @param port port + * @param inetAddress inet address + * @return SSLServerSocket new ssl server socket + * @throws IOException if some problem creating server socket * @since 4.6 */ protected SSLServerSocket createSSLServerSocket(int port, InetAddress inetAddress) throws IOException { @@ -339,6 +357,9 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } /** + * @param gcargs the generic container args + * @return IContainer the created container + * @throws Exception if something goes wrong * @since 4.5 */ protected IContainer createServerContainer(GenericContainerArgs gcargs) throws Exception { @@ -377,6 +398,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, } } + @SuppressWarnings("unchecked") protected Set getAdaptersForClass(Class clazz) { Set result = new HashSet(); IAdapterManager adapterManager = ProviderPlugin.getDefault().getAdapterManager(); @@ -385,6 +407,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, return result; } + @SuppressWarnings("unchecked") protected Set getInterfacesForClass(Set s, Class clazz) { if (clazz.equals(Object.class)) return s; @@ -393,6 +416,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, return s; } + @SuppressWarnings("unchecked") protected Set getInterfacesForClass(Class clazz) { Set clazzes = getInterfacesForClass(new HashSet(), clazz); Set result = new HashSet(); @@ -401,6 +425,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, return result; } + @SuppressWarnings("unchecked") protected String[] getInterfacesAndAdaptersForClass(Class clazz) { Set result = getAdaptersForClass(clazz); result.addAll(getInterfacesForClass(clazz)); @@ -442,6 +467,7 @@ public class SSLGenericContainerInstantiator implements IContainerInstantiator, /** * @since 3.0 */ + @SuppressWarnings("unchecked") public String[] getImportedConfigs(ContainerTypeDescription description, String[] exporterSupportedConfigs) { if (exporterSupportedConfigs == null) return null; diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainer.java index 2dc8f39a8..d4db08c1c 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainer.java @@ -67,6 +67,12 @@ public class SSLServerSOContainer extends ServerSOContainer implements IConnectR } /** + * @param config config + * @param port port + * @param bindAddress bind address + * @param path path + * @param keepAlive keep alive + * @throws IOException if some problem * @since 4.4 */ public SSLServerSOContainer(ISharedObjectContainerConfig config, int port, InetAddress bindAddress, String path, int keepAlive) throws IOException { @@ -81,6 +87,11 @@ public class SSLServerSOContainer extends ServerSOContainer implements IConnectR } /** + * @param config config + * @param sslServerSocket socket + * @param keepAlive keep alive + * @throws IOException if some problem + * @throws URISyntaxException if some problem * @since 4.6 */ public SSLServerSOContainer(ISharedObjectContainerConfig config, SSLServerSocket sslServerSocket, int keepAlive) throws IOException, URISyntaxException { @@ -96,6 +107,11 @@ public class SSLServerSOContainer extends ServerSOContainer implements IConnectR } /** + * @param config config + * @param bindAddress bind address + * @param keepAlive keep alive + * @throws IOException if some problem + * @throws URISyntaxException if some problem with uri syntax based upon getID().getName() * @since 4.4 */ public SSLServerSOContainer(ISharedObjectContainerConfig config, InetAddress bindAddress, int keepAlive) throws IOException, URISyntaxException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainerGroup.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainerGroup.java index 8208eecf4..e5f9ef097 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainerGroup.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SSLServerSOContainerGroup.java @@ -53,6 +53,10 @@ public class SSLServerSOContainerGroup extends SOContainerGroup implements ISock } /** + * @param name name + * @param group thread group to use to create thread + * @param port port + * @param bindAddress bind address * @since 4.4 */ public SSLServerSOContainerGroup(String name, ThreadGroup group, int port, InetAddress bindAddress) { @@ -72,6 +76,9 @@ public class SSLServerSOContainerGroup extends SOContainerGroup implements ISock } /** + * @param name name + * @param group thread group to use + * @param sslServerSocket the ssl server socket * @since 4.6 */ public SSLServerSOContainerGroup(String name, ThreadGroup group, SSLServerSocket sslServerSocket) { @@ -156,6 +163,8 @@ public class SSLServerSOContainerGroup extends SOContainerGroup implements ISock } /** + * @param aSocket socket + * @throws Exception if some problem with handling accept * @since 4.7 */ protected void handleSyncAccept(final Socket aSocket) throws Exception { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java index 092093978..83535a979 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ServerSOContainer.java @@ -169,7 +169,7 @@ public class ServerSOContainer extends SOContainer implements ISharedObjectConta } /** - * @param mess + * @param mess message * @throws IOException not thrown by this implementation. */ protected void handleViewChangeMessage(ContainerMessage mess) throws IOException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPClientSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPClientSOContainer.java index 1f6344ca3..3b4f4807e 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPClientSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPClientSOContainer.java @@ -39,8 +39,8 @@ public class TCPClientSOContainer extends ClientSOContainer { } /** - * @param remoteSpace - * @param data + * @param remoteSpace remote space + * @param data and data * @return ISynchAsynchConnection a non-<code>null</code> instance. * @throws ConnectionCreateException not thrown by this implementation. */ diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java index 6e69ca43b..8f6a39dc2 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java @@ -66,6 +66,12 @@ public class TCPServerSOContainer extends ServerSOContainer implements IConnectR } /** + * @param config config + * @param port port + * @param bindAddress bind address + * @param path path + * @param keepAlive keep alive + * @throws IOException if some problem creating * @since 4.4 */ public TCPServerSOContainer(ISharedObjectContainerConfig config, int port, InetAddress bindAddress, String path, int keepAlive) throws IOException { @@ -79,6 +85,11 @@ public class TCPServerSOContainer extends ServerSOContainer implements IConnectR } /** + * @param config config + * @param bindAddress bind address + * @param keepAlive keep alive + * @throws IOException if some problem creating + * @throws URISyntaxException if some problem creating * @since 4.4 */ public TCPServerSOContainer(ISharedObjectContainerConfig config, InetAddress bindAddress, int keepAlive) throws IOException, URISyntaxException { diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainerGroup.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainerGroup.java index e2761e393..0a289442e 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainerGroup.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainerGroup.java @@ -29,6 +29,11 @@ public class TCPServerSOContainerGroup extends SOContainerGroup { private InetAddress bindAddress; /** + * @param name name + * @param group thread group to use + * @param port port + * @param backlog backlog + * @param bindAddress bind address * @since 4.4 */ public TCPServerSOContainerGroup(String name, ThreadGroup group, int port, int backlog, InetAddress bindAddress) { @@ -40,6 +45,10 @@ public class TCPServerSOContainerGroup extends SOContainerGroup { } /** + * @param name name + * @param group thread group to use + * @param port port + * @param bindAddress bind address * @since 4.4 */ public TCPServerSOContainerGroup(String name, ThreadGroup group, int port, InetAddress bindAddress) { 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) { diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java index d87399f0b..6daa6c3fc 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java @@ -47,7 +47,7 @@ public abstract class AbstractContainer implements IContainer { /** * Fires a container event * - * @param event + * @param event event */ protected void fireContainerEvent(IContainerEvent event) { List toNotify = null; diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java index 1797fd1c9..0efea0df7 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java @@ -54,6 +54,8 @@ public class ContainerTypeDescription { } /** + * @param name name + * @param instantiator instantiator * @since 3.4 */ public ContainerTypeDescription(String name, IContainerInstantiator instantiator) { @@ -147,7 +149,7 @@ public class ContainerTypeDescription { * * Note that the returned types do not guarantee that a subsequent call to * {@link IContainer#getAdapter(Class)} with the same type name as a - * returned value will return a non-<code>null</code result. In other words, even if the + * returned value will return a non-<code>null</code> result. In other words, even if the * class name is in the returned array, subsequent calls to * {@link IContainer#getAdapter(Class)} may still return <code>null</code>. * @@ -226,6 +228,7 @@ public class ContainerTypeDescription { } /** + * @return String[] supported configs * @since 3.1 */ public String[] getSupportedConfigs() { @@ -239,6 +242,8 @@ public class ContainerTypeDescription { } /** + * @param exporterSupportedConfigs exporter supported configs + * @return String[] imported configs * @since 3.1 */ public String[] getImportedConfigs(String[] exporterSupportedConfigs) { @@ -254,6 +259,9 @@ public class ContainerTypeDescription { } /** + * @param importedConfigs imported configs + * @param exportedProperties exported properties + * @return Dictionary dictionary of properties for imported configs * @since 3.1 */ public Dictionary getPropertiesForImportedConfigs(String[] importedConfigs, Dictionary exportedProperties) { diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java index fab410c3e..5c28a4446 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java @@ -11,9 +11,7 @@ package org.eclipse.ecf.core; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.ecf.core.identity.ID; -import org.eclipse.ecf.core.identity.IIdentifiable; -import org.eclipse.ecf.core.identity.Namespace; +import org.eclipse.ecf.core.identity.*; import org.eclipse.ecf.core.security.IConnectContext; /** @@ -174,7 +172,8 @@ public interface IContainer extends IAdaptable, IIdentifiable { * Add listener to IContainer. The listener's handleEvent method will be * synchronously called when container methods are called. Minimally, the * events delivered to the listener are as follows <br> - * <table BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0> + * <table BORDER=1 CELLPADDING=4 CELLSPACING=0> + * <caption>Container Events</caption> * <tr> * <td>container action</td> * <td>Event</td> diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java index 8787f12ac..2fa6ccee5 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java @@ -36,7 +36,7 @@ public interface IContainerFactory { * * @return List of ContainerTypeDescription instances */ - public List /* ContainerTypeDescription */getDescriptions(); + public List /* ContainerTypeDescription */ getDescriptions(); /** * Check to see if a given named description is already contained by this @@ -108,7 +108,7 @@ public interface IContainerFactory { * @param containerTypeDescriptionName * the ContainerTypeDescription name to lookup. Must not be <code>null</code>. * @return a valid instance of IContainer. Will not be <code>null</code>. - * @throws ContainerCreateException + * @throws ContainerCreateException if cannot create container of given name */ public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException; diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java index 51e304bde..eb00c59a7 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java @@ -16,13 +16,11 @@ import org.eclipse.ecf.core.events.IContainerEvent; * * @see IContainer#addListener(IContainerListener) * <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: @@ -42,7 +40,7 @@ public interface IContainerListener { /** * Handle event from IContainer * - * @param event + * @param event the event to handle */ public void handleEvent(IContainerEvent event); }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java index e2795484e..6e4f885cb 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java @@ -29,7 +29,7 @@ public interface IContainerManager { /** * Get container for given ID. If <code>containerID</code> is - * <code>, null will be returned. If + * <code>null</code> then <code>null</code> will be returned. If * active container with given <code>containerID,</code> is not known to this container manager, * then <code>null</code> will also be returned. * @param containerID the ID of the container instance to retrieve from this manager. If <code>null</code> diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java index 7baf51721..f8fbe5332 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java @@ -19,7 +19,7 @@ public interface IContainerEvent extends Event { /** * Get ID of local discovery container (the discovery container receiving this event). * - * @return ID for local container. Will not return <code>null</code). + * @return ID for local container. Will not return <code>null</code>. */ public ID getLocalContainerID(); }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java index 684fb9ab3..7a8938cfc 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java @@ -29,6 +29,8 @@ public class BaseContainerInstantiator implements IContainerInstantiator { protected static Class[][] EMPTY_CLASS_ARRAY = new Class[][] {{}}; /** + * @param arg object to get Integer from + * @return Integer created from Object arg * @since 3.6 */ protected Integer getIntegerFromArg(Object arg) { @@ -43,6 +45,8 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param arg object to get String from + * @return String created from Object arg * @since 3.6 */ protected String getStringFromArg(Object arg) { @@ -85,6 +89,8 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters parameters to get Map from + * @return Map from first of parameters that is instance of Map * @since 3.6 */ protected Map<String, ?> getMap(Object[] parameters) { @@ -96,6 +102,12 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @param clazz the expected type of the value accessed by key + * @param def the default of the value accessed by key. May be <code>null</code> + * @param <T> the expected value type + * @return T value from parameters with key and of type clazz * @since 3.6 */ protected <T> T getParameterValue(Map<String, ?> parameters, String key, Class<T> clazz, T def) { @@ -108,6 +120,10 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @param def the default of the value accessed by key. May be <code>null</code> + * @return String value from parameters with key * @since 3.6 */ protected String getParameterValue(Map<String, ?> parameters, String key, String def) { @@ -115,6 +131,9 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @return String value from parameters with key * @since 3.6 */ protected String getParameterValue(Map<String, ?> parameters, String key) { @@ -122,6 +141,13 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param ns namespace to use for ID creation. Must not be <code>null</code> + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @param type the expected type of the value from parameters + * @param def a default value to use if value from parameters is null + * @param <T> the expected value type + * @return ID the created ID * @since 3.8 */ protected <T> ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key, Class<T> type, T def) { @@ -129,6 +155,11 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param ns namespace to use for ID creation. Must not be <code>null</code> + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @param def a default String value to use if value from parameters is null + * @return ID the created ID * @since 3.8 */ protected ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key, String def) { @@ -136,6 +167,10 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param ns namespace to use for ID creation. Must not be <code>null</code> + * @param parameters Map parameters to get value from + * @param key the key to use to get value from parameters + * @return ID the created ID * @since 3.8 */ protected ID getIDParameterValue(Namespace ns, Map<String, ?> parameters, String key) { @@ -143,6 +178,12 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters parameters assumed to contain a Map + * @param key key to use to get parameter value from Map + * @param clazz the expected type of the value from Map + * @param def a default value to use if value from Map is <code>null</code> + * @param <T> the expected value type + * @return T the parameter value with key from Map * @since 3.6 */ protected <T> T getParameterValue(Object[] parameters, String key, Class<T> clazz, T def) { @@ -150,6 +191,11 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters parameters assumed to contain a Map + * @param key key to use to get parameter value from Map + * @param clazz the expected type of the value from Map + * @param <T> the expected value type + * @return T the parameter value with key from Map * @since 3.6 */ protected <T> T getParameterValue(Object[] parameters, String key, Class<T> clazz) { @@ -157,6 +203,10 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters parameters assumed to contain a Map + * @param key key to use to get parameter value from Map + * @param def a default String value to use if value from Map is <code>null</code> + * @return Sting the parameter value with key from Map * @since 3.6 */ protected String getMapParameterString(Object[] parameters, String key, String def) { @@ -164,6 +214,9 @@ public class BaseContainerInstantiator implements IContainerInstantiator { } /** + * @param parameters parameters assumed to contain a Map + * @param key key to use to get parameter value from Map + * @return Sting the parameter value with key from Map * @since 3.6 */ protected String getMapParameterString(Object[] parameters, String key) { diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java index bd2ca1239..a541110d2 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java @@ -22,14 +22,9 @@ public interface IContainerInstantiator { * and arguments that will be passed into this method (and therefore to the * provider implementation implementing this method). For example: * <p> - * </p> - * <p> * <b> ContainerFactory.getDefault().createContainer("foocontainer",new * Object { "hello" });</b> - * </p> * <p> - * </p> - * * @param description * the ContainerTypeDescription associated with the registered * container provider implementation @@ -40,7 +35,7 @@ public interface IContainerInstantiator { * @return IContainer instance. The provider implementation must return a * valid object implementing IContainer OR throw a * ContainerCreateException. Null will not be returned. - * @throws ContainerCreateException + * @throws ContainerCreateException thrown if instance cannot be created */ public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException; @@ -75,17 +70,12 @@ public interface IContainerInstantiator { * set of parameter types understood for calls to * {@link #createInstance(ContainerTypeDescription, Object[])}. * <p> - * </p> * Each of the rows of the returned array specifies a Class[] of parameter * types. These parameter types correspond to the types of Object[] that can * be passed into the second parameter of * {@link #createInstance(ContainerTypeDescription, Object[])}. * <p> - * </p> * Consider the following example: - * <p> - * </p> - * * <pre> * public Class[][] getSupportedParameterTypes() { * return new Class[][] { { String.class }, { String.class, String.class } }; @@ -104,10 +94,7 @@ public interface IContainerInstantiator { * IContainer container2 = ContainerFactory.getDefault().createContainer( * description, new Object[] { "Hello" }); * </pre> - * * <p> - * </p> - * * @param description * the ContainerTypeDescription to return parameter types for * @return Class[][] array of Class[]s. Each row in the table corresponds to diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java index 7588fd4ab..00cfc8928 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java @@ -49,16 +49,16 @@ public interface IRemoteServiceContainerInstantiator { * <p>Get the imported config types for a given ContainerTypeDescription for the given exporter supported config types. This * method will be called to determine what the local container imported configs are for the given description and * exporterSupportedConfigTypes. The local provider can decide which (if any) imported config types should be - * returned and return them. </p> - * <p></p> - * <p>As an example, consider the config types for the ECF generic provider. A generic server has a config type + * returned and return them. + * <p> + * As an example, consider the config types for the ECF generic provider. A generic server has a config type * of 'ecf.generic.server', and the client has 'ecf.generic.server'. If the generic server exports a given * service, the exportersSupportedConfigTypes will be '[ecf.generic.server]'. When this method is called * with the ecf.generic.client description (i.e. the container type description named 'ecf.generic.client'), it * should respond with a non-null, non-empty array...e.g.: [ecf.generic.client]. This indicates that the * ecf.generic.client can serve as an importer for the given exporter config type. All, other descriptions - * should return <code>null<code>, to indicate that they cannot import a remote service exported by the given - * exporterSupportedConfigTypes. </p> + * should return <code>null</code>, to indicate that they cannot import a remote service exported by the given + * exporterSupportedConfigTypes. * * @param description the container type description under consideration. * @param exporterSupportedConfigs the exporter supported config types under consideration. diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java index 7c249bd46..56d548e8f 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java @@ -21,8 +21,8 @@ import org.eclipse.ecf.core.identity.IIdentifiable; */ public interface IUser extends IIdentifiable, Serializable, IAdaptable { /** - * Get basic name for user. Will not return <code>null</. - * @return String + * Get basic name for user. Will not return <code>null</code>. + * @return String name */ public String getName(); @@ -37,7 +37,7 @@ public interface IUser extends IIdentifiable, Serializable, IAdaptable { /** * Get map of properties associated with this user. May be <code>null</code>. * - * @return Map + * @return Map properties */ public Map getProperties(); diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java index d4b51f3dd..10b8bddca 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java @@ -24,8 +24,8 @@ public interface IContainerFilter { /** * Match a given containerToMatch against some set of implementation-defined criteria. * @param containerToMatch the containerToMatch. Will not be <code>null</code>. - * @return <true> if the given containerToMatch fulfills some - * implementation-dependent criteria. <false> if not. + * @return boolean true if the given containerToMatch fulfills some + * implementation-dependent criteria. false if not. */ public boolean match(IContainer containerToMatch); } diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractConsumerContainerSelector.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractConsumerContainerSelector.java index e29d667c9..e141740da 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractConsumerContainerSelector.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractConsumerContainerSelector.java @@ -184,6 +184,11 @@ public class AbstractConsumerContainerSelector extends } /** + * @param containerTypeDescription containerTypeDescription + * @param containerTypeDescriptionName containerTypeDescriptionName + * @param properties properties + * @return IRemoteServiceContainer created container. Should not be <code>null</code> + * @throws SelectContainerException thrown if container cannot be created or configured * @since 2.0 */ protected IRemoteServiceContainer createContainer( diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractContainerSelector.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractContainerSelector.java index 9fcb494af..59916440b 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractContainerSelector.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractContainerSelector.java @@ -118,6 +118,11 @@ public abstract class AbstractContainerSelector { } /** + * @param serviceReference serviceReference + * @param properties overriding properties + * @param containerTypeDescription containerTypeDescription + * @return IContainer created container. Should not be <code>null</code> + * @throws SelectContainerException thrown if some create or configure failure * @since 2.0 */ protected IContainer createContainer(ServiceReference serviceReference, @@ -157,6 +162,10 @@ public abstract class AbstractContainerSelector { } /** + * @param serviceReference serviceReference + * @param properties overriding properties + * @param containerTypeDescription containerTypeDescription + * @return Object container factory arguments to use * @since 2.0 */ protected Object getContainerFactoryArguments( @@ -187,6 +196,11 @@ public abstract class AbstractContainerSelector { } /** + * @param serviceReference serviceReference + * @param properties overriding properties + * @param container the container to create connect context for + * @param context a possible connect context] + * @return IConnectContext a connect context or null * @since 2.0 */ protected IConnectContext createConnectContext( diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractHostContainerSelector.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractHostContainerSelector.java index a42001549..147799352 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractHostContainerSelector.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractHostContainerSelector.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Map; import org.eclipse.ecf.core.ContainerConnectException; -import org.eclipse.ecf.core.ContainerCreateException; import org.eclipse.ecf.core.ContainerTypeDescription; import org.eclipse.ecf.core.IContainer; import org.eclipse.ecf.core.identity.ID; @@ -46,6 +45,12 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference service reference + * @param overridingProperties overriding properties + * @param serviceExportedInterfaces service exported interfaces to select for + * @param serviceExportedConfigs service exported configs to select for + * @param serviceIntents service exported intents to select for + * @return Collection of existing host containers * @since 2.0 */ protected Collection selectExistingHostContainers( @@ -104,6 +109,10 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference serviceReference + * @param properties properties + * @param container container to match + * @return boolean true if match false otherwise * @since 2.0 */ protected boolean matchHostContainerToConnectTarget( @@ -141,6 +150,14 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference service reference + * @param properties properties + * @param container container + * @param adapter remote service container adapter + * @param description container type description + * @param requiredConfigTypes required config types + * @param requiredServiceIntents required service intents + * @return boolean true if match, false otherwise * @since 2.0 */ protected boolean matchExistingHostContainer( @@ -158,6 +175,10 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference serviceReference + * @param properties properties + * @param container container + * @return boolean true if match, false otherwise * @since 2.0 */ protected boolean matchHostContainerID(ServiceReference serviceReference, @@ -198,6 +219,11 @@ public abstract class AbstractHostContainerSelector extends return containerID.equals(cID); } + /** + * @param requiredConfigTypes request config types + * @param containerTypeDescription container type description + * @return boolean true if match, false otherwise + */ protected boolean matchHostSupportedConfigTypes( String[] requiredConfigTypes, ContainerTypeDescription containerTypeDescription) { @@ -222,6 +248,13 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference service reference + * @param properties overriding properties + * @param serviceExportedInterfaces service exported interfaces to select for + * @param requiredConfigs service exported configs to select for + * @param requiredIntents intents to select for + * @return Collection of host containers + * @throws SelectContainerException if container cannot be created or configured * @since 2.0 */ protected Collection createAndConfigureHostContainers( @@ -303,7 +336,14 @@ public abstract class AbstractHostContainerSelector extends } /** - * @throws ContainerCreateException + * @param containerTypeDescription containerTypeDescription + * @param serviceReference reference + * @param properties properties + * @param serviceExportedInterfaces exported interfaces + * @param requiredConfigs configs + * @param requiredIntents intents + * @return IRemoteServiceContainer matching container created + * @throws SelectContainerException container cannot be created or selected * @since 2.0 */ protected IRemoteServiceContainer createMatchingContainer( @@ -323,7 +363,11 @@ public abstract class AbstractHostContainerSelector extends } /** - * @throws ContainerCreateException + * @param serviceReference serviceReference + * @param properties properties + * @param containerTypeDescription container type description + * @return IRemoteServiceContainer created remote service container + * @throws SelectContainerException if could not be created * @since 2.0 */ protected IRemoteServiceContainer createRSContainer( @@ -341,6 +385,12 @@ public abstract class AbstractHostContainerSelector extends } /** + * @param serviceReference service reference + * @param properties properties + * @param container container + * @param target target + * @throws ContainerConnectException if container cannot be connected + * @throws IDCreateException thrown if ID cannot be created * @since 2.0 */ protected void connectHostContainer(ServiceReference serviceReference, diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractMetadataFactory.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractMetadataFactory.java index f0162985b..76a8f5942 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractMetadataFactory.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractMetadataFactory.java @@ -175,6 +175,9 @@ public abstract class AbstractMetadataFactory { } /** + * @param discoveredServiceProperties discovered service properties + * @return org.osgi.service.remoteserviceadmin.EndpointDescription endpoint description decoded from service p + * properties * @since 3.0 */ protected org.osgi.service.remoteserviceadmin.EndpointDescription decodeEndpointDescription( @@ -273,6 +276,8 @@ public abstract class AbstractMetadataFactory { } /** + * @param endpointDescription endpoint description to encode + * @param result service properties to add encoded endpoint description properties to * @since 3.0 */ protected void encodeOSGiServiceProperties( @@ -360,6 +365,9 @@ public abstract class AbstractMetadataFactory { } /** + * @param endpointDescription endpoint description to encode + * @param result service properties to add encoded endpoint description properties to + * * @since 3.0 */ protected void encodeServiceProperties( diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractTopologyManager.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractTopologyManager.java index 69c8b103a..a54e21dfd 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractTopologyManager.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/AbstractTopologyManager.java @@ -130,6 +130,8 @@ public abstract class AbstractTopologyManager { } /** + * @param ctx the bundle context + * @return Filter the created filter * @since 4.0 */ protected Filter createISIFFilter(BundleContext ctx) { @@ -168,6 +170,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description * @since 4.1 */ protected void advertiseModifyEndpointDescription( @@ -204,6 +207,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description * @since 3.0 */ protected void advertiseEndpointDescription( @@ -243,6 +247,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description * @since 3.0 */ protected void unadvertiseEndpointDescription( @@ -283,6 +288,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description * @since 3.0 */ protected void handleECFEndpointAdded( @@ -296,6 +302,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description * @since 3.0 */ protected void handleECFEndpointRemoved( @@ -317,6 +324,7 @@ public abstract class AbstractTopologyManager { } /** + * @param endpoint endpoint description * @since 4.1 */ protected void handleECFEndpointModified(EndpointDescription endpoint) { @@ -337,6 +345,8 @@ public abstract class AbstractTopologyManager { } /** + * @param listener listener + * @param endpointDescription endpoint description * @since 3.0 */ protected void handleNonECFEndpointAdded( @@ -346,6 +356,8 @@ public abstract class AbstractTopologyManager { } /** + * @param listener listener + * @param endpointDescription endpoint description * @since 3.0 */ protected void handleNonECFEndpointRemoved( @@ -355,6 +367,8 @@ public abstract class AbstractTopologyManager { } /** + * @param basicTopologyManagerImpl basic topology manager + * @param endpointDescription endpointDescription * @since 4.1 */ protected void handleNonECFEndpointModified( @@ -364,6 +378,8 @@ public abstract class AbstractTopologyManager { } /** + * @param endpointDescription endpoint description + * @param matchedFilter matched filter * @since 3.0 */ protected void handleNonECFEndpointRemoved( @@ -373,6 +389,9 @@ public abstract class AbstractTopologyManager { } /** + * @param result result + * @param endpointDescription endpoint description + * @param advertise advertise * @since 3.0 */ protected void handleAdvertisingResult( @@ -393,6 +412,8 @@ public abstract class AbstractTopologyManager { } /** + * @param event the service event + * @param listeners map of listeners * @since 3.0 */ protected void handleEvent(ServiceEvent event, Map listeners) { diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java index a348fecc7..897bb7975 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java @@ -33,14 +33,12 @@ import org.osgi.framework.Version; * href="http://www.osgi.org/download/r4v42/r4.enterprise.pdf">OSGi 4.2 * Enterprise Specification</a>. * <p> - * <p> * ECF remote services have capabilities beyond typical OSGi remote services. To * expose these capabilities, this EndpointDescription adds <b>optional</b> * meta-data. This meta-data may then be used by the remote service consumer to * customize ECF remote services import. Specifically, to customize the behavior * of the ECF implementation of * {@link RemoteServiceAdmin#importService(org.osgi.service.remoteserviceadmin.EndpointDescription)}. - * <p> */ public class EndpointDescription extends org.osgi.service.remoteserviceadmin.EndpointDescription { @@ -190,11 +188,11 @@ public class EndpointDescription extends } } /** - * Get a map of the service interface name -> Version information for all + * Get a map of the service interface name to Version information for all * the service interfaces exposed by this endpoint description (i.e. those * returned by {@link #getInterfaces()} which have a * - * @return Map<String,Version> of interface versions for all our service + * @return Map of interface versions for all our service * interfaces. Every service interface returned by * {@link #getInterfaces()} will have an associated Version, but it * may have value Version#emptyVersion @@ -207,6 +205,7 @@ public class EndpointDescription extends } /** + * @return String ecf endpoint id * @since 4.0 */ public String getEndpointId() { @@ -214,6 +213,7 @@ public class EndpointDescription extends } /** + * @return Long ecf timestamp * @since 4.0 */ public Long getTimestamp() { @@ -221,6 +221,7 @@ public class EndpointDescription extends } /** + * @return Long ecf remote service id * @since 4.0 */ public Long getRemoteServiceId() { @@ -294,6 +295,7 @@ public class EndpointDescription extends } /** + * @return List ecf asynchronous proxy interfaces * @since 4.0 */ public List<String> getAsyncInterfaces() { diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionLocator.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionLocator.java index 8639c7b0d..988caa551 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionLocator.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionLocator.java @@ -765,6 +765,9 @@ public class EndpointDescriptionLocator implements IEndpointDescriptionLocator { } /** + * @param description description + * @param type type + * @return EndpointEventListenerHolder[] matching endpoint event listener holders * @since 4.1 */ protected EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders( @@ -843,6 +846,10 @@ public class EndpointDescriptionLocator implements IEndpointDescriptionLocator { } /** + * @param refs service references + * @param description description + * @param type type + * @return EndpointEventListenerHolder[] matching endpoint event listener holders * @since 4.1 */ public EndpointEventListenerHolder[] getMatchingEndpointEventListenerHolders( diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionWriter.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionWriter.java index 6955ccdbd..7700131e2 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionWriter.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionWriter.java @@ -194,6 +194,9 @@ public class EndpointDescriptionWriter { } /** + * @param endpointDescription the endpoint description to write + * @return Writer the writer used + * @throws IOException if endpoint descriptino cannot be written * @since 4.2 */ public Writer writeEndpointDescription( @@ -203,6 +206,9 @@ public class EndpointDescriptionWriter { } /** + * @param endpointDescriptions the endpoint descriptions to write + * @return Writer used to write descriptions + * @throws IOException if problem writing * @since 4.2 */ public Writer writeEndpointDescriptions( @@ -216,6 +222,9 @@ public class EndpointDescriptionWriter { } /** + * @param writer the writer to use + * @param endpointDescription the endpointDescription to write + * @throws IOException thrown if some problem writing * @since 4.2 */ public void writeEndpointDescription( diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IConsumerContainerSelector.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IConsumerContainerSelector.java index e344da639..bf5884254 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IConsumerContainerSelector.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IConsumerContainerSelector.java @@ -19,11 +19,9 @@ import org.eclipse.ecf.remoteservice.IRemoteServiceContainer; * and then uses it to select an ECF consumer container instance by calling * {@link #selectConsumerContainer(EndpointDescription)}. * <p> - * <p> * The {@link IRemoteServiceContainer} returned is then used on the consumer * side, to actually import the remote service. * <p> - * <p> * If no other instances of this service have been registered, a default * instance of {@link ConsumerContainerSelector} will be used. Note that this * default instance is registered with the lowest possible priority, so that if diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IDiscoveredEndpointDescriptionFactory.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IDiscoveredEndpointDescriptionFactory.java index b614a114e..6ecd8a5f9 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IDiscoveredEndpointDescriptionFactory.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IDiscoveredEndpointDescriptionFactory.java @@ -33,13 +33,12 @@ import org.eclipse.ecf.discovery.identity.IServiceID; * will be preferred/used over the default. This means that those wishing to * customize/control this process of converting {@link IServiceInfo}s to * {@link DiscoveredEndpointDescription} must - * <ul> - * <li>create their own implementation of - * {@link IDiscoveredEndpointDescriptionFactory}</li> - * <li>register it with the OSGi service registry with a priority + * create their own implementation of + * {@link IDiscoveredEndpointDescriptionFactory} + * and register it with the OSGi service registry with a priority * ({org.osgi.framework.Constants#SERVICE_RANKING}) higher than - * {@link Integer#MIN_VALUE}</li> - * <ul> + * {@link Integer#MIN_VALUE} + * <p> * Then at runtime, when needed by the {@link EndpointDescriptionLocator}, the * new discovered endpoint description factory will be used. * diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionLocator.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionLocator.java index e7555b4d0..46cbf6948 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionLocator.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionLocator.java @@ -26,7 +26,7 @@ public interface IEndpointDescriptionLocator { /** * Get the service ID associated with the given endpoint description. * - * @param endpointDescription + * @param endpointDescription endpoint description * @return IServiceID associated discovered endpoint description. Will * return <code>null</code> if no associated serviceID */ diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IHostContainerSelector.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IHostContainerSelector.java index 7f2d37fdc..eaee91c9a 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IHostContainerSelector.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IHostContainerSelector.java @@ -21,15 +21,12 @@ import org.osgi.framework.ServiceReference; * {@link RemoteServiceAdmin#exportService(ServiceReference, java.util.Map)} ), * the RSA first gets an instance of this service via the service registry, and * then uses it to select an array of ECF host container instances by calling - * {@link #selectHostContainers(ServiceReference, Map<String,Object>, String[], - * String[], String[])} . - * <p> + * selectHostContainers. * <p> * The {@link IRemoteServiceContainer} array returned is then used to actually * export the remote service (typically via * {@link IRemoteServiceContainerAdapter#registerRemoteService(String[], Object, java.util.Dictionary)} * <p> - * <p> * If no other instances of this service have been registered, a default * instance of {@link HostContainerSelector} will be used. Note that this * default instance is registered with the lowest possible priority, so that if diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IServiceInfoFactory.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IServiceInfoFactory.java index 3b04d004c..3f97ebcc9 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IServiceInfoFactory.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IServiceInfoFactory.java @@ -15,11 +15,10 @@ import org.eclipse.ecf.discovery.IServiceInfo; /** * Service info factory service contract. A service info factory is used to * convert {@link EndpointDescription}s to {@link IServiceInfo} instances (via - * {@link #createServiceInfo(IDiscoveryAdvertiser, EndpointDescription)}. The + * createServiceInfo. The * resulting IServiceInfo instances are then used to publish the * EndpointDescription metadata to a {@link IDiscoveryAdvertiser}. * <p> - * <p> * If no other instances of this service have been registered, a default * instance of {@link ServiceInfoFactory} will be used. Note that this default * instance is registered with the lowest possible priority, so that if other @@ -32,8 +31,8 @@ import org.eclipse.ecf.discovery.IServiceInfo; * <li>register it with the OSGi service registry with a priority * ({org.osgi.framework.Constants#SERVICE_RANKING}) higher than * {@link Integer#MIN_VALUE}</li> - * <ul> - * Then at runtime, when needed by the {@link EndpointDescriptionAdvertiser}, + * </ul> + * Then at runtime, when needed by the EndpointDescriptionAdvertiser, * the new service info factory will be used. * * @see IDiscoveredEndpointDescriptionFactory diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteConstants.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteConstants.java index 41a15fa07..9d3607544 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteConstants.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteConstants.java @@ -42,7 +42,7 @@ public final class RemoteConstants { /** * 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)} + * 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 scopes value determines the third parameter. If not explicitly set, @@ -52,7 +52,7 @@ public final class RemoteConstants { /** * 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)} + * 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 protocols value determines the fourth parameter. If not explicitly @@ -62,7 +62,7 @@ public final class RemoteConstants { /** * 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)} + * 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 protocols value determines the fifth parameter. If not explicitly @@ -72,7 +72,7 @@ public final class RemoteConstants { /** * 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)} + * IServiceInfoFactory#createServiceInfo(org.eclipse.ecf.discovery.IDiscoveryAdvertiser, EndpointDescription) * to create an {@link 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 @@ -186,7 +186,7 @@ public final class RemoteConstants { * <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 diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java index 2b6d0d789..b4d73e077 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java @@ -136,6 +136,7 @@ public class RemoteServiceAdmin implements private ServiceRegistration eventListenerHookRegistration; /** + * @return List of exported registrations * @since 4.2 */ public List<ExportRegistration> getExportedRegistrations() { @@ -145,6 +146,7 @@ public class RemoteServiceAdmin implements } /** + * @return List of imported registrations * @since 4.2 */ public List<ImportRegistration> getImportedRegistrations() { @@ -161,6 +163,9 @@ public class RemoteServiceAdmin implements } /** + * @param clientBundle client bundle for RemoteServiceAdmin instance + * @param exportedRegistrations of exported registrations + * @param importedRegistrations of imported registrations * @since 4.1 */ public RemoteServiceAdmin(Bundle clientBundle, Collection<org.osgi.service.remoteserviceadmin.ExportRegistration> exportedRegistrations, Collection<org.osgi.service.remoteserviceadmin.ImportRegistration> importedRegistrations) { @@ -2601,6 +2606,7 @@ public class RemoteServiceAdmin implements } /** + * @return EndpointDescription for this remote service admin event * @since 3.0 */ public EndpointDescription getEndpointDescription() { diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ServiceInfoFactory.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ServiceInfoFactory.java index f8159d356..f6ba78c64 100644 --- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ServiceInfoFactory.java +++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ServiceInfoFactory.java @@ -68,6 +68,12 @@ public class ServiceInfoFactory extends AbstractMetadataFactory implements } /** + * @param endpointDescription endpoint description + * @param advertiser advertiser + * @param serviceTypeID serviceTypeID + * @param serviceName serviceName + * @param uri uri + * @return IServiceProperties for the given input parameters * @since 3.0 */ protected IServiceProperties createServiceProperties( @@ -80,6 +86,12 @@ public class ServiceInfoFactory extends AbstractMetadataFactory implements } /** + * @param endpointDescription endpoint description + * @param advertiser advertiser + * @param serviceTypeID serviceTypeID + * @param serviceName service name + * @return URI created + * @throws URISyntaxException thrown if URI cannot be created * @since 3.0 */ protected URI createURI( @@ -134,6 +146,10 @@ public class ServiceInfoFactory extends AbstractMetadataFactory implements } /** + * @param endpointDescription endpoint description + * @param advertiser advertiser + * @param serviceTypeID serviceTypeID + * @return String created service name for input parameters * @since 3.0 */ protected String createServiceName( @@ -150,6 +166,10 @@ public class ServiceInfoFactory extends AbstractMetadataFactory implements } /** + * @param endpointDescription endpoint description + * @param advertiser advertiser + * @param serviceTypeID serviceTypeID + * @return String default service name created * @since 3.0 */ protected String createDefaultServiceName( @@ -160,6 +180,9 @@ public class ServiceInfoFactory extends AbstractMetadataFactory implements } /** + * @param endpointDescription endpoint description + * @param advertiser advertiser + * @return IServiceTypeID created service type ID * @since 3.0 */ protected IServiceTypeID createServiceTypeID( diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientFileSystemBrowser.java index eb20d6c0c..79466c9a4 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientFileSystemBrowser.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientFileSystemBrowser.java @@ -102,8 +102,12 @@ public class HttpClientFileSystemBrowser extends AbstractFileSystemBrowser { protected volatile HttpContext httpContext; /** - * @param directoryOrFileID - * @param listener + * @param httpClient http client + * @param directoryOrFileID directory or file id + * @param listener listener + * @param directoryOrFileURL directory or file id + * @param connectContext connect context + * @param proxy proxy * @since 5.0 */ public HttpClientFileSystemBrowser(DefaultHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) { diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientRetrieveFileTransfer.java index 5759cf846..292792e00 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientRetrieveFileTransfer.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient4/src/org/eclipse/ecf/provider/filetransfer/httpclient4/HttpClientRetrieveFileTransfer.java @@ -151,6 +151,7 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer private FileTransferJob connectJob; /** + * @param httpClient http client * @since 5.0 */ public HttpClientRetrieveFileTransfer(DefaultHttpClient httpClient) { @@ -292,6 +293,9 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer } /** + * @return Credentials file request credentials + * @throws UnsupportedCallbackException if some problem + * @throws IOException if some problem * @since 5.0 */ protected Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOException { @@ -541,6 +545,7 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer } /** + * @return int connect timeout * @since 4.0 */ protected int getConnectTimeout() { @@ -966,6 +971,8 @@ public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer } /** + * @param p proxy to create NTCredentials for + * @return NTCredentials new ntlm credentials given proxy * @since 5.0 */ public static NTCredentials createNTLMCredentials(Proxy p) { diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java index 0a911a214..9b5c7e4ce 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java @@ -199,7 +199,7 @@ public abstract class AbstractFileSystemBrowser { * Select a single proxy from a set of proxies available for the given host. This implementation * selects in the following manner: 1) If proxies provided is null or array of 0 length, null * is returned. If only one proxy is available (array of length 1) then the entry is returned. - * If proxies provided is length > 1, then if the type of a proxy in the array matches the given + * If proxies provided is length greater than 1, then if the type of a proxy in the array matches the given * protocol (e.g. http, https), then the first matching proxy is returned. If the protocol does * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned. Subclasses may * override if desired. diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java index 752b90e43..d00e186cf 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java @@ -28,8 +28,9 @@ public class LocalFileSystemBrowser extends AbstractFileSystemBrowser { protected File local; /** - * @param listener - * @param directoryID2 + * @param listener listener + * @param directoryID2 remote directory + * @throws RemoteFileSystemException if some problem */ public LocalFileSystemBrowser(IFileID directoryID2, IRemoteFileSystemListener listener) throws RemoteFileSystemException { super(directoryID2, listener, null, null, null); diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java index c486f1a54..e04aa8073 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java @@ -33,7 +33,7 @@ public class LocalRemoteFile implements IRemoteFile { IRemoteFileInfo info; /** - * @param file + * @param file the file */ public LocalRemoteFile(File file) { this.file = file; diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java index 8cd964099..a679d2354 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java @@ -63,8 +63,11 @@ public class URLFileSystemBrowser extends AbstractFileSystemBrowser { protected String password = null; /** - * @param directoryOrFileID - * @param listener + * @param directoryOrFileID directory or file id + * @param listener listener + * @param directoryOrFileURL directory or file url + * @param connectContext connect context + * @param proxy proxy */ public URLFileSystemBrowser(IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) { super(directoryOrFileID, listener, directoryOrFileURL, connectContext, proxy); diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java index 066ea3fd8..c6a90a35a 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java @@ -24,7 +24,7 @@ public abstract class AbstractSocketWrapper extends Socket { private Socket socket; /** - * @throws IOException + * @throws IOException if some problem */ protected void checkCancel() throws IOException { // default does not check for cancel @@ -35,7 +35,7 @@ public abstract class AbstractSocketWrapper extends Socket { } /** - * @param socket + * @param socket for the wrapper */ public AbstractSocketWrapper(Socket socket) { super(); diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java index 66e2d6519..10e2be373 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java @@ -34,6 +34,8 @@ public class FileTransferID extends BaseID implements IFileID { } /** + * @param namespace namespace + * @param uri uri * @since 3.2 */ public FileTransferID(Namespace namespace, URI uri) { diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java index 2acf74f3f..afd9f5270 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java @@ -282,7 +282,7 @@ public abstract class AbstractOutgoingFileTransfer implements IOutgoingFileTrans * must be non-<code>null</code> after successful completion of the * implementation of this method. * - * @throws SendFileTransferException + * @throws SendFileTransferException if some problem */ protected abstract void openStreams() throws SendFileTransferException; @@ -367,7 +367,7 @@ public abstract class AbstractOutgoingFileTransfer implements IOutgoingFileTrans * Select a single proxy from a set of proxies available for the given host. This implementation * selects in the following manner: 1) If proxies provided is null or array of 0 length, null * is returned. If only one proxy is available (array of length 1) then the entry is returned. - * If proxies provided is length > 1, then if the type of a proxy in the array matches the given + * If proxies provided is length greater than 1, then if the type of a proxy in the array matches the given * protocol (e.g. http, https), then the first matching proxy is returned. If the protocol does * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned. Subclasses may * override if desired. diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java index 8ae247c2b..8cd2f070e 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java @@ -434,8 +434,8 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans return bytesReceived; } - // TODO: replace other instances. /** + * @return UserCancelledException if some user cancellation * @since 3.0 */ protected UserCancelledException newUserCancelledException() { @@ -561,7 +561,7 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans * must be non-<code>null</code> after successful completion of the * implementation of this method. * - * @throws IncomingFileTransferException + * @throws IncomingFileTransferException if some problem */ protected abstract void openStreams() throws IncomingFileTransferException; @@ -852,7 +852,7 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans * org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map) */ /** - * @throws IncomingFileTransferException + * @throws IncomingFileTransferException if some problem sending retrieve request */ public void sendRetrieveRequest(IFileID rFileID, IFileRangeSpecification rangeSpec, IFileTransferListener transferListener, Map ops) throws IncomingFileTransferException { Assert.isNotNull(rFileID, Messages.AbstractRetrieveFileTransfer_RemoteFileID_Not_Null); @@ -906,7 +906,7 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans * This implementation selects in the following manner: 1) If proxies * provided is null or array of 0 length, null is returned. If only one * proxy is available (array of length 1) then the entry is returned. If - * proxies provided is length > 1, then if the type of a proxy in the array + * proxies provided is length greater than 1, then if the type of a proxy in the array * matches the given protocol (e.g. http, https), then the first matching * proxy is returned. If the protocol does not match any of the proxies, * then the *first* proxy (i.e. proxies[0]) is returned. Subclasses may diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java index a66ba05fd..e4276780e 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java @@ -227,6 +227,8 @@ public class PollingInputStream extends FilterInputStream { /** * Reads any pending input from the input stream so that the stream can * savely be closed. + * + * @throws IOException if some problem reading */ protected void readPendingInput() throws IOException { byte[] buffer = new byte[2048]; diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java index 680b02951..2fd51786d 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java @@ -67,7 +67,7 @@ public class ProxySetupHelper { * Select a single proxy from a set of proxies available for the given host. This implementation * selects in the following manner: 1) If proxies provided is null or array of 0 length, null * is returned. If only one proxy is available (array of length 1) then the entry is returned. - * If proxies provided is length > 1, then if the type of a proxy in the array matches the given + * If proxies provided is length greater than 1, then if the type of a proxy in the array matches the given * protocol (e.g. http, https), then the first matching proxy is returned. If the protocol does * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned. * diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/JmDNS.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/JmDNS.java index e0b6c822e..6b6451f63 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/JmDNS.java +++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/JmDNS.java @@ -2,12 +2,10 @@ //Licensed under Apache License version 2.0 //Original license LGPL - package javax.jmdns; import java.io.IOException; import java.net.InetAddress; - import javax.jmdns.impl.JmDNSImpl; /** @@ -17,163 +15,160 @@ import javax.jmdns.impl.JmDNSImpl; * @author Arthur van Hoff, Rick Blair, Jeff Sonstein, * Werner Randelshofer, Pierre Frisch, Scott Lewis, Scott Cytacki */ -public abstract class JmDNS -{ - /** - * The version of JmDNS. - */ - public static String VERSION = "2.0"; - - /** - * Create an instance of JmDNS. - */ - public static JmDNS create() throws IOException - { - return new JmDNSImpl(); - } - - /** - * Create an instance of JmDNS and bind it to a - * specific network interface given its IP-address. - */ - public static JmDNS create(InetAddress addr) throws IOException - { - return new JmDNSImpl(addr); - } - - /** - * Return the HostName associated with this JmDNS instance. - * Note: May not be the same as what started. The host name is subject to - * negotiation. - */ - public abstract String getHostName(); - - /** - * Return the address of the interface to which this instance of JmDNS is - * bound. - */ - public abstract InetAddress getInterface() throws IOException; - - /** - * Get service information. If the information is not cached, the method - * will block until updated information is received. - * <p/> - * Usage note: Do not call this method from the AWT event dispatcher thread. - * You will make the user interface unresponsive. - * - * @param type fully qualified service type, such as <code>_http._tcp.local.</code> . - * @param name unqualified service name, such as <code>foobar</code> . - * @return null if the service information cannot be obtained - */ - public abstract ServiceInfo getServiceInfo(String type, String name); - - /** - * Get service information. If the information is not cached, the method - * will block for the given timeout until updated information is received. - * <p/> - * Usage note: If you call this method from the AWT event dispatcher thread, - * use a small timeout, or you will make the user interface unresponsive. - * - * @param type full qualified service type, such as <code>_http._tcp.local.</code> . - * @param name unqualified service name, such as <code>foobar</code> . - * @param timeout timeout in milliseconds - * @return null if the service information cannot be obtained - */ - public abstract ServiceInfo getServiceInfo(String type, String name, int timeout); - - /** - * Request service information. The information about the service is - * requested and the ServiceListener.resolveService method is called as soon - * as it is available. - * <p/> - * Usage note: Do not call this method from the AWT event dispatcher thread. - * You will make the user interface unresponsive. - * - * @param type full qualified service type, such as <code>_http._tcp.local.</code> . - * @param name unqualified service name, such as <code>foobar</code> . - */ - public abstract void requestServiceInfo(String type, String name); - - /** - * Request service information. The information about the service is requested - * and the ServiceListener.resolveService method is called as soon as it is available. - * - * @param type full qualified service type, such as <code>_http._tcp.local.</code> . - * @param name unqualified service name, such as <code>foobar</code> . - * @param timeout timeout in milliseconds - */ - public abstract void requestServiceInfo(String type, String name, int timeout); - - /** - * Listen for service types. - * - * @param listener listener for service types - */ - public abstract void addServiceTypeListener(ServiceTypeListener listener) throws IOException; - - /** - * Remove listener for service types. - * - * @param listener listener for service types - */ - public abstract void removeServiceTypeListener(ServiceTypeListener listener); - - /** - * Listen for services of a given type. The type has to be a fully qualified - * type name such as <code>_http._tcp.local.</code>. - * - * @param type full qualified service type, such as <code>_http._tcp.local.</code>. - * @param listener listener for service updates - */ - public abstract void addServiceListener(String type, ServiceListener listener); - - /** - * Remove listener for services of a given type. - * - * @param listener listener for service updates - */ - public abstract void removeServiceListener(String type, ServiceListener listener); - - /** - * Register a service. The service is registered for access by other jmdns clients. - * The name of the service may be changed to make it unique. - */ - public abstract void registerService(ServiceInfo info) throws IOException; - - /** - * Unregister a service. The service should have been registered. - */ - public abstract void unregisterService(ServiceInfo info); - - /** - * Unregister all services. - */ - public abstract void unregisterAllServices(); - - /** - * Register a service type. If this service type was not already known, - * all service listeners will be notified of the new service type. Service types - * are automatically registered as they are discovered. - */ - public abstract void registerServiceType(String type); - - /** - * Close down jmdns. Release all resources and unregister all services. - */ - public abstract void close(); - - /** - * List Services and serviceTypes. - * Debugging Only - */ - public abstract void printServices(); - - /** - * Returns a list of service infos of the specified type. - * - * @param type Service type name, such as <code>_http._tcp.local.</code>. - * @return An array of service instance names. - */ - public abstract ServiceInfo[] list(String type); +public abstract class JmDNS { + /** + * The version of JmDNS. + */ + public static String VERSION = "2.0"; + + /** + * Create an instance of JmDNS. + */ + public static JmDNS create() throws IOException { + return new JmDNSImpl(); + } + + /** + * Create an instance of JmDNS and bind it to a + * specific network interface given its IP-address. + */ + public static JmDNS create(InetAddress addr) throws IOException { + return new JmDNSImpl(addr); + } + + /** + * Return the HostName associated with this JmDNS instance. + * Note: May not be the same as what started. The host name is subject to + * negotiation. + */ + public abstract String getHostName(); + + /** + * Return the address of the interface to which this instance of JmDNS is + * bound. + */ + public abstract InetAddress getInterface() throws IOException; + + /** + * Get service information. If the information is not cached, the method + * will block until updated information is received. + * <p> + * Usage note: Do not call this method from the AWT event dispatcher thread. + * You will make the user interface unresponsive. + * + * @param type fully qualified service type, such as <code>_http._tcp.local.</code> . + * @param name unqualified service name, such as <code>foobar</code> . + * @return null if the service information cannot be obtained + */ + public abstract ServiceInfo getServiceInfo(String type, String name); + + /** + * Get service information. If the information is not cached, the method + * will block for the given timeout until updated information is received. + * <p> + * Usage note: If you call this method from the AWT event dispatcher thread, + * use a small timeout, or you will make the user interface unresponsive. + * + * @param type full qualified service type, such as <code>_http._tcp.local.</code> . + * @param name unqualified service name, such as <code>foobar</code> . + * @param timeout timeout in milliseconds + * @return null if the service information cannot be obtained + */ + public abstract ServiceInfo getServiceInfo(String type, String name, int timeout); + + /** + * Request service information. The information about the service is + * requested and the ServiceListener.resolveService method is called as soon + * as it is available. + * <p> + * Usage note: Do not call this method from the AWT event dispatcher thread. + * You will make the user interface unresponsive. + * + * @param type full qualified service type, such as <code>_http._tcp.local.</code> . + * @param name unqualified service name, such as <code>foobar</code> . + */ + public abstract void requestServiceInfo(String type, String name); + + /** + * Request service information. The information about the service is requested + * and the ServiceListener.resolveService method is called as soon as it is available. + * + * @param type full qualified service type, such as <code>_http._tcp.local.</code> . + * @param name unqualified service name, such as <code>foobar</code> . + * @param timeout timeout in milliseconds + */ + public abstract void requestServiceInfo(String type, String name, int timeout); + + /** + * Listen for service types. + * + * @param listener listener for service types + */ + public abstract void addServiceTypeListener(ServiceTypeListener listener) throws IOException; + + /** + * Remove listener for service types. + * + * @param listener listener for service types + */ + public abstract void removeServiceTypeListener(ServiceTypeListener listener); + + /** + * Listen for services of a given type. The type has to be a fully qualified + * type name such as <code>_http._tcp.local.</code>. + * + * @param type full qualified service type, such as <code>_http._tcp.local.</code>. + * @param listener listener for service updates + */ + public abstract void addServiceListener(String type, ServiceListener listener); + + /** + * Remove listener for services of a given type. + * + * @param listener listener for service updates + */ + public abstract void removeServiceListener(String type, ServiceListener listener); + + /** + * Register a service. The service is registered for access by other jmdns clients. + * The name of the service may be changed to make it unique. + */ + public abstract void registerService(ServiceInfo info) throws IOException; + + /** + * Unregister a service. The service should have been registered. + */ + public abstract void unregisterService(ServiceInfo info); + + /** + * Unregister all services. + */ + public abstract void unregisterAllServices(); + + /** + * Register a service type. If this service type was not already known, + * all service listeners will be notified of the new service type. Service types + * are automatically registered as they are discovered. + */ + public abstract void registerServiceType(String type); + + /** + * Close down jmdns. Release all resources and unregister all services. + */ + public abstract void close(); + + /** + * List Services and serviceTypes. + * Debugging Only + */ + public abstract void printServices(); + + /** + * Returns a list of service infos of the specified type. + * + * @param type Service type name, such as <code>_http._tcp.local.</code>. + * @return An array of service instance names. + */ + public abstract ServiceInfo[] list(String type); } diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/DNSCache.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/DNSCache.java index 9446c1623..921b4bb4f 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/DNSCache.java +++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/DNSCache.java @@ -4,15 +4,13 @@ package javax.jmdns.impl; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; +import java.util.*; //import java.util.logging.Logger; /** * A table of DNS entries. This is a hash table which can handle multiple - * entries with the same name. <p/> Storing multiple entries with the same name - * is implemented using a linked list of <code>CacheNode</code>'s. <p/> The + * entries with the same name. <p> Storing multiple entries with the same name + * is implemented using a linked list of <code>CacheNode</code>'s. <p> The * current implementation of the API of DNSCache does expose the cache nodes to * clients. Clients must explicitly deal with the nodes when iterating over * entries in the cache. Here's how to iterate over all entries in the cache: @@ -26,227 +24,186 @@ import java.util.Iterator; * } * </pre> * - * <p/> And here's how to iterate over all entries having a given name: - * - * <pre> - * for (DNSCache.CacheNode n = (DNSCache.CacheNode) dnscache.find(name); n != null; n.next()) { - * DNSEntry entry = n.getValue(); - * ...do something with entry... - * } - * </pre> + * <p> And here's how to iterate over all entries having a given name: * * @version %I%, %G% * @author Arthur van Hoff, Werner Randelshofer, Rick Blair */ -public class DNSCache -{ -// private static Logger logger = Logger.getLogger(DNSCache.class.getName()); - // Implementation note: - // We might completely hide the existence of CacheNode's in a future version - // of DNSCache. But this will require to implement two (inner) classes for - // the iterators that will be returned by method <code>iterator()</code> and - // method <code>find(name)</code>. - // Since DNSCache is not a public class, it does not seem worth the effort - // to clean its API up that much. - - // [PJYF Oct 15 2004] This should implements Collections that would be amuch - // cleaner implementation - - /** - * The number of DNSEntry's in the cache. - */ - private int size; - - /** - * The hashtable used internally to store the entries of the cache. Keys are - * instances of String. The String contains an unqualified service name. - * Values are linked lists of CacheNode instances. - */ - private final HashMap hashtable; - - /** - * Cache nodes are used to implement storage of multiple DNSEntry's of the - * same name in the cache. - */ - public static class CacheNode - { -// private static Logger logger = Logger.getLogger(CacheNode.class.getName()); - private final DNSEntry value; - private CacheNode next; - - public CacheNode(DNSEntry value) - { - this.value = value; - } - - public CacheNode next() - { - return next; - } - - public DNSEntry getValue() - { - return value; - } - } - - /** - * Create a table with a given initial size. - */ - public DNSCache(final int size) - { - hashtable = new HashMap(size); - } - - /** - * Clears the cache. - */ - public synchronized void clear() - { - hashtable.clear(); - size = 0; - } - - /** - * Adds an entry to the table. - */ - public synchronized void add(final DNSEntry entry) - { - // logger.log("DNSCache.add("+entry.getName()+")"); - final CacheNode newValue = new CacheNode(entry); - final CacheNode node = (CacheNode) hashtable.get(entry.getName()); - if (node == null) - { - hashtable.put(entry.getName(), newValue); - } - else - { - newValue.next = node.next; - node.next = newValue; - } - size++; - } - - /** - * Remove a specific entry from the table. Returns true if the entry was - * found. - */ - public synchronized boolean remove(DNSEntry entry) - { - CacheNode node = (CacheNode) hashtable.get(entry.getName()); - if (node != null) - { - if (node.value == entry) - { - if (node.next == null) - { - hashtable.remove(entry.getName()); - } - else - { - hashtable.put(entry.getName(), node.next); - } - size--; - return true; - } - - CacheNode previous = node; - node = node.next; - while (node != null) - { - if (node.value == entry) - { - previous.next = node.next; - size--; - return true; - } - previous = node; - node = node.next; - } - ; - } - return false; - } - - /** - * Get a matching DNS entry from the table (using equals). Returns the entry - * that was found. - */ - public synchronized DNSEntry get(DNSEntry entry) - { - for (CacheNode node = find(entry.getName()); node != null; node = node.next) - { - if (node.value.equals(entry)) - { - return node.value; - } - } - return null; - } - - /** - * Get a matching DNS entry from the table. - */ - public synchronized DNSEntry get(String name, int type, int clazz) - { - for (CacheNode node = find(name); node != null; node = node.next) - { - if (node.value.type == type && node.value.clazz == clazz) - { - return node.value; - } - } - return null; - } - - /** - * Iterates over all cache nodes. The iterator returns instances of - * DNSCache.CacheNode. Each instance returned is the first node of a linked - * list. To retrieve all entries, one must iterate over this linked list. - * See code snippets in the header of the class. - */ - public synchronized Iterator iterator() - { - return new ArrayList(hashtable.values()).iterator(); - } - - /** - * Iterate only over items with matching name. Returns an instance of - * DNSCache.CacheNode or null. If an instance is returned, it is the first - * node of a linked list. To retrieve all entries, one must iterate over - * this linked list. - */ - public synchronized CacheNode find(String name) - { - return (CacheNode) hashtable.get(name); - } - - /** - * List all entries for debugging. - */ - public synchronized void print() - { - for (final Iterator i = iterator(); i.hasNext();) - { - for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next) - { - System.out.println(n.value); - } - } - } - - public synchronized String toString() - { - final StringBuffer aLog = new StringBuffer(); - aLog.append("\t---- cache ----"); - for (final Iterator i = iterator(); i.hasNext();) - { - for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next) - { - aLog.append("\n\t\t" + n.value); - } - } - return aLog.toString(); - } +public class DNSCache { + // private static Logger logger = Logger.getLogger(DNSCache.class.getName()); + // Implementation note: + // We might completely hide the existence of CacheNode's in a future version + // of DNSCache. But this will require to implement two (inner) classes for + // the iterators that will be returned by method <code>iterator()</code> and + // method <code>find(name)</code>. + // Since DNSCache is not a public class, it does not seem worth the effort + // to clean its API up that much. + + // [PJYF Oct 15 2004] This should implements Collections that would be amuch + // cleaner implementation + + /** + * The number of DNSEntry's in the cache. + */ + private int size; + + /** + * The hashtable used internally to store the entries of the cache. Keys are + * instances of String. The String contains an unqualified service name. + * Values are linked lists of CacheNode instances. + */ + private final HashMap hashtable; + + /** + * Cache nodes are used to implement storage of multiple DNSEntry's of the + * same name in the cache. + */ + public static class CacheNode { + // private static Logger logger = Logger.getLogger(CacheNode.class.getName()); + private final DNSEntry value; + private CacheNode next; + + public CacheNode(DNSEntry value) { + this.value = value; + } + + public CacheNode next() { + return next; + } + + public DNSEntry getValue() { + return value; + } + } + + /** + * Create a table with a given initial size. + */ + public DNSCache(final int size) { + hashtable = new HashMap(size); + } + + /** + * Clears the cache. + */ + public synchronized void clear() { + hashtable.clear(); + size = 0; + } + + /** + * Adds an entry to the table. + */ + public synchronized void add(final DNSEntry entry) { + // logger.log("DNSCache.add("+entry.getName()+")"); + final CacheNode newValue = new CacheNode(entry); + final CacheNode node = (CacheNode) hashtable.get(entry.getName()); + if (node == null) { + hashtable.put(entry.getName(), newValue); + } else { + newValue.next = node.next; + node.next = newValue; + } + size++; + } + + /** + * Remove a specific entry from the table. Returns true if the entry was + * found. + */ + public synchronized boolean remove(DNSEntry entry) { + CacheNode node = (CacheNode) hashtable.get(entry.getName()); + if (node != null) { + if (node.value == entry) { + if (node.next == null) { + hashtable.remove(entry.getName()); + } else { + hashtable.put(entry.getName(), node.next); + } + size--; + return true; + } + + CacheNode previous = node; + node = node.next; + while (node != null) { + if (node.value == entry) { + previous.next = node.next; + size--; + return true; + } + previous = node; + node = node.next; + }; + } + return false; + } + + /** + * Get a matching DNS entry from the table (using equals). Returns the entry + * that was found. + */ + public synchronized DNSEntry get(DNSEntry entry) { + for (CacheNode node = find(entry.getName()); node != null; node = node.next) { + if (node.value.equals(entry)) { + return node.value; + } + } + return null; + } + + /** + * Get a matching DNS entry from the table. + */ + public synchronized DNSEntry get(String name, int type, int clazz) { + for (CacheNode node = find(name); node != null; node = node.next) { + if (node.value.type == type && node.value.clazz == clazz) { + return node.value; + } + } + return null; + } + + /** + * Iterates over all cache nodes. The iterator returns instances of + * DNSCache.CacheNode. Each instance returned is the first node of a linked + * list. To retrieve all entries, one must iterate over this linked list. + * See code snippets in the header of the class. + */ + public synchronized Iterator iterator() { + return new ArrayList(hashtable.values()).iterator(); + } + + /** + * Iterate only over items with matching name. Returns an instance of + * DNSCache.CacheNode or null. If an instance is returned, it is the first + * node of a linked list. To retrieve all entries, one must iterate over + * this linked list. + */ + public synchronized CacheNode find(String name) { + return (CacheNode) hashtable.get(name); + } + + /** + * List all entries for debugging. + */ + public synchronized void print() { + for (final Iterator i = iterator(); i.hasNext();) { + for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next) { + System.out.println(n.value); + } + } + } + + public synchronized String toString() { + final StringBuffer aLog = new StringBuffer(); + aLog.append("\t---- cache ----"); + for (final Iterator i = iterator(); i.hasNext();) { + for (CacheNode n = (CacheNode) i.next(); n != null; n = n.next) { + aLog.append("\n\t\t" + n.value); + } + } + return aLog.toString(); + } } diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java index ac6a046fa..ce80b18cb 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java +++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSNamespace.java @@ -28,6 +28,7 @@ public class JMDNSNamespace extends Namespace { } /** + * @param description description for namespace * @since 4.3 */ public JMDNSNamespace(String description) { @@ -102,6 +103,6 @@ public class JMDNSNamespace extends Namespace { * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance() */ public Class[][] getSupportedParameterTypes() { - return new Class[][] { {String.class}, {String.class, String.class}}; + return new Class[][] {{String.class}, {String.class, String.class}}; } } diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceID.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceID.java index ef4d58e02..a51d5755e 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceID.java +++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceID.java @@ -20,6 +20,9 @@ public class JMDNSServiceID extends ServiceID { private static final long serialVersionUID = 8389531866888790264L; /** + * @param namespace namespace for this ID + * @param type service type ID + * @param anURI uri for the service id * @since 3.0 */ public JMDNSServiceID(final Namespace namespace, final IServiceTypeID type, final URI anURI) { diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/ContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/ContainerInstantiator.java index 68c71e625..7b8cdc201 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/ContainerInstantiator.java +++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/ContainerInstantiator.java @@ -53,8 +53,8 @@ public class ContainerInstantiator implements IContainerInstantiator { } /** - * @param description - * @return String[] + * @param description description + * @return String[] supported intents * @since 3.0 */ public String[] getSupportedIntents(final ContainerTypeDescription description) { diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/JSLPServiceInfo.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/JSLPServiceInfo.java index 374ef3c95..4f0e84217 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/JSLPServiceInfo.java +++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/container/JSLPServiceInfo.java @@ -15,8 +15,10 @@ import ch.ethz.iks.slp.ServiceURL; import java.net.URI; import org.eclipse.ecf.core.identity.IDCreateException; import org.eclipse.ecf.core.identity.IDFactory; -import org.eclipse.ecf.discovery.*; -import org.eclipse.ecf.discovery.identity.*; +import org.eclipse.ecf.discovery.IServiceInfo; +import org.eclipse.ecf.discovery.ServiceInfo; +import org.eclipse.ecf.discovery.identity.IServiceTypeID; +import org.eclipse.ecf.discovery.identity.ServiceIDFactory; import org.eclipse.ecf.internal.provider.jslp.ServicePropertiesAdapter; import org.eclipse.ecf.internal.provider.jslp.ServiceURLAdapter; import org.eclipse.ecf.provider.jslp.identity.JSLPNamespace; @@ -25,28 +27,28 @@ public class JSLPServiceInfo extends ServiceInfo implements IServiceInfo { private static final long serialVersionUID = 6828789192986625259L; -// public JSLPServiceInfo(final URI anURI, final IServiceID serviceID, final int priority, final int weight, final IServiceProperties props) { -// super(anURI, serviceID, priority, weight, props); -// } -// -// /** -// * @param serviceID -// * @deprecated -// */ -// public JSLPServiceInfo(final IServiceID serviceID) { -// super(null, serviceID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, new ServiceProperties()); -// } -// + // public JSLPServiceInfo(final URI anURI, final IServiceID serviceID, final int priority, final int weight, final IServiceProperties props) { + // super(anURI, serviceID, priority, weight, props); + // } + // + // /** + // * @param serviceID + // * @deprecated + // */ + // public JSLPServiceInfo(final IServiceID serviceID) { + // super(null, serviceID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, new ServiceProperties()); + // } + // public JSLPServiceInfo(final IServiceInfo aSI) throws IDCreateException { super(aSI.getServiceID().getLocation(), aSI.getServiceName(), ServiceIDFactory.getDefault().createServiceTypeID(IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME), aSI.getServiceID().getServiceTypeID()), aSI.getPriority(), aSI.getWeight(), aSI.getServiceProperties()); } /** - * @param aServiceName - * @param anAdapter - * @param priority - * @param weight - * @param aServicePropertiesAdapter + * @param aServiceName service name + * @param anAdapter service url adapter + * @param priority priority + * @param weight weight + * @param aServicePropertiesAdapter service properties adapter * @since 3.0 */ public JSLPServiceInfo(final String aServiceName, final ServiceURLAdapter anAdapter, final int priority, final int weight, final ServicePropertiesAdapter aServicePropertiesAdapter) { diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiID.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiID.java index ee86908c8..b58943379 100644 --- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiID.java +++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiID.java @@ -46,6 +46,7 @@ public class R_OSGiID extends BaseID { } /** + * @param ns namespace * @since 3.5 */ protected R_OSGiID(Namespace ns) { diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiNamespace.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiNamespace.java index 0c40bee68..8e9ddacec 100644 --- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiNamespace.java +++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiNamespace.java @@ -58,6 +58,8 @@ public class R_OSGiNamespace extends Namespace { } /** + * @param name name + * @param description description * @since 3.5 */ protected R_OSGiNamespace(String name, String description) { diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/AddRegistrationRequest.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/AddRegistrationRequest.java index 3bce73d03..bdbd75459 100644 --- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/AddRegistrationRequest.java +++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/AddRegistrationRequest.java @@ -28,6 +28,10 @@ public class AddRegistrationRequest implements Serializable { private boolean done = false; /** + * @param targetID targetID + * @param service service + * @param filter filter + * @param parent parent request * @since 3.0 */ public AddRegistrationRequest(ID targetID, String service, String filter, AddRegistrationRequest parent) { @@ -40,6 +44,9 @@ public class AddRegistrationRequest implements Serializable { private transient Vector requests = null; /** + * @param service service + * @param filter filter + * @param requests other requests * @since 3.3 */ @SuppressWarnings("unchecked") @@ -67,6 +74,7 @@ public class AddRegistrationRequest implements Serializable { } /** + * @param timeout timeout * @since 3.3 */ public void waitForResponse(long timeout) { @@ -119,6 +127,8 @@ public class AddRegistrationRequest implements Serializable { } /** + * @param from from ID + * @param exception exception * @since 3.0 */ public void notifyResponse(ID from, AccessControlException exception) { diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java index 767c58e23..c10b31c6d 100644 --- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java +++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java @@ -210,6 +210,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param registration registration + * @return RemoteServiceImpl remote service implementation * @since 4.1 */ protected RemoteServiceImpl createRemoteService(RemoteServiceRegistrationImpl registration) { @@ -498,6 +500,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer // End ISharedObject overrides /** + * @return int connect timeout * @since 3.3 */ protected int getRSConnectTimeout() { @@ -505,6 +508,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @return long registry update request timeout * @since 3.4 */ protected long getRegistryUpdateRequestTimeout() { @@ -577,6 +581,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @return int add registration request timeout * @since 3.0 */ protected int getAddRegistrationRequestTimeout() { @@ -584,6 +589,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param targetID target ID to connect to + * @throws ContainerConnectException if container cannot connect to target ID * @since 3.3 for preventing issues like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=304427 */ protected void connectToRemoteServiceTarget(ID targetID) throws ContainerConnectException { @@ -670,10 +677,11 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param event event to handle * @since 3.3 */ - protected void handleContainerEjectedEvent(IContainerEjectedEvent arg0) { - handleTargetGoneEvent(arg0.getTargetID()); + protected void handleContainerEjectedEvent(IContainerEjectedEvent event) { + handleTargetGoneEvent(event.getTargetID()); } /** @@ -738,6 +746,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param connected true if registry is connected, false otherwise * @since 3.3 */ protected void setRegistryConnected(boolean connected) { @@ -756,6 +765,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param targetContainerID target container ID + * @param requestId requestId * @since 3.4 */ protected void sendRegistryUpdate(ID targetContainerID, Integer requestId) { @@ -822,6 +833,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param targetID targetID * @since 3.4 */ protected void handleTargetConnected(ID targetID) { @@ -1092,6 +1104,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer private static final String REGISTRY_UPDATE_REQUEST = "handleRegistryUpdateRequest"; //$NON-NLS-1$ /** + * @param receiver receiver + * @param requestId requestId * @since 3.4 */ protected void sendRegistryUpdateRequest(ID receiver, Integer requestId) { @@ -1105,6 +1119,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param remoteContainerID remoteContainerID + * @param requestId requestId * @since 3.4 */ protected void handleRegistryUpdateRequest(ID remoteContainerID, Integer requestId) { @@ -1221,6 +1237,9 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param receiver receiver + * @param requestId requestId + * @param regs registrations to send * @since 3.3 */ protected void sendAddRegistrations(ID receiver, Integer requestId, RemoteServiceRegistrationImpl[] regs) { @@ -1261,6 +1280,9 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param remoteContainerID container id + * @param requestId requestId + * @param registrations the registrations to add * @since 3.3 */ @SuppressWarnings("unchecked") @@ -1334,7 +1356,9 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** - * @param requestId + * @param remoteContainerID remoteContainerID + * @param requestId requestId + * @param exception exception * @since 3.2 */ protected void notifyAddRegistrationResponse(ID remoteContainerID, Integer requestId, AccessControlException exception) { @@ -1373,6 +1397,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param request request + * @return IExcecutor excecutor to use for given request * @since 3.4 */ protected IExecutor createRequestExecutor(final Request request) { @@ -1396,6 +1422,11 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param executor executor to use to execute request + * @param request the request to execute + * @param responseTarget response target + * @param localRegistration the local registration + * @param respond true if response is expected, false otherwise * @since 3.4 */ @SuppressWarnings("unchecked") @@ -1476,6 +1507,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param message message + * @param e the exception * @since 3.4 */ protected void logRemoteCallException(String message, Throwable e) { @@ -1736,10 +1769,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer }; } - /** - * End message send/handlers - */ - @SuppressWarnings("unchecked") protected RemoteServiceRegistryImpl addRemoteRegistry(RemoteServiceRegistryImpl registry) { return (RemoteServiceRegistryImpl) remoteRegistrys.put(registry.getContainerID(), registry); @@ -1754,7 +1783,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** - * + * @param request request + * @return RemoteServiceRegistrationImpl the registration * @since 3.2 */ protected RemoteServiceRegistrationImpl getLocalRegistrationForRequest(Request request) { @@ -1764,6 +1794,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param request the request to add + * @return true if added, false if not added * @since 3.2 */ @SuppressWarnings("unchecked") @@ -1774,6 +1806,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param requestId requestId + * @return Request the request associated with the given requestId or <code>null</code> * @since 3.2 */ protected Request getRequest(long requestId) { @@ -1790,6 +1824,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param request request + * @return boolean true if removed, false otherwise * @since 3.2 */ protected boolean removeRequest(Request request) { @@ -1813,6 +1849,7 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @return IRemoteServiceCallPolicy the policy. May be <code>null</code> * @since 4.0 */ protected IRemoteServiceCallPolicy getRemoteServiceCallPolicy() { @@ -1822,6 +1859,8 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer } /** + * @param policy the policy to set. May be <code>null</code> + * @return boolean true if set, false if cannot be set. * @since 4.0 */ public boolean setRemoteServiceCallPolicy(IRemoteServiceCallPolicy policy) { diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCallImpl.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCallImpl.java index 8e8f83016..5923b843a 100644 --- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCallImpl.java +++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCallImpl.java @@ -20,6 +20,11 @@ public class RemoteCallImpl extends SharedObjectMsg implements IRemoteCall, Seri long timeout = IRemoteCall.DEFAULT_TIMEOUT; /** + * @param clazz the class + * @param method the method + * @param parameters the parameters + * @param timeout timeout + * @return RemoteCallImpl created remote call * @since 4.0 */ public static RemoteCallImpl createRemoteCall(String clazz, String method, Object[] parameters, long timeout) { @@ -40,9 +45,10 @@ public class RemoteCallImpl extends SharedObjectMsg implements IRemoteCall, Seri synchronized (buf) { buf.append("class=").append(clazz).append(';'); //$NON-NLS-1$ buf.append("method=").append(method).append(';'); //$NON-NLS-1$ - buf.append("params=").append( //$NON-NLS-1$ - parameters == null ? "" : Arrays.asList(parameters) //$NON-NLS-1$ - .toString()).append(';'); + buf.append("params=") //$NON-NLS-1$ + .append(parameters == null ? "" : Arrays.asList(parameters) //$NON-NLS-1$ + .toString()) + .append(';'); buf.append("timeout=").append(timeout).append(']'); //$NON-NLS-1$ } return buf.toString(); diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteFilterImpl.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteFilterImpl.java index 80a6311de..c3d37411c 100644 --- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteFilterImpl.java +++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteFilterImpl.java @@ -22,7 +22,8 @@ import org.osgi.framework.ServiceReference; public class RemoteFilterImpl extends org.eclipse.ecf.remoteservice.util.RemoteFilterImpl implements IRemoteFilter { /** - * @param createFilter + * @param createFilter filter to use + * @throws InvalidSyntaxException if given createFilter is not a valid filter */ public RemoteFilterImpl(String createFilter) throws InvalidSyntaxException { super(createFilter); diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceRegistryImpl.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceRegistryImpl.java index 6cfb52f99..b634c5a28 100644 --- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceRegistryImpl.java +++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceRegistryImpl.java @@ -55,6 +55,7 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param containerID containerID * @since 3.4 */ public void setContainerID(ID containerID) { @@ -193,6 +194,8 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param remoteServiceID remoteServiceID for registration to find + * @return RemoteServiceRegistrationImpl a registration instance for given remoteServiceID * @since 3.0 */ protected RemoteServiceRegistrationImpl findRegistrationForRemoteServiceId(IRemoteServiceID remoteServiceID) { @@ -211,6 +214,8 @@ public class RemoteServiceRegistryImpl implements Serializable { } /** + * @param serviceid remote service id + * @return IRemoteServiceID new remoteServiceId * @since 3.0 */ public IRemoteServiceID createRemoteServiceID(long serviceid) { diff --git a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java index 273070a74..224b63d0d 100644 --- a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java +++ b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java @@ -234,7 +234,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * the this shared object and it's enclosing {@link IContainer}. The event * to post must not be <code>null</code>. * <p> - * </p> * This implementation goes through the following steps * <ol> * <li>Call {@link #getEventToSend(Event)}. If the Event returned from @@ -273,7 +272,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * serialized and sent via * {@link #sendSharedObjectMsgTo(ID, SharedObjectMsg)}. * <p> - * </p> * Prior to actual sending, the {@link #getTarget(Event)} method will be * called, to allow subclasses to determine the target receiver. Then the * {@link #createMessageDataFromEvent(ID, Event)} method is called, to @@ -281,11 +279,9 @@ public class DistributedEventAdmin extends BaseSharedObject implements * returned from {@link #createMessageDataFromEvent(ID, Event)} must be * serializable. See {@link #createMessageDataFromEvent(ID, Event)}. * <p> - * </p> * Subclasses may override this method to customize or replace this * sendMessage behavior. * <p> - * </p> * If an exception occurs on serialization or sending, the * {@link #handleSendMessageException(String, Event, Object[], IOException)} * method will be called to handle it. @@ -315,15 +311,12 @@ public class DistributedEventAdmin extends BaseSharedObject implements * deserialize via {@link #createEventFromMessageData(ID, Object[])} on the * receiver. * <p> - * </p> * The default implementation creates a single {@link EventMessage} instance * and adds it to an Object[] of length 1. * <p> - * </p> * Subclasses may override as appropriate to customize the serialization of * the given eventToSend. * <p> - * </p> * Subclasses may override as appropriate. If this method is overridden, * then {@link #createEventFromMessageData(ID, Object[])} should also be * overridden as well on the receiver. @@ -348,6 +341,8 @@ public class DistributedEventAdmin extends BaseSharedObject implements } /** + * @param topic topic + * @return SerializationHandler the serialization handler associated with topic * @since 1.2 */ protected SerializationHandler getSerializationHandler(String topic) { @@ -366,7 +361,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * of the messageData, casts the messageData[0] to EventMessage, and then * returns eventMessage.getEvent(). * <p> - * </p> * Subclasses can override as appropriate. If this method is overridden, * then {@link #createMessageDataFromEvent(ID, Event)} should also be * overridden as well on the sender. @@ -398,6 +392,7 @@ public class DistributedEventAdmin extends BaseSharedObject implements * the event that was to be sent. * @param messageParams * the message params that were to be + * @param exception exception * @since 1.1 */ protected void handleSendMessageException(String message, @@ -448,7 +443,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * implementation of this method is to simply return the event passed in as * the method argument. * <p> - * </p> * Subclasses may override...to filter or transform the event prior to * calling {@link #sendMessage(Event)}. * @@ -483,7 +477,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * appropriate. If the returned Event is <code>null</code> then no local * dispatch will occur for the given Event. * <p> - * </p> * Subclasses may override as appropriate. * * @param event @@ -505,7 +498,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements * <code>true</code>), then the dispatch could occur before, after, or * during the actual handling via the matching {@link EventHandler}s. * <p> - * </p> * Subclasses may override as appropriate. * * @param event @@ -588,7 +580,7 @@ public class DistributedEventAdmin extends BaseSharedObject implements /** * Handle the shared object message. This method is called on receiver implementations of * the DistributedEventAdmin, so that they can deliver to locally registered {@link EventHandler}s. - * <p></p> + * <p> * This implementation does the following: * <ol> * <li>Verifies that the value {@link SharedObjectMsg#getMethod()} matches the appropriate String.</li> @@ -628,6 +620,8 @@ public class DistributedEventAdmin extends BaseSharedObject implements } /** + * @param fromID fromID + * @param receivedEvent received event * @since 1.1 */ protected void notifyReceivedEvent(ID fromID, Event receivedEvent) { @@ -657,7 +651,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements /** * Log a warning. * <p> - * </p> * Subclasses may override as appropriate. * * @param message @@ -672,7 +665,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements /** * Log a warning. * <p> - * </p> * Subclasses may override as appropriate. * * @param message @@ -698,7 +690,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements /** * Log an error. * <p> - * </p> * Subclasses may override as appropriate. * * @param message @@ -713,7 +704,6 @@ public class DistributedEventAdmin extends BaseSharedObject implements /** * Log an error. * <p> - * </p> * Subclasses may override as appropriate. * * @param message @@ -735,6 +725,8 @@ public class DistributedEventAdmin extends BaseSharedObject implements } /** + * @param filters topic filters to add + * @return boolean true if given filters added, false otherwise * @since 1.2 */ public boolean addEventTopicFilters(String[] filters) { @@ -743,6 +735,8 @@ public class DistributedEventAdmin extends BaseSharedObject implements } /** + * @param filters topic filters to add + * @return boolean true if given filters added, false otherwise * @since 1.2 */ public boolean removeEventTopicFilters(String[] filters) { diff --git a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/EventMessage.java b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/EventMessage.java index a5f6479dd..36ae0cfdd 100644 --- a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/EventMessage.java +++ b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/EventMessage.java @@ -40,6 +40,9 @@ public class EventMessage implements Serializable { } /** + * @param event event + * @param serializationHandler serialization handler + * @throws NotSerializableException if event can't be serialized * @since 1.2 */ public EventMessage(Event event, @@ -102,6 +105,7 @@ public class EventMessage implements Serializable { } /** + * @param serializationHandler serialization handler * @since 1.2 */ public void setSerializationHandler( |