Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-04-23 12:39:06 -0400
committerJoakim Erdfelt2015-04-23 12:39:19 -0400
commit40d91775cacef81112ae00ddd1ec30da168f5eef (patch)
tree31b9df37ae3bd7e444466b2c83bb42f1cd7ba1ad /jetty-osgi/jetty-osgi-boot/src
parenta2566bedd81aeab61d941166146dae40f3b8c8bd (diff)
downloadorg.eclipse.jetty.project-40d91775cacef81112ae00ddd1ec30da168f5eef.tar.gz
org.eclipse.jetty.project-40d91775cacef81112ae00ddd1ec30da168f5eef.tar.xz
org.eclipse.jetty.project-40d91775cacef81112ae00ddd1ec30da168f5eef.zip
464727 - Update Javadoc for Java 8 DocLint
Diffstat (limited to 'jetty-osgi/jetty-osgi-boot/src')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java13
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationParser.java7
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java12
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleContextProvider.java17
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleWebAppProvider.java15
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/JettyBootstrapActivator.java9
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceWebAppProvider.java10
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java14
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/ServerInstanceWrapper.java2
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/BundleWatcher.java10
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/LibExtClassLoaderHelper.java25
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/OSGiWebappClassLoader.java3
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/ServiceWatcher.java21
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleClassLoaderHelper.java7
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleFileLocatorHelper.java42
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/EventSender.java35
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/FakeURLClassLoader.java12
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java24
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultBundleClassLoaderHelper.java5
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java21
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/PackageAdminServiceTracker.java31
21 files changed, 114 insertions, 221 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
index 0e9414cf3f..56ea30b2b5 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationConfiguration.java
@@ -149,7 +149,7 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
* @param parser The parser
* @param webbundle The current webbundle
* @param fragmentBundle The OSGi fragment bundle to scan
- * @throws Exception
+ * @throws Exception if unable to parse fragment bundle
*/
protected void parseFragmentBundle(WebAppContext context, AnnotationParser parser,
Bundle webbundle, Bundle fragmentBundle) throws Exception
@@ -162,8 +162,7 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
* @param context The webapp context
* @param parser The parser
* @param webbundle The current webbundle
- * @param fragmentBundle The OSGi required bundle to scan
- * @throws Exception
+ * @throws Exception if unable to parse the web bundle
*/
protected void parseWebBundle(WebAppContext context, AnnotationParser parser, Bundle webbundle)
throws Exception
@@ -176,8 +175,8 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
* @param context The webapp context
* @param parser The parser
* @param webbundle The current webbundle
- * @param fragmentBundle The OSGi required bundle to scan
- * @throws Exception
+ * @param requiredBundle The OSGi required bundle to scan
+ * @throws Exception if unable to parse the required bundle
*/
protected void parseRequiredBundle(WebAppContext context, AnnotationParser parser,
Bundle webbundle, Bundle requiredBundle) throws Exception
@@ -208,8 +207,8 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
/**
* Returns the same classname resolver than for the webInfjar scanner
- * @param context
- * @return
+ * @param context the web app context
+ * @return the class name resolver
*/
protected ClassNameResolver createClassNameResolver(final WebAppContext context)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationParser.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationParser.java
index 844d8e0bd2..02f79e833f 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationParser.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/annotations/AnnotationParser.java
@@ -51,9 +51,10 @@ public class AnnotationParser extends org.eclipse.jetty.annotations.AnnotationPa
/**
* Keep track of a jetty URI Resource and its associated OSGi bundle.
- * @param uri
- * @param bundle
- * @throws Exception
+ *
+ * @param bundle the bundle to index
+ * @return the resource for the bundle
+ * @throws Exception if unable to create the resource reference
*/
protected Resource indexBundle(Bundle bundle) throws Exception
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
index 131238f973..69010e11f8 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
@@ -46,15 +46,11 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.packageadmin.PackageAdmin;
-
-
-
/**
* AbstractWebAppProvider
- *
+ * <p>
* Base class for Jetty DeploymentManager Providers that are capable of deploying a webapp,
* either from a bundle or an OSGi service.
- *
*/
public abstract class AbstractWebAppProvider extends AbstractLifeCycle implements AppProvider
{
@@ -603,9 +599,6 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
}
/* ------------------------------------------------------------ */
- /**
- *
- */
public String[] getConfigurationClasses()
{
return _configurationClasses;
@@ -623,9 +616,6 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
}
/* ------------------------------------------------------------ */
- /**
- * @return
- */
public DeploymentManager getDeploymentManager()
{
return _deploymentManager;
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleContextProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleContextProvider.java
index 1a648d2ddb..df1ab1dc38 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleContextProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleContextProvider.java
@@ -33,28 +33,20 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceRegistration;
-
-
/**
* BundleContextProvider
- *
+ * <p>
* Handles deploying OSGi bundles that define a context xml file for configuring them.
- *
- *
*/
public class BundleContextProvider extends AbstractContextProvider implements BundleProvider
{
private static final Logger LOG = Log.getLogger(AbstractContextProvider.class);
-
private Map<String, App> _appMap = new HashMap<String, App>();
private Map<Bundle, List<App>> _bundleMap = new HashMap<Bundle, List<App>>();
private ServiceRegistration _serviceRegForBundles;
-
-
-
/* ------------------------------------------------------------ */
public BundleContextProvider(ServerInstanceWrapper wrapper)
@@ -96,11 +88,6 @@ public class BundleContextProvider extends AbstractContextProvider implements Bu
/* ------------------------------------------------------------ */
- /**
- * @param bundle
- * @param contextFiles
- * @return
- */
public boolean bundleAdded (Bundle bundle) throws Exception
{
if (bundle == null)
@@ -149,8 +136,8 @@ public class BundleContextProvider extends AbstractContextProvider implements Bu
/* ------------------------------------------------------------ */
/**
* Bundle has been removed. If it was a context we deployed, undeploy it.
- * @param bundle
*
+ * @param bundle the bundle
* @return true if this was a context we had deployed, false otherwise
*/
public boolean bundleRemoved (Bundle bundle) throws Exception
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleWebAppProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleWebAppProvider.java
index 192c7a957c..c6629925b2 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleWebAppProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/BundleWebAppProvider.java
@@ -32,13 +32,10 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceRegistration;
-
-
/**
* BundleWebAppProvider
- *
+ * <p>
* A Jetty Provider that knows how to deploy a WebApp contained inside a Bundle.
- *
*/
public class BundleWebAppProvider extends AbstractWebAppProvider implements BundleProvider
{
@@ -53,17 +50,11 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
/* ------------------------------------------------------------ */
- /**
- * @param wrapper
- */
public BundleWebAppProvider (ServerInstanceWrapper wrapper)
{
super(wrapper);
}
-
-
-
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
@@ -108,7 +99,7 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
/* ------------------------------------------------------------ */
/**
* A bundle has been added that could be a webapp
- * @param bundle
+ * @param bundle the bundle
*/
public boolean bundleAdded (Bundle bundle) throws Exception
{
@@ -190,8 +181,8 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
/* ------------------------------------------------------------ */
/**
* Bundle has been removed. If it was a webapp we deployed, undeploy it.
- * @param bundle
*
+ * @param bundle the bundle
* @return true if this was a webapp we had deployed, false otherwise
*/
public boolean bundleRemoved (Bundle bundle) throws Exception
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/JettyBootstrapActivator.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/JettyBootstrapActivator.java
index 630f20e24b..0bae5fdbc8 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/JettyBootstrapActivator.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/JettyBootstrapActivator.java
@@ -36,13 +36,12 @@ import org.osgi.util.tracker.ServiceTracker;
/**
* JettyBootstrapActivator
- *
+ * <p>
* Bootstrap jetty and publish a default Server instance as an OSGi service.
- *
+ * <p>
* Listen for other Server instances to be published as services and support them as deployment targets.
- *
+ * <p>
* Listen for Bundles to be activated, and deploy those that represent webapps/ContextHandlers to one of the known Server instances.
- *
*/
public class JettyBootstrapActivator implements BundleActivator
{
@@ -74,7 +73,7 @@ public class JettyBootstrapActivator implements BundleActivator
* webapps. Setup the BundleListener that supports the extender pattern for
* the jetty ContextHandler.
*
- * @param context
+ * @param context the bundle context
*/
public void start(final BundleContext context) throws Exception
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceWebAppProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceWebAppProvider.java
index 881db26b95..32ac961817 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceWebAppProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceWebAppProvider.java
@@ -36,19 +36,15 @@ import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
-
-
/**
* ServiceWebAppProvider
- *
+ * <p>
* Jetty Provider that knows how to deploy a WebApp that has been registered as an OSGi service.
- *
*/
public class ServiceWebAppProvider extends AbstractWebAppProvider implements ServiceProvider
{
private static final Logger LOG = Log.getLogger(AbstractWebAppProvider.class);
-
/**
* Map of ServiceRef to App. Used when it is an osgi service that is a WebAppContext.
*/
@@ -56,7 +52,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
private ServiceRegistration _serviceRegForServices;
-
/**
* ServiceApp
*
@@ -91,9 +86,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
/* ------------------------------------------------------------ */
- /**
- * @param wrapper
- */
public ServiceWebAppProvider (ServerInstanceWrapper wrapper)
{
super(wrapper);
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
index 2377f54117..978699784e 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java
@@ -42,12 +42,11 @@ import org.osgi.framework.BundleContext;
/**
* DefaultJettyAtJettyHomeHelper
- *
- *
+ * <p>
* Creates a default instance of Jetty, based on the values of the
* System properties "jetty.home" or "jetty.home.bundle", one of which
* must be specified in order to create the default instance.
- *
+ * <p>
* Called by the {@link JettyBootstrapActivator} during the starting of the
* bundle.
*/
@@ -92,6 +91,9 @@ public class DefaultJettyAtJettyHomeHelper
* jetty.ssl.port are passed to the configuration files that might use them
* as part of their properties.
* </p>
+ * @param bundleContext the bundle context
+ * @return the configured server
+ * @throws Exception if unable to create / configure / or start the server
*/
public static Server startJettyAtJettyHome(BundleContext bundleContext) throws Exception
{
@@ -288,9 +290,9 @@ public class DefaultJettyAtJettyHomeHelper
/**
* Get a resource representing a directory inside a bundle. If the dir is null,
* return a resource representing the installation location of the bundle.
- * @param bundle
- * @param dir
- * @return
+ * @param bundle the bundle
+ * @param dir the directory
+ * @return the resource found
*/
public static Resource findDir (Bundle bundle, String dir)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/ServerInstanceWrapper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/ServerInstanceWrapper.java
index ddecd88fa2..74528283b0 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/ServerInstanceWrapper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/ServerInstanceWrapper.java
@@ -206,7 +206,7 @@ public class ServerInstanceWrapper
* The classloader that should be the parent classloader for each webapp
* deployed on this server.
*
- * @return
+ * @return the classloader
*/
public ClassLoader getParentClassLoaderForWebapps()
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/BundleWatcher.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/BundleWatcher.java
index 9ae3183df9..4a7513b34e 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/BundleWatcher.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/BundleWatcher.java
@@ -42,12 +42,9 @@ import org.osgi.util.tracker.ServiceTracker;
/**
* BundleWatcher
*
- *
* Tracks the installation and removal of Bundles in the OSGi environment. Any bundles
* that are added are passed to the set of Jetty DeploymentManager providers to see if
* the bundle should be deployed as a webapp or ContextHandler into Jetty.
- *
- * @author hmalphettes
*/
public class BundleWatcher implements BundleTrackerCustomizer
{
@@ -66,9 +63,6 @@ public class BundleWatcher implements BundleTrackerCustomizer
/* ------------------------------------------------------------ */
- /**
- * @throws Exception
- */
public BundleWatcher() throws Exception
{
_bundle = FrameworkUtil.getBundle(this.getClass());
@@ -133,10 +127,6 @@ public class BundleWatcher implements BundleTrackerCustomizer
}
/* ------------------------------------------------------------ */
- /**
- * @param managedServerName
- * @return
- */
public Map<ServiceReference, BundleProvider> getDeployers(String managedServerName)
{
if (managedServerName == null)
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/LibExtClassLoaderHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/LibExtClassLoaderHelper.java
index c60a56a721..5f27d8657b 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/LibExtClassLoaderHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/LibExtClassLoaderHelper.java
@@ -32,10 +32,9 @@ import java.util.Set;
/**
* LibExtClassLoaderHelper
- *
- *
+ * <p>
* Helper to create a URL class-loader with the jars inside
- * ${jetty.home}/lib/ext and ${jetty.home}/resources. In an ideal world, every
+ * <code>${jetty.home}/lib/ext</code> and <code>${jetty.home}/resources</code>. In an ideal world, every
* library is an OSGi bundle that does loads nicely. To support standard jars or
* bundles that cannot be loaded in the current OSGi environment, we support
* inserting the jars in the usual jetty/lib/ext folders in the proper classpath
@@ -43,7 +42,6 @@ import java.util.Set;
* <p>
* The drawback is that those jars will not be available in the OSGi
* classloader.
- * </p>
* <p>
* Alternatives to placing jars in lib/ext:
* <ol>
@@ -54,7 +52,6 @@ import java.util.Set;
* <li>Use equinox Buddy-Policy: register a buddy of the jetty bootstrapper
* bundle. (Note: it will work only on equinox)</li>
* </ol>
- * </p>
*/
public class LibExtClassLoaderHelper
{
@@ -76,11 +73,12 @@ public class LibExtClassLoaderHelper
/* ------------------------------------------------------------ */
/**
- * @param server
+ * @param jettyHome the jetty home
+ * @param parentClassLoader the parent classloader
* @return a url classloader with the jars of resources, lib/ext and the
* jars passed in the other argument. The parent classloader usually
* is the JettyBootStrapper (an osgi classloader.
- * @throws MalformedURLException
+ * @throws MalformedURLException if the jetty home reference is invalid
*/
public static ClassLoader createLibEtcClassLoader(File jettyHome, ClassLoader parentClassLoader) throws MalformedURLException
{
@@ -132,12 +130,14 @@ public class LibExtClassLoaderHelper
/* ------------------------------------------------------------ */
/**
- * @param server
+ * @param jarsContainerOrJars the jars via file references
+ * @param otherJarsOrFolder more jars via url references
+ * @param parentClassLoader the parent classloader
* @return a url classloader with the jars of resources, lib/ext and the
* jars passed in the other argument. The parent classloader usually
* is the JettyBootStrapper (an osgi classloader). If there was no
* extra jars to insert, then just return the parentClassLoader.
- * @throws MalformedURLException
+ * @throws MalformedURLException if there is a bad jar file reference
*/
public static ClassLoader createLibExtClassLoader(List<File> jarsContainerOrJars, List<URL> otherJarsOrFolder, ClassLoader parentClassLoader)
throws MalformedURLException
@@ -181,13 +181,14 @@ public class LibExtClassLoaderHelper
* depending too much directly on a particular logging framework.
* <p>
* We can afford to do some implementation specific code for a logging
- * framework only in a fragment. <br>
+ * framework only in a fragment.
+ * <p>
* Trying to configure log4j and logback in here.
- * </p>
* <p>
* We recommend that slf4j jars are all placed in the osgi framework. And a
* single implementation if possible packaged as an osgi bundle is there.
- * </p>
+ * @param jettyHome the jetty home reference
+ * @param childrenFiles the map of child files
*/
protected static void processFilesInResourcesFolder(File jettyHome, Map<String, File> childrenFiles)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/OSGiWebappClassLoader.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/OSGiWebappClassLoader.java
index 2f4b19b623..bc889cef15 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/OSGiWebappClassLoader.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/OSGiWebappClassLoader.java
@@ -85,7 +85,7 @@ public class OSGiWebappClassLoader extends WebAppClassLoader implements BundleRe
* @param parent The parent classloader.
* @param context The WebAppContext
* @param contributor The bundle that defines this web-application.
- * @throws IOException
+ * @throws IOException if unable to cerate the OSGiWebappClassLoader
*/
public OSGiWebappClassLoader(ClassLoader parent, WebAppContext context, Bundle contributor)
throws IOException
@@ -272,6 +272,7 @@ public class OSGiWebappClassLoader extends WebAppClassLoader implements BundleRe
* WebappContext So we place a fake one there to start with. We replace it
* with the actual webapp context with this method. We also apply the
* extraclasspath there at the same time.
+ * @param webappContext the web app context
*/
public void setWebappContext(WebAppContext webappContext)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/ServiceWatcher.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/ServiceWatcher.java
index 7838b4f509..bbce9f2a4e 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/ServiceWatcher.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/ServiceWatcher.java
@@ -54,16 +54,11 @@ public class ServiceWatcher implements ServiceTrackerCustomizer
public static final String FILTER = "(objectclass=" + ServiceProvider.class.getName() + ")";
-
//track all instances of deployers of webapps as bundles
ServiceTracker _serviceTracker;
-
/* ------------------------------------------------------------ */
- /**
- * @param registry
- */
public ServiceWatcher() throws Exception
{
//track all instances of deployers of webapps
@@ -75,10 +70,6 @@ public class ServiceWatcher implements ServiceTrackerCustomizer
/* ------------------------------------------------------------ */
- /**
- * @param managedServerName
- * @return
- */
public Map<ServiceReference, ServiceProvider> getDeployers(String managedServerName)
{
if (managedServerName == null)
@@ -154,9 +145,10 @@ public class ServiceWatcher implements ServiceTrackerCustomizer
/* ------------------------------------------------------------ */
/** Deploy ContextHandler that is a Service.
- *
- * @param reference
- * @return
+ * @param context the bundle context
+ * @param contextHandler the context handler
+ * @param reference the service reference
+ * @return the object added
*/
public Object addService (BundleContext context, ContextHandler contextHandler, ServiceReference reference)
{
@@ -200,8 +192,9 @@ public class ServiceWatcher implements ServiceTrackerCustomizer
/* ------------------------------------------------------------ */
/**
* Undeploy a ContextHandler that is a Service.
- *
- * @param reference
+ * @param context the bundle context
+ * @param contextHandler the context handler
+ * @param reference the service reference
*/
public void removeService (BundleContext context, ContextHandler contextHandler, ServiceReference reference)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleClassLoaderHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleClassLoaderHelper.java
index 421226dab3..b8fe5955a5 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleClassLoaderHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleClassLoaderHelper.java
@@ -22,10 +22,8 @@ import org.eclipse.jetty.osgi.boot.utils.internal.DefaultBundleClassLoaderHelper
import org.osgi.framework.Bundle;
/**
- *
* BundleClassLoaderHelper
- *
- *
+ * <p>
* Is there a clean OSGi way to go from the Bundle object to the classloader of
* the Bundle ? You can certainly take a class inside the bundle and get the
* bundle's classloader that way. Getting the classloader directly from the
@@ -34,11 +32,9 @@ import org.osgi.framework.Bundle;
* We could use fragments that are specific to each OSGi implementation. Using
* introspection here to keep packaging simple and avoid the multiplication of
* the jars.
- * </p>
* <p>
* The default implementation relies on introspection and supports equinox-3.5
* and felix-2.0.0
- * </p>
*/
public interface BundleClassLoaderHelper
{
@@ -50,6 +46,7 @@ public interface BundleClassLoaderHelper
public static BundleClassLoaderHelper DEFAULT = new DefaultBundleClassLoaderHelper();
/**
+ * @param bundle the bundle
* @return The classloader of a given bundle. Assuming the bundle is
* started.
*/
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleFileLocatorHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleFileLocatorHelper.java
index 68add7c580..0dc1b3be3e 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleFileLocatorHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/BundleFileLocatorHelper.java
@@ -28,12 +28,9 @@ import org.osgi.framework.Bundle;
/**
* BundleFileLocatorHelper
- *
- *
+ * <p>
* From a bundle to its location on the filesystem. Assumes the bundle is not a
* jar.
- *
- * @author hmalphettes
*/
public interface BundleFileLocatorHelper
{
@@ -50,21 +47,20 @@ public interface BundleFileLocatorHelper
* other situations.
* <p>
* Currently only works with bundles that are not jar.
- * </p>
*
* @param bundle The bundle
* @return Its installation location as a file.
- * @throws Exception
+ * @throws Exception if unable to get the install location
*/
public File getBundleInstallLocation(Bundle bundle) throws Exception;
/**
* Locate a file inside a bundle.
*
- * @param bundle
- * @param path
- * @return file object
- * @throws Exception
+ * @param bundle the bundle
+ * @param path the path
+ * @return file the file object
+ * @throws Exception if unable to get the file
*/
public File getFileInBundle(Bundle bundle, String path) throws Exception;
@@ -76,11 +72,11 @@ public interface BundleFileLocatorHelper
* files inside jars alone. In fact we only support the second situation for
* development purpose where the bundle was imported in pde and the classes
* kept in a jar.
- * </p>
*
- * @param bundle
+ * @param bundle the bundle
* @return The jar(s) file that is either the bundle itself, either the jars
* embedded inside it.
+ * @throws Exception if unable to locate the jars
*/
public File[] locateJarsInsideBundle(Bundle bundle) throws Exception;
@@ -88,37 +84,37 @@ public interface BundleFileLocatorHelper
* Helper method equivalent to Bundle#getEntry(String entryPath) except that
* it searches for entries in the fragments by using the findEntries method.
*
- * @param bundle
- * @param entryPath
+ * @param bundle the bundle
+ * @param entryPath the entry path
* @return null or all the entries found for that path.
*/
public Enumeration<URL> findEntries(Bundle bundle, String entryPath);
/**
- * Only useful for equinox: on felix we get the file:// or jar:// url
+ * Only useful for equinox: on felix we get the <code>file://</code> or <code>jar://</code> url
* already. Other OSGi implementations have not been tested
* <p>
- * Get a URL to the bundle entry that uses a common protocol (i.e. file:
- * jar: or http: etc.).
- * </p>
+ * Get a URL to the bundle entry that uses a common protocol (i.e. <code>file:</code>
+ * <code>jar:</code> or <code>http:</code> etc.).
*
+ * @param url the url
* @return a URL to the bundle entry that uses a common protocol
+ * @throws Exception if unable to get the local url
*/
public URL getLocalURL(URL url) throws Exception;
/**
- * Only useful for equinox: on felix we get the file:// url already. Other
+ * Only useful for equinox: on felix we get the <code>file://</code> url already. Other
* OSGi implementations have not been tested
* <p>
- * Get a URL to the content of the bundle entry that uses the file:
+ * Get a URL to the content of the bundle entry that uses the <code>file:</code>
* protocol. The content of the bundle entry may be downloaded or extracted
* to the local file system in order to create a file: URL.
*
+ * @param url the url
* @return a URL to the content of the bundle entry that uses the file:
* protocol
- * </p>
- * @throws IOException
- * @throws Exception
+ * @throws Exception if unable to get the file url
*/
public URL getFileURL(URL url) throws Exception;
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/EventSender.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/EventSender.java
index 0d612d8b6b..f84e486793 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/EventSender.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/EventSender.java
@@ -28,10 +28,7 @@ import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
/**
- * EventSender
- *
* Utility class for emiting OSGi EventAdmin events
- *
*/
public class EventSender
{
@@ -42,18 +39,10 @@ public class EventSender
public static final String UNDEPLOYED_EVENT = "org/osgi/service/web/UNDEPLOYED";
public static final String FAILED_EVENT = "org/osgi/service/web/FAILED";
-
private static final EventSender __instance = new EventSender();
private Bundle _myBundle;
private EventAdmin _eventAdmin;
-
-
-
- /* ------------------------------------------------------------ */
- /**
- *
- */
private EventSender ()
{
_myBundle = FrameworkUtil.getBundle(EventSender.class);
@@ -62,26 +51,11 @@ public class EventSender
_eventAdmin = (EventAdmin)_myBundle.getBundleContext().getService(ref);
}
-
-
-
- /* ------------------------------------------------------------ */
- /**
- * @return
- */
public static EventSender getInstance()
{
return __instance;
}
-
-
- /* ------------------------------------------------------------ */
- /**
- * @param topic
- * @param wab
- * @param contextPath
- */
public void send (String topic, Bundle wab, String contextPath)
{
if (topic==null || wab==null || contextPath==null)
@@ -90,15 +64,6 @@ public class EventSender
send(topic, wab, contextPath, null);
}
-
-
- /* ------------------------------------------------------------ */
- /**
- * @param topic
- * @param wab
- * @param contextPath
- * @param ex
- */
public void send (String topic, Bundle wab, String contextPath, Exception ex)
{
if (_eventAdmin == null)
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/FakeURLClassLoader.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/FakeURLClassLoader.java
index e44deae29d..eeb293b052 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/FakeURLClassLoader.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/FakeURLClassLoader.java
@@ -22,29 +22,21 @@ import java.net.URL;
import java.net.URLClassLoader;
/**
- *
* FakeURLClassLoader
- *
+ * <p>
* A URLClassloader that overrides the getURLs() method to return the list
* of urls passed in to the constructor, but otherwise acts as if it has no
* urls, which would cause it to delegate to the parent classloader (in this
* case an OSGi classloader).
- *
+ * <p>
* The main use of this class is with jars containing tlds. Jasper expects a
* URL classloader to inspect for jars with tlds.
- *
*/
public class FakeURLClassLoader extends URLClassLoader
{
-
private URL[] _jars;
-
/* ------------------------------------------------------------ */
- /**
- * @param osgiClassLoader
- * @param jars
- */
public FakeURLClassLoader(ClassLoader osgiClassLoader, URL[] jars)
{
super(new URL[] {},osgiClassLoader);
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java
index fbb07c42f4..5a6aca0ea6 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java
@@ -27,9 +27,7 @@ import java.util.List;
import java.util.StringTokenizer;
/**
- * Util
- *
- * Various useful functions used widely.
+ * Various useful functions utility methods for OSGi wide use.
*/
public class Util
{
@@ -41,8 +39,8 @@ public class Util
*
* @param name the name of the header
* @param altName an alternative name for the header (useful for deprecated names)
- * @param manifest
- * @return
+ * @param manifest the dictionary
+ * @return the value from the manifest
*/
public static String getManifestHeaderValue (String name, String altName, Dictionary manifest)
{
@@ -62,10 +60,10 @@ public class Util
* Treating the string as a separated list of filenames,
* convert and return the list of urls.
*
- * @param val the separated list
- * @param delims the separators (default is ,;)
- * @return
- * @throws MalformedURLException
+ * @param val the separated list of filenames
+ * @param delims the separators (default is <code>,;</code>)
+ * @return the list of URLs found in the input list
+ * @throws Exception if unable to convert entry to a URL
*/
public static List<URL> fileNamesAsURLs(String val, String delims)
throws Exception
@@ -96,13 +94,13 @@ public class Util
/* ------------------------------------------------------------ */
/**
- * recursively substitute the ${sysprop} by their actual system property.
- * ${sysprop,defaultvalue} will use 'defaultvalue' as the value if no
+ * recursively substitute the <code>${sysprop}</code> by their actual system property.
+ * <code>${sysprop,defaultvalue}</code> will use <code>'defaultvalue'</code> as the value if no
* sysprop is defined. Not the most efficient code but we are shooting for
* simplicity and speed of development here.
*
- * @param value
- * @return
+ * @param value the input string
+ * @return the string with replaced properties
*/
public static String resolvePropertyValue(String value)
{
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultBundleClassLoaderHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultBundleClassLoaderHelper.java
index 5cafc45bc2..e9e5ff7f6d 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultBundleClassLoaderHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultBundleClassLoaderHelper.java
@@ -29,8 +29,7 @@ import org.osgi.framework.Bundle;
/**
* DefaultBundleClassLoaderHelper
- *
- *
+ * <p>
* Default implementation of the BundleClassLoaderHelper. Uses introspection to
* support equinox-3.5 and felix-2.0.0
*/
@@ -133,7 +132,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
/**
* Assuming the bundle is started.
*
- * @param bundle
+ * @param bundle the bundle
* @return classloader object
*/
public ClassLoader getBundleClassLoader(Bundle bundle)
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
index 93c0f4623f..ee3f0e766d 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java
@@ -38,12 +38,9 @@ import org.osgi.framework.Bundle;
/**
* DefaultFileLocatorHelper
- *
- *
+ * <p>
* From a bundle to its location on the filesystem. Assumes the bundle is not a
* jar.
- *
- * @author hmalphettes
*/
public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
{
@@ -89,7 +86,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
*
* @param bundle The bundle
* @return Its installation location as a file.
- * @throws Exception
+ * @throws Exception if unable to get the bundle install location
*/
public File getBundleInstallLocation(Bundle bundle) throws Exception
{
@@ -212,10 +209,10 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
/**
* Locate a file inside a bundle.
*
- * @param bundle
- * @param path
+ * @param bundle the bundle
+ * @param path the path
* @return file object
- * @throws Exception
+ * @throws Exception if unable to get the file in the bundle
*/
public File getFileInBundle(Bundle bundle, String path) throws Exception
{
@@ -239,8 +236,8 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
* it searches for entries in the fragments by using the Bundle#findEntries
* method.
*
- * @param bundle
- * @param entryPath
+ * @param bundle the bundle
+ * @param entryPath the entry path
* @return null or all the entries found for that path.
*/
public Enumeration<URL> findEntries(Bundle bundle, String entryPath)
@@ -266,7 +263,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
* kept in a jar.
* </p>
*
- * @param bundle
+ * @param bundle the bundle
* @return The jar(s) file that is either the bundle itself, either the jars
* embedded inside it.
*/
@@ -349,7 +346,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper
* @return a URL to the content of the bundle entry that uses the file:
* protocol
* </p>
- * @throws IOException
+ * @throws Exception if unable to get the file url
*/
public URL getFileURL(URL url) throws Exception
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/PackageAdminServiceTracker.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/PackageAdminServiceTracker.java
index d265e5b0e5..f3dacc9e5a 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/PackageAdminServiceTracker.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/PackageAdminServiceTracker.java
@@ -36,11 +36,10 @@ import org.osgi.service.startlevel.StartLevel;
/**
* PackageAdminServiceTracker
- *
- *
+ * <p>
* When the PackageAdmin service is activated we can look for the fragments
* attached to this bundle and do a fake "activate" on them.
- *
+ * <p>
* See particularly the jetty-osgi-boot-jsp fragment bundle that uses this
* facility.
*/
@@ -124,8 +123,8 @@ public class PackageAdminServiceTracker implements ServiceListener
* bundle. when we drop the support for the older versions of OSGi, we will
* stop using the PackageAdmin service.
*
- * @param bundle
- * @return
+ * @param bundle the bundle
+ * @return the bundle fragment list
*/
public Bundle[] getFragments(Bundle bundle)
{
@@ -143,9 +142,8 @@ public class PackageAdminServiceTracker implements ServiceListener
* collect the required-bundles and fragment when the directive
* visibility:=reexport is added to a required-bundle.
*
- * @param bundle
- * @param webFragOrAnnotationOrResources
- * @return
+ * @param bundle the bundle
+ * @return the bundle fragment and required list
*/
public Bundle[] getFragmentsAndRequiredBundles(Bundle bundle)
{
@@ -165,9 +163,13 @@ public class PackageAdminServiceTracker implements ServiceListener
* transitively when the directive 'visibility:=reexport' is added to a
* required-bundle.
*
- * @param bundle
- * @param webFragOrAnnotationOrResources
- * @return
+ * @param bundle the bundle
+ * @param admin the admin package
+ * @param deps The map of fragment and required bundles associated to the value of the
+ * jetty-web attribute.
+ * @param onlyReexport true to collect resources and web-fragments
+ * transitively if and only if the directive visibility is
+ * reexport.
*/
protected void collectFragmentsAndRequiredBundles(Bundle bundle, PackageAdmin admin, Map<String, Bundle> deps, boolean onlyReexport)
{
@@ -193,12 +195,13 @@ public class PackageAdminServiceTracker implements ServiceListener
* A simplistic but good enough parser for the Require-Bundle header. Parses
* the version range attribute and the visibility directive.
*
+ * @param bundle the bundle
+ * @param admin the admin package
+ * @param deps The map of required bundles associated to the value of the
+ * jetty-web attribute.
* @param onlyReexport true to collect resources and web-fragments
* transitively if and only if the directive visibility is
* reexport.
- * @param bundle
- * @return The map of required bundles associated to the value of the
- * jetty-web attribute.
*/
protected void collectRequiredBundles(Bundle bundle, PackageAdmin admin, Map<String, Bundle> deps, boolean onlyReexport)
{

Back to the top