diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java index d536c9c1ce1..f13aa1ad7e8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java @@ -53,7 +53,7 @@ import org.eclipse.jetty.util.thread.Scheduler; /** *
An abstract implementation of {@link Connector} that provides a {@link ConnectionFactory} mechanism - * for creating {@link Connection} instances for various protocols (HTTP, SSL, etc).
+ * for creating {@link org.eclipse.jetty.io.Connection} instances for various protocols (HTTP, SSL, etc). * *- * {@link ConnectionFactory}s may also create a chain of {@link Connection} instances, using other {@link ConnectionFactory} instances. + * {@link ConnectionFactory}s may also create a chain of {@link org.eclipse.jetty.io.Connection} instances, using other {@link ConnectionFactory} instances. * For example, the {@link SslConnectionFactory} is configured with a next protocol name, so that once it has accepted * a connection and created an {@link SslConnection}, it then used the next {@link ConnectionFactory} from the - * connector using the {@link #getConnectionFactory(String)} method, to create a {@link Connection} instance that - * will handle the unecrypted bytes from the {@link SslConnection}. If the next protocol is "http/1.1", then the + * connector using the {@link #getConnectionFactory(String)} method, to create a {@link org.eclipse.jetty.io.Connection} instance that + * will handle the unencrypted bytes from the {@link SslConnection}. If the next protocol is "http/1.1", then the * {@link SslConnectionFactory} will have a protocol name of "SSL-http/1.1" and lookup "http/1.1" for the protocol * to run over the SSL connection. *
- * {@link ConnectionFactory}s may also create temporary {@link Connection} instances that will exchange bytes + * {@link ConnectionFactory}s may also create temporary {@link org.eclipse.jetty.io.Connection} instances that will exchange bytes * over the connection to determine what is the next protocol to use. For example the ALPN protocol is an extension * of SSL to allow a protocol to be specified during the SSL handshake. ALPN is used by the HTTP/2 protocol to * negotiate the protocol that the client and server will speak. Thus to accept a HTTP/2 connection, the @@ -118,18 +118,17 @@ import org.eclipse.jetty.util.thread.Scheduler; * could be "h2" or the default of "http/1.1". Once the next protocol is determined, the ALPN connection * calls {@link #getConnectionFactory(String)} to create a connection instance that will replace the ALPN connection as * the connection chained to the SSL connection. - *
*
* The Authentication state can be one of several sub-types that * reflects where the request is in the many different authentication * cycles. Authentication might not yet be checked or it might be checked * and failed, checked and deferred or succeeded. - * */ public interface Authentication { @@ -75,6 +73,7 @@ public interface Authentication /** Authenticate if possible without sending a challenge. * This is used to check credentials that have been sent for * non-manditory authentication. + * @param request the request * @return The new Authentication state. */ Authentication authenticate(ServletRequest request); @@ -83,6 +82,8 @@ public interface Authentication /** Authenticate and possibly send a challenge. * This is used to initiate authentication for previously * non-manditory authentication. + * @param request the request + * @param response the response * @return The new Authentication state. */ Authentication authenticate(ServletRequest request,ServletResponse response); @@ -90,8 +91,9 @@ public interface Authentication /* ------------------------------------------------------------ */ /** Login with the LOGIN authenticator - * @param username - * @param password + * @param username the username + * @param password the password + * @param request the request * @return The new Authentication state */ Authentication login(String username,Object password,ServletRequest request); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionFactory.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionFactory.java index c1433813a3b..01a8e8a7c3f 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionFactory.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ConnectionFactory.java @@ -28,12 +28,14 @@ import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; /** - *
A Factory to create {@link Connection} instances for {@link Connector}s.
- *A Connection factory is responsible for instantiating and configuring a {@link Connection} instance - * to handle an {@link EndPoint} accepted by a {@link Connector}.
+ * A Factory to create {@link Connection} instances for {@link Connector}s. + *+ * A Connection factory is responsible for instantiating and configuring a {@link Connection} instance + * to handle an {@link EndPoint} accepted by a {@link Connector}. *
* A ConnectionFactory has a protocol name that represents the protocol of the Connections - * created. Example of protocol names include:
* A Handler instance is required by a {@link Server} to handle incoming - * HTTP requests. A Handler may:
+ * A Handler may: + *
{@link HttpConnection#getCurrentConnection()}.{@link HttpConnection#getHttpChannel() getHttpChannel()}.{@link HttpChannel#getRequest() getRequest()}
+ * method can be used access the Request object if required.
+ * @param response
+ * The response as the {@link Response} object or a wrapper of that request. The
+ * {@link HttpConnection#getCurrentConnection()}.{@link HttpConnection#getHttpChannel() getHttpChannel()}.{@link HttpChannel#getResponse() getResponse()}
+ * method can be used access the Response object if required.
* @throws IOException
+ * if unable to handle the request or response processing
* @throws ServletException
+ * if unable to handle the request or response due to underlying servlet issue
*/
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException;
@@ -74,6 +83,5 @@ public interface Handler extends LifeCycle, Destroyable
@ManagedOperation(value="destroy associated resources", impact="ACTION")
public void destroy();
-
}
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HandlerContainer.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HandlerContainer.java
index dfe4c7190a8..301a87df5bf 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/HandlerContainer.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HandlerContainer.java
@@ -48,15 +48,16 @@ public interface HandlerContainer extends LifeCycle
/* ------------------------------------------------------------ */
/**
- * @param byclass
+ * @param byclass the child handler class to get
* @return array of all handlers contained by this handler and it's children of the passed type.
*/
public Handler[] getChildHandlersByClass(Class> byclass);
/* ------------------------------------------------------------ */
/**
- * @param byclass
+ * @param byclass the child handler class to get
* @return first handler of all handlers contained by this handler and it's children of the passed type.
+ * @param This is implemented as a call to {@link EndPoint#getIdleTimeout()}, but may be * overridden by channels that have timeouts different from their connections. + * @return the idle timeout (in milliseconds) */ public long getIdleTimeout() { @@ -155,8 +156,9 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor /** * Set the idle timeout. - *
This is implemented as a call to {@link EndPoint#setIdleTimeout(long), but may be + *
This is implemented as a call to {@link EndPoint#setIdleTimeout(long)}, but may be * overridden by channels that have timeouts different from their connections. + * @param timeoutMs the idle timeout in milliseconds */ public void setIdleTimeout(long timeoutMs) { @@ -213,7 +215,8 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor * If the associated response has the Expect header set to 100 Continue, * then accessing the input stream indicates that the handler/servlet * is ready for the request body and thus a 100 Continue response is sent. - * + * + * @param available estimate of the number of bytes that are available * @throws IOException if the InputStream cannot be created */ public void continue100(int available) throws IOException diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java index b7a74231641..9a2dccc260b 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java @@ -37,10 +37,6 @@ import org.eclipse.jetty.util.thread.SpinLock; /** * Implementation of AsyncContext interface that holds the state of request-response cycle. */ - -/* ------------------------------------------------------------ */ -/** - */ public class HttpChannelState { private static final Logger LOG = Log.getLogger(HttpChannelState.class); @@ -804,7 +800,7 @@ public class HttpChannelState * This is similar to calling {@link #onReadUnready()} followed by * {@link #onReadPossible()}, except that as content is already * available, read interest is never set. - * @return + * @return true if woken */ public boolean onReadReady() { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index fe91e63e7bc..0cc84fe3c0e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.http.HttpParser; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http.PreEncodedHttpField; +import org.eclipse.jetty.http.HttpParser.RequestHandler; import org.eclipse.jetty.io.AbstractConnection; import org.eclipse.jetty.io.ByteBufferPool; import org.eclipse.jetty.io.Connection; @@ -260,7 +261,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http /* ------------------------------------------------------------ */ /** Fill and parse data looking for content - * @throws IOException + * @return true if an {@link RequestHandler} method was called and it returned true; */ protected boolean fillAndParseForContent() { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index 599ddc3faf7..43244964b81 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -41,7 +41,6 @@ import org.eclipse.jetty.util.log.Logger; * maintains two states: the content state that tells whether there is content to consume and the EOF * state that tells whether an EOF has arrived. * Only once the content has been consumed the content state is moved to the EOF state. - * */ public class HttpInput extends ServletInputStream implements Runnable { @@ -157,7 +156,7 @@ public class HttpInput extends ServletInputStream implements Runnable * produce more Content and add it via {@link #addContent(Content)}. * For protocols that are constantly producing (eg HTTP2) this can * be left as a noop; - * @throws IOException + * @throws IOException if unable to produce content */ protected void produceContent() throws IOException { @@ -351,7 +350,8 @@ public class HttpInput extends ServletInputStream implements Runnable /** * Adds some content to this input stream. * - * @param content the content to add + * @param item the content to add + * @return true if content channel woken for read */ public boolean addContent(Content item) { @@ -401,6 +401,7 @@ public class HttpInput extends ServletInputStream implements Runnable *
* Typically this will result in an EOFException being thrown * from a subsequent read rather than a -1 return. + * @return true if content channel woken for read */ public boolean earlyEOF() { @@ -410,6 +411,7 @@ public class HttpInput extends ServletInputStream implements Runnable /** * This method should be called to signal that all the expected * content arrived. + * @return true if content channel woken for read */ public boolean eof() { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/LowResourceMonitor.java b/jetty-server/src/main/java/org/eclipse/jetty/server/LowResourceMonitor.java index 028e0a0fdd3..f54af0ca039 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/LowResourceMonitor.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/LowResourceMonitor.java @@ -37,11 +37,14 @@ import org.eclipse.jetty.util.thread.Scheduler; import org.eclipse.jetty.util.thread.ThreadPool; -/* ------------------------------------------------------------ */ -/** A monitor for low resources - *
An instance of this class will monitor all the connectors of a server (or a set of connectors +/** + * A monitor for low resources + *
+ * An instance of this class will monitor all the connectors of a server (or a set of connectors * configured with {@link #setMonitoredConnectors(Collection)}) for a low resources state. - * Low resources can be detected by:
+ * Low resources can be detected by: + *
Once low resources state is detected, the cause is logged and all existing connections returned + *
+ * Once low resources state is detected, the cause is logged and all existing connections returned * by {@link Connector#getConnectedEndPoints()} have {@link EndPoint#setIdleTimeout(long)} set * to {@link #getLowResourcesIdleTimeout()}. New connections are not affected, however if the low * resources state persists for more than {@link #getMaxLowResourcesTime()}, then the * {@link #getLowResourcesIdleTimeout()} to all connections again. Once the low resources state is * cleared, the idle timeout is reset to the connector default given by {@link Connector#getIdleTimeout()}. - *
*/ @ManagedObject ("Monitor for low resource conditions and activate a low resource mode if detected") public class LowResourceMonitor extends AbstractLifeCycle diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java index 27a3fbbae42..f810f4c55a5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java @@ -35,11 +35,12 @@ import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ -/** ConnectionFactory for the PROXY Protocol. +/** + * ConnectionFactory for the PROXY Protocol. *This factory can be placed in front of any other connection factory * to process the proxy line before the normal protocol handling
* - * @see http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt + * @see http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt */ public class ProxyConnectionFactory extends AbstractConnectionFactory { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilder.java b/jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilder.java index 275398c7ee0..5e807b45dc6 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilder.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/PushBuilder.java @@ -20,47 +20,47 @@ package org.eclipse.jetty.server; import java.util.Set; -import javax.servlet.ServletRequest; import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; - - /** Build a request to be pushed. + ** A PushBuilder is obtained by calling {@link Request#getPushBuilder()} - * which creates an initialises the builder as follows:
A PushBuilder can be customised by chained calls to mutator methods before the + *
A PushBuilder can be customized by chained calls to mutator methods before the * {@link #push()} method is called to initiate a push request with the current state * of the builder. After the call to {@link #push()}, the builder may be reused for * another push, however the {@link #path(String)}, {@link #etag(String)} and @@ -128,7 +128,7 @@ public interface PushBuilder * the associated request. * There is no path default and {@link #path(String)} must be called * before every call to {@link #push()} - * @param the URI path to be used for the push, which may include a + * @param path the URI path to be used for the push, which may include a * query string. * @return this builder. */ @@ -138,7 +138,7 @@ public interface PushBuilder * The etag will be used only if {@link #isConditional()} is true. * Defaults to no etag. The value is nulled after every call to * {@link #push()} - * @param the etag to be used for the push. + * @param etag the etag to be used for the push. * @return this builder. */ public abstract PushBuilder etag(String etag); @@ -147,7 +147,7 @@ public interface PushBuilder * The last modified date will be used only if {@link #isConditional()} is true. * Defaults to no date. The value is nulled after every call to * {@link #push()} - * @param the last modified date to be used for the push. + * @param lastModified the last modified date to be used for the push. * @return this builder. * */ public abstract PushBuilder lastModified(String lastModified); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 25daa3c5042..08a7d95f1ac 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -88,7 +88,6 @@ import org.eclipse.jetty.util.UrlEncoded; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -/* ------------------------------------------------------------ */ /** * Jetty Request. *
@@ -117,8 +116,6 @@ import org.eclipse.jetty.util.log.Logger; * {@link ContextHandler#getMaxFormContentSize()} or if there is no context then the "org.eclipse.jetty.server.Request.maxFormContentSize" {@link Server} * attribute. The number of parameters keys is limited by {@link ContextHandler#getMaxFormKeys()} or if there is no context then the * "org.eclipse.jetty.server.Request.maxFormKeys" {@link Server} attribute. - * - * */ public class Request implements HttpServletRequest { @@ -255,7 +252,7 @@ public class Request implements HttpServletRequest * plus any {@link #getQueryString()}
Also supports jetty specific attributes to gain access to Jetty APIs: + *
+ * Also supports jetty specific attributes to gain access to Jetty APIs: *
Location
headers
+ * @throws IOException if unable to send the redirect
*/
public void sendRedirect(int code, String location) throws IOException
{
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
index 786c048f1ea..f726e7d38f9 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java
@@ -110,8 +110,11 @@ public class Server extends HandlerWrapper implements Attributes
}
/* ------------------------------------------------------------ */
- /** Convenience constructor
+ /**
+ * Convenience constructor
+ * * Creates server and a {@link ServerConnector} at the passed address. + * @param addr the inet socket address to create the connector from */ public Server(@Name("address")InetSocketAddress addr) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 8adcc2cb0d3..1665a19b16c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -53,7 +53,6 @@ import org.eclipse.jetty.util.thread.Scheduler; * use all the commons services (eg {@link Executor}, {@link Scheduler}) of the * passed {@link Server} instance, but all services may also be constructor injected * into the connector so that it may operate with dedicated or otherwise shared services. - *
*
*
* Implementations of UserIdentity should be immutable so that they may be * cached by Authenticators and LoginServices. - * */ public interface UserIdentity { @@ -50,7 +49,7 @@ public interface UserIdentity * This call is used to satisfy authorization calls from * container code which will be using translated role names. * @param role A role name. - * @param scope + * @param scope the scope * @return True if the user can act in that role. */ boolean isUserInRole(String role, Scope scope); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java index cecf30c2e26..a530b9a514d 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java @@ -191,18 +191,12 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu private volatile Availability _availability; /* ------------------------------------------------------------ */ - /** - * - */ public ContextHandler() { this((Context)null); } /* ------------------------------------------------------------ */ - /** - * - */ protected ContextHandler(Context context) { super(); @@ -215,9 +209,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu } /* ------------------------------------------------------------ */ - /** - * - */ public ContextHandler(String contextPath) { this(); @@ -225,9 +216,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu } /* ------------------------------------------------------------ */ - /** - * - */ public ContextHandler(HandlerContainer parent, String contextPath) { this(); @@ -568,6 +556,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Add a context event listeners. + * @param listener the event listener to add * * @see ServletContextListener * @see ServletContextAttributeListener @@ -597,6 +586,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Remove a context event listeners. + * @param listener the event listener to remove * * @see ServletContextListener * @see ServletContextAttributeListener @@ -624,7 +614,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /** * Apply any necessary restrictions on a programmatic added listener. * - * @param listener + * @param listener the programmatic listener to add */ protected void addProgrammaticListener (EventListener listener) { @@ -680,6 +670,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Set Available status. + * @param available true to set as enabled */ public void setAvailable(boolean available) { @@ -759,6 +750,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /** * Extensible startContext. this method is called from {@link ContextHandler#doStart()} instead of a call to super.doStart(). This allows derived classes to * insert additional handling (Eg configuration) before the call to super.doStart by this method will start contained handlers. + * @throws Exception if unable to start the context * * @see org.eclipse.jetty.server.handler.ContextHandler.Context */ @@ -1190,8 +1182,9 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /** * Check the target. Called by {@link #handle(String, Request, HttpServletRequest, HttpServletResponse)} when a target within a context is determined. If * the target is protected, 404 is returned. + * @param target the target to test + * @return true if target is a protected target */ - /* ------------------------------------------------------------ */ public boolean isProtectedTarget(String target) { if (target == null || _protectedTargets == null) @@ -1450,8 +1443,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu } /* ------------------------------------------------------------ */ - /** - */ public void setWelcomeFiles(String[] files) { _welcomeFiles = files; @@ -1502,7 +1493,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Set the maximum size of a form post, to protect against DOS attacks from large forms. - * @param maxSize + * @param maxSize the maximum size of the form content (in bytes) */ public void setMaxFormContentSize(int maxSize) { @@ -1518,7 +1509,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Set the maximum number of form Keys to protect against DOS attack from crafted hash keys. - * @param max + * @param max the maximum number of form keys */ public void setMaxFormKeys(int max) { @@ -1664,8 +1655,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** - * @param path - * @param resource + * @param path the path to check the alias for + * @param resource the resource * @return True if the alias is OK */ public boolean checkAlias(String path, Resource resource) @@ -1695,6 +1686,9 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Convert URL to Resource wrapper for {@link Resource#newResource(URL)} enables extensions to provide alternate resource implementations. + * @param url the url to convert to a Resource + * @return the Resource for that url + * @throws IOException if unable to create a Resource from the URL */ public Resource newResource(URL url) throws IOException { @@ -1704,6 +1698,9 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu /* ------------------------------------------------------------ */ /** * Convert URL to Resource wrapper for {@link Resource#newResource(URL)} enables extensions to provide alternate resource implementations. + * @param uri the URI to convert to a Resource + * @return the Resource for that URI + * @throws IOException if unable to create a Resource from the URL */ public Resource newResource(URI uri) throws IOException { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java index 994b64f211b..45676f27ff4 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java @@ -234,6 +234,7 @@ public class ContextHandlerCollection extends HandlerCollection /* ------------------------------------------------------------ */ /** Add a context handler. * @param contextPath The context path to add + * @param resourceBase the base (root) Resource * @return the ContextHandler just added */ public ContextHandler addContext(String contextPath,String resourceBase) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java index 4b4aca767f3..4f39869c307 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java @@ -35,14 +35,13 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; /* ------------------------------------------------------------ */ -/** A collection of handlers. +/** + * A collection of handlers. *
* The default implementations calls all handlers in list order, * regardless of the response status or exceptions. Derived implementation * may alter the order or the conditions of calling the contained * handlers. - *
- * */ @ManagedObject("Handler of multiple handlers") public class HandlerCollection extends AbstractHandlerContainer diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerWrapper.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerWrapper.java index 58e405d5ee1..3e1d0c769a8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerWrapper.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerWrapper.java @@ -90,12 +90,16 @@ public class HandlerWrapper extends AbstractHandlerContainer } /* ------------------------------------------------------------ */ - /** Replace the current handler with another HandlerWrapper - * linked to the current handler. This is equivalent to:
+ /** + * Replace the current handler with another HandlerWrapper + * linked to the current handler. + **+ * This is equivalent to: + *
* wrapper.setHandler(getHandler()); * setHandler(wrapper); *- * @param wrapper + * @param wrapper the wrapper to insert */ public void insertHandler(HandlerWrapper wrapper) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java index b76761d586a..cdc1fc24f7e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java @@ -57,12 +57,11 @@ import org.eclipse.jetty.util.log.Logger; * are always applied, so that even if an entry matches the white list, a black list * entry will override it. *- *
* You can change white list policy setting whiteListByPath to true. In this mode a request will be white listed * IF it has a matching URL in the white list, otherwise the black list applies, e.g. in default mode when * whiteListByPath = false and wl = "127.0.0.1|/foo", /bar request from 127.0.0.1 will be blacklisted, * if whiteListByPath=true then not. - *
+ ** Internet addresses may be specified as absolute address or as a combination of * four octet wildcard specifications (a.b.c.d) that are defined as follows. *
@@ -70,9 +69,9 @@ import org.eclipse.jetty.util.log.Logger; * nnn - an absolute value (0-255) * mmm-nnn - an inclusive range of absolute values, * with following shorthand notations: - * nnn- => nnn-255 - * -nnn => 0-nnn - * - => 0-255 + * nnn- => nnn-255 + * -nnn => 0-nnn + * - => 0-255 * a,b,... - a list of wildcard specifications *
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java index b08f6dadc35..f0a8d3a7f85 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java @@ -33,13 +33,13 @@ import org.eclipse.jetty.server.Request; * Handler to adjust the idle timeout of requests while dispatched. * Can be applied in jetty.xml with *
- * <Get id='handler' name='Handler'/> - * <Set name='Handler'> - * <New id='idleTimeoutHandler' class='org.eclipse.jetty.server.handler.IdleTimeoutHandler'> - * <Set name='Handler'><Ref id='handler'/></Set> - * <Set name='IdleTimeoutMs'>5000</Set> - * </New> - * </Set> + * <Get id='handler' name='Handler'/> + * <Set name='Handler'> + * <New id='idleTimeoutHandler' class='org.eclipse.jetty.server.handler.IdleTimeoutHandler'> + * <Set name='Handler'><Ref id='handler'/></Set> + * <Set name='IdleTimeoutMs'>5000</Set> + * </New> + * </Set> **/ public class IdleTimeoutHandler extends HandlerWrapper diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java index 94d7cdebabc..e8157e9356f 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java @@ -598,9 +598,9 @@ public class ResourceHandler extends HandlerWrapper /** Set the response headers. * This method is called to set the response headers such as content type and content length. * May be extended to add additional headers. - * @param response - * @param resource - * @param mimeType + * @param response the http response + * @param resource the resource + * @param mimeType the mime type */ protected void doResponseHeaders(HttpServletResponse response, Resource resource, String mimeType) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ScopedHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ScopedHandler.java index dc1b88f8772..eae9c2b566e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ScopedHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ScopedHandler.java @@ -40,7 +40,7 @@ import org.eclipse.jetty.server.Request; * {@link #doHandle(String, Request, HttpServletRequest, HttpServletResponse)} method * is called on all contained handlers. * - *
For example if Scoped handlers A, B & C were chained together, then + *
For example if Scoped handlers A, B & C were chained together, then * the calling order would be:
** A.handle(...) @@ -52,7 +52,7 @@ import org.eclipse.jetty.server.Request; * C.doHandle(...) ** - *
If non scoped handler X was in the chained A, B, X & C, then + *
If non scoped handler X was in the chained A, B, X & C, then * the calling order would be:
** A.handle(...) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java index 00bd5d76f9d..dd4c8805dff 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java @@ -46,12 +46,11 @@ import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -/* ------------------------------------------------------------ */ /** * A Handler that can dynamically GZIP compress responses. Unlike * previous and 3rd party GzipFilters, this mechanism works with asynchronously * generated responses and does not need to wrap the response or it's output - * stream. Instead it uses the efficient {@link HttpOutput.Interceptor} mechanism. + * stream. Instead it uses the efficient {@link org.eclipse.jetty.server.HttpOutput.Interceptor} mechanism. ** The handler can be applied to the entire server (a gzip.mod is included in * the distribution) or it may be applied to individual contexts. diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java index c6e4b2b49d1..06281e327cc 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java @@ -98,6 +98,7 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI /* ------------------------------------------------------------- */ /** * asserts that the session is valid + * @throws IllegalStateException if the sesion is invalid */ protected void checkValid() throws IllegalStateException { @@ -107,8 +108,8 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI /* ------------------------------------------------------------- */ /** Check to see if session has expired as at the time given. - * @param time - * @return + * @param time the time in milliseconds + * @return true if expired */ protected boolean checkExpiry(long time) { @@ -470,11 +471,12 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI /* ------------------------------------------------------------ */ /** - * @param name - * @param value + * @param name the name of the attribute + * @param value the value of the attribute + * @return true if attribute changed * @deprecated use changeAttribute(String,Object) instead - * @return */ + @Deprecated protected boolean updateAttribute (String name, Object value) { Object old=null; @@ -504,9 +506,9 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI * in the session. The appropriate session attribute listeners are * also called. * - * @param name - * @param value - * @return + * @param name the name of the attribute + * @param value the value of the attribute + * @return the old value for the attribute */ protected Object changeAttribute (String name, Object value) { @@ -566,7 +568,11 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI } /* ------------------------------------------------------------- */ - /** If value implements HttpSessionBindingListener, call valueBound() */ + /** + * Bind value if value implements {@link HttpSessionBindingListener} (calls {@link HttpSessionBindingListener#valueBound(HttpSessionBindingEvent)}) + * @param name the name with which the object is bound or unbound + * @param value the bound value + */ public void bindValue(java.lang.String name, Object value) { if (value!=null&&value instanceof HttpSessionBindingListener) @@ -607,7 +613,11 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI } /* ------------------------------------------------------------- */ - /** If value implements HttpSessionBindingListener, call valueUnbound() */ + /** + * Unbind value if value implements {@link HttpSessionBindingListener} (calls {@link HttpSessionBindingListener#valueUnbound(HttpSessionBindingEvent)}) + * @param name the name with which the object is bound or unbound + * @param value the bound value + */ public void unbindValue(java.lang.String name, Object value) { if (value!=null&&value instanceof HttpSessionBindingListener) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionIdManager.java index ba55a2e7eac..32cff50cf96 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionIdManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionIdManager.java @@ -67,13 +67,13 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme /* ------------------------------------------------------------ */ /** - * Set the workname. If set, the workername is dot appended to the session + * Set the workername. If set, the workername is dot appended to the session * ID and can be used to assist session affinity in a load balancer. * A worker name starting with $ is used as a request attribute name to * lookup the worker name that can be dynamically set by a request - * customiser. + * Customizer. * - * @param workerName + * @param workerName the name of the worker */ public void setWorkerName(String workerName) { @@ -244,8 +244,8 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme /** Get the session ID with any worker ID. * - * @param clusterId - * @param request + * @param clusterId the cluster id + * @param request the request * @return sessionId plus any worker ID. */ @Override diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionManager.java index babe6c384ff..56e847b803a 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionManager.java @@ -53,15 +53,12 @@ import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.statistic.CounterStatistic; import org.eclipse.jetty.util.statistic.SampleStatistic; -/* ------------------------------------------------------------ */ /** - * An Abstract implementation of SessionManager. The partial implementation of - * SessionManager interface provides the majority of the handling required to - * implement a SessionManager. Concrete implementations of SessionManager based - * on AbstractSessionManager need only implement the newSession method to return - * a specialised version of the Session inner class that provides an attribute - * Map. + * An Abstract implementation of SessionManager. *
+ * The partial implementation of SessionManager interface provides the majority of the handling required to implement a + * SessionManager. Concrete implementations of SessionManager based on AbstractSessionManager need only implement the + * newSession method to return a specialized version of the Session inner class that provides an attribute Map. */ @SuppressWarnings("deprecation") @ManagedObject("Abstract Session Manager") @@ -405,6 +402,7 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen /** * HTTPS request. Can be overridden by setting SessionCookieConfig.setSecure(true), * in which case the session cookie will be marked as secure on both HTTPS and HTTP. + * @param secureRequestOnly true to set Session Cookie Config as secure */ public void setSecureRequestOnly(boolean secureRequestOnly) { @@ -423,7 +421,7 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen * A sessioncookie is marked as secure IFF any of the following conditions are true: *
*
* According to SessionCookieConfig javadoc, case 1 can be used when: * "... even though the request that initiated the session came over HTTP, @@ -431,14 +429,16 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen * SSL offloading load balancer. In this case, the traffic between the client * and the load balancer will be over HTTPS, whereas the traffic between the * load balancer and the web container will be over HTTP." - * + *- SessionCookieConfig.setSecure == true
- *- SessionCookieConfig.setSecure == false && _secureRequestOnly==true && request is HTTPS
+ *- SessionCookieConfig.setSecure == false && _secureRequestOnly==true && request is HTTPS
** For case 2, you can use _secureRequestOnly to determine if you want the - * Servlet Spec 3.0 default behaviour when SessionCookieConfig.setSecure==false, + * Servlet Spec 3.0 default behavior when SessionCookieConfig.setSecure==false, * which is: + * * "they shall be marked as secure only if the request that initiated the * corresponding session was also secure" - * - * The default for _secureRequestOnly is true, which gives the above behaviour. If + * + *
+ * The default for _secureRequestOnly is true, which gives the above behavior. If * you set it to false, then a session cookie is NEVER marked as secure, even if * the initiating request was secure. * @@ -612,9 +612,6 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen } /* ------------------------------------------------------------ */ - /** - * @param seconds - */ @Override public void setMaxInactiveInterval(int seconds) { @@ -669,6 +666,8 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen /** * Add the session Registers the session with this manager and registers the * session ID with the sessionIDManager; + * @param session the session + * @param created true if session was created */ protected void addSession(AbstractSession session, boolean created) { @@ -701,7 +700,7 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen /** * Prepare sessions for session manager shutdown * - * @throws Exception + * @throws Exception if unable to shutdown sesssions */ protected abstract void shutdownSessions() throws Exception; @@ -709,7 +708,7 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen /* ------------------------------------------------------------ */ /** * Create a new session instance - * @param request + * @param request the request to build the session from * @return the new session */ protected abstract AbstractSession newSession(HttpServletRequest request); @@ -746,10 +745,12 @@ public abstract class AbstractSessionManager extends ContainerLifeCycle implemen } /* ------------------------------------------------------------ */ - /** Remove session from manager + /** + * Remove session from manager * @param session The session to remove * @param invalidate True if {@link HttpSessionListener#sessionDestroyed(HttpSessionEvent)} and * {@link SessionIdManager#invalidateAll(String)} should be called. + * @return if the session was removed */ public boolean removeSession(AbstractSession session, boolean invalidate) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionIdManager.java index 07b40373907..da34b3866e3 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionIdManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionIdManager.java @@ -64,6 +64,7 @@ public class HashSessionIdManager extends AbstractSessionIdManager /* ------------------------------------------------------------ */ /** + * @param id the id of the session * @return Collection of Sessions for the passed session ID */ public Collection
getSession(String id) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashedSession.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashedSession.java index 8e8e365415b..b89c7f90a22 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashedSession.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HashedSession.java @@ -245,6 +245,7 @@ public class HashedSession extends MemSession * * The session is idled by persisting it, then clearing the session values attribute map and finally setting * it to an idled state. + * @throws Exception if unable to save session */ public synchronized void idle() throws Exception diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java index 68cc12e25ff..99108d86d7b 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java @@ -530,7 +530,7 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager * Convert a camel case identifier into either upper or lower * depending on the way the db stores identifiers. * - * @param identifier + * @param identifier the raw identifier * @return the converted identifier */ public String convertIdentifier (String identifier) @@ -629,8 +629,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager /** * Configure jdbc connection information via a jdbc Driver * - * @param driverClassName - * @param connectionUrl + * @param driverClassName the driver classname + * @param connectionUrl the driver connection url */ public void setDriverInfo (String driverClassName, String connectionUrl) { @@ -641,8 +641,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager /** * Configure jdbc connection information via a jdbc Driver * - * @param driverClass - * @param connectionUrl + * @param driverClass the driver class + * @param connectionUrl the driver connection url */ public void setDriverInfo (Driver driverClass, String connectionUrl) { @@ -682,9 +682,10 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager } /** - * @param name + * @param name the name of the blob * @deprecated see DbAdaptor.setBlobType */ + @Deprecated public void setBlobType (String name) { _dbAdaptor.setBlobType(name); @@ -704,27 +705,30 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager } /** - * @return + * @return the blob type * @deprecated see DbAdaptor.getBlobType */ + @Deprecated public String getBlobType () { return _dbAdaptor.getBlobType(); } /** - * @return + * @return the long type * @deprecated see DbAdaptor.getLogType */ + @Deprecated public String getLongType() { return _dbAdaptor.getLongType(); } /** - * @param longType + * @param longType the long type * @deprecated see DbAdaptor.setLongType */ + @Deprecated public void setLongType(String longType) { _dbAdaptor.setLongType(longType); @@ -1026,7 +1030,7 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager * Get a connection from the driver or datasource. * * @return the connection for the datasource - * @throws SQLException + * @throws SQLException if unable to get the connection */ protected Connection getConnection () throws SQLException @@ -1036,11 +1040,6 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager else return DriverManager.getConnection(_connectionUrl); } - - - - - /** * Set up the tables in the database diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java index be3c55a99c1..59cefbdc673 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionManager.java @@ -48,23 +48,24 @@ import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; /** - * JDBCSessionManager - * + * JDBCSessionManager. + * * SessionManager that persists sessions to a database to enable clustering. - * + *
* Session data is persisted to the JettySessions table: - * - * rowId (unique in cluster: webapp name/path + virtualhost + sessionId) - * contextPath (of the context owning the session) - * sessionId (unique in a context) - * lastNode (name of node last handled session) - * accessTime (time in milliseconds session was accessed) - * lastAccessTime (previous time in milliseconds session was accessed) - * createTime (time in milliseconds session created) - * cookieTime (time in milliseconds session cookie created) - * lastSavedTime (last time in milliseconds session access times were saved) - * expiryTime (time in milliseconds that the session is due to expire) - * map (attribute map) + *
+ *
* * As an optimization, to prevent thrashing the database, we do not persist * the accessTime and lastAccessTime every time the session is accessed. Rather, @@ -140,7 +141,7 @@ public class JDBCSessionManager extends AbstractSessionManager /** * Session from a request. * - * @param request + * @param request the request */ protected Session (HttpServletRequest request) { @@ -155,10 +156,11 @@ public class JDBCSessionManager extends AbstractSessionManager /** * Session restored from database - * @param sessionId - * @param rowId - * @param created - * @param accessed + * @param sessionId the session id + * @param rowId the row id + * @param created the created timestamp + * @param accessed the access timestamp + * @param maxInterval the max inactive interval (in seconds) */ protected Session (String sessionId, String rowId, long created, long accessed, long maxInterval) { @@ -407,7 +409,7 @@ public class JDBCSessionManager extends AbstractSessionManager * If any session attribute does change, then the attributes and * the accessed time are persisted. * - * @param sec + * @param sec the save interval in seconds */ public void setSaveInterval (long sec) { @@ -430,7 +432,7 @@ public class JDBCSessionManager extends AbstractSessionManager * This could be used eg with a JMS backplane to notify nodes * that the session has changed and to delete the session from * the node's cache, and re-read it from the database. - * @param session + * @param session the session to invalidate */ public void cacheInvalidate (Session session) { @@ -693,7 +695,7 @@ public class JDBCSessionManager extends AbstractSessionManager /** * Invalidate a session. * - * @param idInCluster + * @param idInCluster the id in the cluster */ protected void invalidateSession (String idInCluster) { @@ -768,15 +770,6 @@ public class JDBCSessionManager extends AbstractSessionManager return new Session(request); } - - /** - * @param sessionId - * @param rowId - * @param created - * @param accessed - * @param maxInterval - * @return - */ protected AbstractSession newSession (String sessionId, String rowId, long created, long accessed, long maxInterval) { return new Session(sessionId, rowId, created, accessed, maxInterval); @@ -810,7 +803,8 @@ public class JDBCSessionManager extends AbstractSessionManager * Expire any Sessions we have in memory matching the list of * expired Session ids. * - * @param sessionIds + * @param sessionIds the session ids to expire + * @return the set of successfully expired ids */ protected Set- rowId
- (unique in cluster: webapp name/path + virtualhost + sessionId)
+ *- contextPath
- (of the context owning the session)
+ *- sessionId
- (unique in a context)
+ *- lastNode
- (name of node last handled session)
+ *- accessTime
- (time in milliseconds session was accessed)
+ *- lastAccessTime
- (previous time in milliseconds session was accessed)
+ *- createTime
- (time in milliseconds session created)
+ *- cookieTime
- (time in milliseconds session cookie created)
+ *- lastSavedTime
- (last time in milliseconds session access times were saved)
+ *- expiryTime
- (time in milliseconds that the session is due to expire)
+ *- map
- (attribute map)
+ *expire (Set sessionIds) { @@ -875,9 +869,11 @@ public class JDBCSessionManager extends AbstractSessionManager /** * Load a session from the database - * @param id + * @param id the id + * @param canonicalContextPath the canonical context path + * @param vhost the virtual host * @return the session data that was loaded - * @throws Exception + * @throws Exception if unable to load the session */ protected Session loadSession (final String id, final String canonicalContextPath, final String vhost) throws Exception @@ -957,8 +953,8 @@ public class JDBCSessionManager extends AbstractSessionManager /** * Insert a session into the database. * - * @param session - * @throws Exception + * @param session the session + * @throws Exception if unable to store the session */ protected void storeSession (Session session) throws Exception @@ -1010,7 +1006,7 @@ public class JDBCSessionManager extends AbstractSessionManager * Update data on an existing persisted session. * * @param data the session - * @throws Exception + * @throws Exception if unable to update the session */ protected void updateSession (Session data) throws Exception @@ -1053,7 +1049,7 @@ public class JDBCSessionManager extends AbstractSessionManager * Update the node on which the session was last seen to be my node. * * @param data the session - * @throws Exception + * @throws Exception if unable to update the session node */ protected void updateSessionNode (Session data) throws Exception @@ -1107,8 +1103,8 @@ public class JDBCSessionManager extends AbstractSessionManager * Delete a session from the database. Should only be called * when the session has been invalidated. * - * @param data - * @throws Exception + * @param data the session data + * @throws Exception if unable to delete the session */ protected void deleteSession (Session data) throws Exception diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java index dbbe4d6bd22..d7c1416a07a 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java @@ -228,8 +228,8 @@ public class SessionHandler extends ScopedHandler /** * Look for a requested session ID in cookies and URI parameters * - * @param baseRequest - * @param request + * @param baseRequest the request to check + * @param request the request to check */ protected void checkRequestedSessionId(Request baseRequest, HttpServletRequest request) { @@ -321,9 +321,6 @@ public class SessionHandler extends ScopedHandler } /* ------------------------------------------------------------ */ - /** - * @param listener - */ public void addEventListener(EventListener listener) { if (_sessionManager != null) @@ -331,9 +328,6 @@ public class SessionHandler extends ScopedHandler } /* ------------------------------------------------------------ */ - /** - * @param listener - */ public void removeEventListener(EventListener listener) { if (_sessionManager != null) diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java index 8251237527e..ff80487c3ca 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java @@ -56,9 +56,6 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -/** - * - */ public class HttpConnectionTest { private Server server; @@ -686,6 +683,7 @@ public class HttpConnectionTest /** * Creates a request header over 1k in size, by creating a single header entry with an huge value. + * @throws Exception if test failure */ @Test public void testOversizedBuffer() throws Exception @@ -714,6 +712,7 @@ public class HttpConnectionTest /** * Creates a request header with over 1000 entries. + * @throws Exception if test failure */ @Test public void testExcessiveHeader() throws Exception diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/RequestLogHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/RequestLogHandlerTest.java index 4ab32faf785..92c18ed945e 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/RequestLogHandlerTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/RequestLogHandlerTest.java @@ -376,6 +376,7 @@ public class RequestLogHandlerTest /** * Test a RequestLogHandler at the end of a HandlerCollection. all other configuration on server at defaults. + * @throws Exception if test failure */ @Test(timeout = 4000) public void testLogHandlerCollection() throws Exception @@ -439,6 +440,7 @@ public class RequestLogHandlerTest /** * Test a RequestLogHandler at the end of a HandlerCollection and also with the default ErrorHandler as server bean in place. + * @throws Exception if test failure */ @Test(timeout = 4000) public void testLogHandlerCollection_ErrorHandler_ServerBean() throws Exception @@ -505,6 +507,7 @@ public class RequestLogHandlerTest /** * Test a RequestLogHandler at the end of a HandlerCollection and also with the ErrorHandler in place. + * @throws Exception if test failure */ @Test(timeout=4000) public void testLogHandlerCollection_AltErrorHandler() throws Exception @@ -578,6 +581,7 @@ public class RequestLogHandlerTest /** * Test a RequestLogHandler at the end of a HandlerCollection and also with the ErrorHandler in place. + * @throws Exception if test failure */ @Test(timeout=4000) public void testLogHandlerCollection_OKErrorHandler() throws Exception @@ -651,6 +655,7 @@ public class RequestLogHandlerTest /** * Test a RequestLogHandler at the end of a HandlerCollection and also with the ErrorHandler in place. + * @throws Exception if test failure */ @Test(timeout=4000) public void testLogHandlerCollection_DispatchErrorHandler() throws Exception diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/session/SessionCookieTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/session/SessionCookieTest.java index e3322e51173..0004a15b3a0 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/session/SessionCookieTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/session/SessionCookieTest.java @@ -31,24 +31,14 @@ import javax.servlet.http.HttpSession; import org.eclipse.jetty.http.HttpCookie; import org.junit.Test; + /** * SessionCookieTest - * - * */ public class SessionCookieTest { - public class MockSession extends AbstractSession { - - - /** - * @param abstractSessionManager - * @param created - * @param accessed - * @param clusterId - */ protected MockSession(AbstractSessionManager abstractSessionManager, long created, long accessed, String clusterId) { super(abstractSessionManager, created, accessed, clusterId); @@ -72,9 +62,6 @@ public class SessionCookieTest return null; } - /** - * @see javax.servlet.http.HttpSession#getValueNames() - */ @Override public String[] getValueNames() {