464727 - Update Javadoc for Java 8 DocLint

This commit is contained in:
Joakim Erdfelt 2015-04-22 18:37:48 -07:00
parent d434f419d2
commit f7adc1aa5f
51 changed files with 162 additions and 208 deletions

View File

@ -37,6 +37,8 @@ public class JettyWeldInitializer
* level.
* <p>
* Includes {@link #initContext(ContextHandler)} behavior as well.
* @param webapp the webapp
* @throws NamingException if unable to bind BeanManager context
*/
public static void initWebApp(WebAppContext webapp) throws NamingException
{

View File

@ -29,10 +29,9 @@ import org.eclipse.jetty.monitor.jmx.MonitorTask;
import org.eclipse.jetty.monitor.jmx.ServiceConnection;
import org.eclipse.jetty.xml.XmlConfiguration;
/* ------------------------------------------------------------ */
/**
* JMXMonitor
*
* <p>
* Performs monitoring of the values of the attributes of MBeans
* and executes specified actions as well as sends notifications
* of the specified events that have occurred.
@ -120,7 +119,7 @@ public class JMXMonitor
* Retrieves a connection to JMX service
*
* @return server connection
* @throws IOException
* @throws IOException if unable to obtain server connection
*/
public static MBeanServerConnection getServiceConnection()
throws IOException

View File

@ -60,7 +60,7 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
/**
* Instantiates a new thread monitor.
*
* @throws Exception
* @throws Exception if unable to instantiate thread monitor
*/
public ThreadMonitor() throws Exception
{
@ -72,7 +72,7 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
* Instantiates a new thread monitor.
*
* @param intervalMs scan interval
* @throws Exception
* @throws Exception if unable to instantiate thread monitor
*/
public ThreadMonitor(int intervalMs) throws Exception
{
@ -85,7 +85,7 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
*
* @param intervalMs scan interval
* @param threshold busy threshold
* @throws Exception
* @throws Exception if unable to instantiate thread monitor
*/
public ThreadMonitor(int intervalMs, int threshold) throws Exception
{
@ -99,7 +99,7 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
* @param intervalMs scan interval
* @param threshold busy threshold
* @param depth stack compare depth
* @throws Exception
* @throws Exception if unable to instantiate thread monitor
*/
public ThreadMonitor(int intervalMs, int threshold, int depth) throws Exception
{
@ -114,7 +114,7 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
* @param threshold busy threshold
* @param depth stack compare depth
* @param trail length of stack trail
* @throws Exception
* @throws Exception if unable to instantiate thread monitor
*/
public ThreadMonitor(int intervalMs, int threshold, int depth, int trail) throws Exception
{

View File

@ -50,10 +50,6 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
/* ------------------------------------------------------------ */
/**
*/
public class JavaMonitorAction extends MonitorAction
{
private static final Logger LOG = Log.getLogger(JavaMonitorAction.class);
@ -68,12 +64,6 @@ public class JavaMonitorAction extends MonitorAction
private String _session;
/* ------------------------------------------------------------ */
/**
* @param notifier
* @param pollInterval
* @throws Exception
* @throws MalformedObjectNameException
*/
public JavaMonitorAction(EventNotifier notifier, String url, String uuid, String appid, long pollInterval)
throws Exception
{

View File

@ -30,12 +30,11 @@ import java.util.Map;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.ManagedOperation;
/* ------------------------------------------------------------ */
/**
* Derived from the JMX bean classes created by Kees Jan Koster for the java-monitor
* J2EE probe http://code.google.com/p/java-monitor-probes/source/browse/.
*
* @author kjkoster <kjkoster@gmail.com>
* @author <a href="mailto:kjkoster@gmail.com">Kees Jan Koster</a>
*/
@ManagedObject("Java Monitoring Tools")
public class JavaMonitorTools

View File

@ -23,8 +23,8 @@ import javax.management.ObjectName;
import org.eclipse.jetty.monitor.triggers.AttrEventTrigger;
/* ------------------------------------------------------------ */
/**
* @param <TYPE> the trigger type
*/
public class JavaMonitorTrigger <TYPE extends Comparable<TYPE>>
extends AttrEventTrigger<TYPE>
@ -35,13 +35,6 @@ public class JavaMonitorTrigger <TYPE extends Comparable<TYPE>>
private int _count;
/* ------------------------------------------------------------ */
/**
* @param nameObject
* @param attributeName
* @param id
* @param dynamic
* @throws IllegalArgumentException
*/
public JavaMonitorTrigger(ObjectName nameObject, String attributeName, String id, String name, boolean dynamic)
throws IllegalArgumentException
{

View File

@ -35,7 +35,7 @@ public class ConsoleNotifier implements EventNotifier
* Constructs a new notifier with specified format string
*
* @param format the {@link java.util.Formatter format string}
* @throws IllegalArgumentException
* @throws IllegalArgumentException if format is invalid
*/
public ConsoleNotifier(String format)
throws IllegalArgumentException

View File

@ -31,7 +31,8 @@ public interface EventNotifier
/* ------------------------------------------------------------ */
/**
* This method is called when a notification event is received by the containing object
*
*
* @param trigger the event trigger
* @param state an {@link org.eclipse.jetty.monitor.jmx.EventState event state}
* @param timestamp time stamp of the event
*/

View File

@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
*
* Holds the state of one or more {@link org.eclipse.jetty.monitor.jmx.EventTrigger event trigger}
* instances to be used when sending notifications as well as executing the actions
* @param <TYPE> the event trigger type
*/
public class EventState<TYPE>
{
@ -39,6 +40,7 @@ public class EventState<TYPE>
* State
*
* Holds the state of a single {@link org.eclipse.jetty.monitor.jmx.EventTrigger event trigger}
* @param <TYPE> the event trigger type
*/
public static class TriggerState<TYPE>
{

View File

@ -58,7 +58,9 @@ public abstract class EventTrigger
* Abstract method to verify if the event trigger conditions
* are in the appropriate state for an event to be triggered
*
* @param timestamp the timestamp to match
* @return true to trigger an event
* @throws Exception if unable to match
*/
public abstract boolean match(long timestamp) throws Exception;

View File

@ -40,7 +40,7 @@ public class LoggingNotifier implements EventNotifier
* Constructs a new notifier with specified format string
*
* @param format the {@link java.util.Formatter format string}
* @throws IllegalArgumentException
* @throws IllegalArgumentException if format is invalid
*/
public LoggingNotifier(String format)
throws IllegalArgumentException

View File

@ -45,7 +45,7 @@ public abstract class MonitorAction
* Creates a new monitor action
*
* @param trigger event trigger to be associated with this action
* @throws InvalidParameterException
* @throws InvalidParameterException if trigger is invalid
*/
public MonitorAction(EventTrigger trigger)
throws InvalidParameterException
@ -60,7 +60,7 @@ public abstract class MonitorAction
*
* @param trigger event trigger to be associated with this action
* @param notifier event notifier to be associated with this action
* @throws InvalidParameterException
* @throws InvalidParameterException if trigger is invalid
*/
public MonitorAction(EventTrigger trigger, EventNotifier notifier)
throws InvalidParameterException
@ -75,7 +75,7 @@ public abstract class MonitorAction
* @param trigger event trigger to be associated with this action
* @param notifier event notifier to be associated with this action
* @param pollInterval interval for polling of the JMX server
* @throws InvalidParameterException
* @throws InvalidParameterException if trigger is invalid
*/
public MonitorAction(EventTrigger trigger, EventNotifier notifier, long pollInterval)
throws InvalidParameterException
@ -91,7 +91,7 @@ public abstract class MonitorAction
* @param notifier event notifier to be associated with this action
* @param pollInterval interval for polling of the JMX server
* @param pollDelay delay before starting to poll the JMX server
* @throws InvalidParameterException
* @throws InvalidParameterException if trigger is invalid
*/
public MonitorAction(EventTrigger trigger, EventNotifier notifier, long pollInterval, long pollDelay)
throws InvalidParameterException

View File

@ -54,7 +54,7 @@ public class ServiceConnection
/**
* Construct a loopback connection to an internal server
*
* @throws IOException
* @throws IOException if unable to construct service connection
*/
public ServiceConnection()
throws IOException
@ -67,7 +67,7 @@ public class ServiceConnection
* Construct a connection to specified server
*
* @param url URL of JMX server
* @throws IOException
* @throws IOException if unable to construct service connection
*/
public ServiceConnection(String url)
throws IOException

View File

@ -72,27 +72,18 @@ public class AggregateEventTrigger extends EventTrigger
}
/* ------------------------------------------------------------ */
/**
* @param trigger
*/
public void add(EventTrigger trigger)
{
_triggers.add(trigger);
}
/* ------------------------------------------------------------ */
/**
* @param triggers
*/
public void addAll(List<EventTrigger> triggers)
{
_triggers.addAll(triggers);
}
/* ------------------------------------------------------------ */
/**
* @param triggers
*/
public void addAll(EventTrigger... triggers)
{
_triggers.addAll(Arrays.asList(triggers));

View File

@ -32,11 +32,9 @@ import org.eclipse.jetty.monitor.jmx.EventTrigger;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/* ------------------------------------------------------------ */
/**
* AttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute
* and matches every invocation of this trigger. It can be
* used to send notifications of the value of an attribute
@ -44,6 +42,7 @@ import org.eclipse.jetty.util.log.Logger;
* a base class for the event triggers that match the
* value of an attribute of the MXBean being polled against
* some specified criteria.
* @param <TYPE> the event trigger type
*/
public class AttrEventTrigger<TYPE extends Comparable<TYPE>>
extends EventTrigger
@ -64,8 +63,8 @@ public class AttrEventTrigger<TYPE extends Comparable<TYPE>>
* @param objectName object name of an MBean to be polled
* @param attributeName name of an MBean attribute to be polled
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException if unable to find object due to malformed name reference
* @throws IllegalArgumentException if parameters are invalid
*/
public AttrEventTrigger(String objectName, String attributeName)
throws MalformedObjectNameException, IllegalArgumentException
@ -91,7 +90,7 @@ public class AttrEventTrigger<TYPE extends Comparable<TYPE>>
* @param nameObject object name of an MBean to be polled
* @param attributeName name of an MBean attribute to be polled
*
* @throws IllegalArgumentException
* @throws IllegalArgumentException if parameters are invalid
*/
public AttrEventTrigger(ObjectName nameObject, String attributeName)
throws IllegalArgumentException
@ -113,7 +112,7 @@ public class AttrEventTrigger<TYPE extends Comparable<TYPE>>
/**
* Verify if the event trigger conditions are in the
* appropriate state for an event to be triggered.
* This event trigger uses the match(Comparable<TYPE>)
* This event trigger uses the match(Comparable&lt;TYPE&gt;)
* method to compare the value of the MXBean attribute
* to the conditions specified by the subclasses.
*
@ -162,6 +161,8 @@ public class AttrEventTrigger<TYPE extends Comparable<TYPE>>
* appropriate state for an event to be triggered.
* Allows subclasses to override the default behavior
* that matches every invocation of this trigger
* @param value the value to match
* @return always true
*/
public boolean match(Comparable<TYPE> value)
{

View File

@ -21,12 +21,12 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* EqualToAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is equal to specified value.
* @param <TYPE> the event trigger type
*/
public class EqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -42,8 +42,8 @@ public class EqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> extends Attr
* @param attributeName name of an MBean attribute to be polled
* @param value target value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException if unable to find object due to name issue
* @throws IllegalArgumentException on invalid parameters
*/
public EqualToAttrEventTrigger(String objectName, String attributeName, TYPE value)
throws MalformedObjectNameException, IllegalArgumentException

View File

@ -20,13 +20,12 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* GreaterThanAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is greater than specified min value.
* @param <TYPE> event trigger type
*/
public class GreaterThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -42,8 +41,8 @@ public class GreaterThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends
* @param attributeName name of an MBean attribute to be polled
* @param min minimum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public GreaterThanAttrEventTrigger(String objectName, String attributeName, TYPE min)
throws MalformedObjectNameException, IllegalArgumentException
@ -72,7 +71,7 @@ public class GreaterThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "min<name".
* in the format "min&lt;name".
*
* @return string representation of the event trigger
*

View File

@ -20,13 +20,12 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* GreaterThanOrEqualToAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is greater than or equal to specified min value.
* @param <TYPE> event trigger type
*/
public class GreaterThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -42,8 +41,8 @@ public class GreaterThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>>
* @param attributeName name of an MBean attribute to be polled
* @param min minimum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public GreaterThanOrEqualToAttrEventTrigger(String objectName, String attributeName, TYPE min)
throws MalformedObjectNameException, IllegalArgumentException
@ -72,7 +71,7 @@ public class GreaterThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>>
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "min<=name".
* in the format "min&lt;=name".
*
* @return string representation of the event trigger
*

View File

@ -20,13 +20,12 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* LessThanAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is greater than specified max value.
* @param <TYPE> event trigger type
*/
public class LessThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -42,8 +41,8 @@ public class LessThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends Att
* @param attributeName name of an MBean attribute to be polled
* @param max maximum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public LessThanAttrEventTrigger(String objectName, String attributeName, TYPE max)
throws MalformedObjectNameException, IllegalArgumentException
@ -72,7 +71,7 @@ public class LessThanAttrEventTrigger<TYPE extends Comparable<TYPE>> extends Att
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "name<max".
* in the format "name&lt;max".
*
* @return string representation of the event trigger
*

View File

@ -21,12 +21,12 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* LessThanOrEqualToAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is less than or equal to specified max value.
* @param <TYPE> event trigger type
*/
public class LessThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -42,8 +42,8 @@ public class LessThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> ex
* @param attributeName name of an MBean attribute to be polled
* @param max maximum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public LessThanOrEqualToAttrEventTrigger(String objectName, String attributeName, TYPE max)
throws MalformedObjectNameException, IllegalArgumentException
@ -72,7 +72,7 @@ public class LessThanOrEqualToAttrEventTrigger<TYPE extends Comparable<TYPE>> ex
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "name<=max".
* in the format "name&lt;=max".
*
* @return string representation of the event trigger
*

View File

@ -20,14 +20,13 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* RangeAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is in a range from specified min value to
* specified max value.
* @param <TYPE> event trigger type
*/
public class RangeAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -45,8 +44,8 @@ public class RangeAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEv
* @param min minimum value of the attribute
* @param max maximum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public RangeAttrEventTrigger(String objectName, String attributeName,TYPE min, TYPE max)
throws MalformedObjectNameException, IllegalArgumentException
@ -79,7 +78,7 @@ public class RangeAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEv
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "min<name<max".
* in the format "min&lt;name&lt;max".
*
* @return string representation of the event trigger
*

View File

@ -20,14 +20,13 @@ package org.eclipse.jetty.monitor.triggers;
import javax.management.MalformedObjectNameException;
/* ------------------------------------------------------------ */
/**
* RangeInclAttrEventTrigger
*
* <p>
* Event trigger that polls a value of an MXBean attribute and
* checks if it is in a range from specified min value to
* specified max value including the range bounds.
* @param <TYPE> event trigger type
*/
public class RangeInclAttrEventTrigger<TYPE extends Comparable<TYPE>> extends AttrEventTrigger<TYPE>
{
@ -45,8 +44,8 @@ public class RangeInclAttrEventTrigger<TYPE extends Comparable<TYPE>> extends At
* @param min minimum value of the attribute
* @param max maximum value of the attribute
*
* @throws MalformedObjectNameException
* @throws IllegalArgumentException
* @throws MalformedObjectNameException on bad object name
* @throws IllegalArgumentException on bad parameters
*/
public RangeInclAttrEventTrigger(String objectName, String attributeName,TYPE min, TYPE max)
throws MalformedObjectNameException, IllegalArgumentException
@ -79,7 +78,7 @@ public class RangeInclAttrEventTrigger<TYPE extends Comparable<TYPE>> extends At
/* ------------------------------------------------------------ */
/**
* Returns the string representation of this event trigger
* in the format "min<=name<=max".
* in the format "min&lt;=name&lt;=max".
*
* @return string representation of the event trigger
*

View File

@ -35,7 +35,6 @@ import org.eclipse.jetty.util.log.Logger;
* NoSqlSessionManager
*
* Base class for SessionManager implementations using nosql frameworks
*
*/
public abstract class NoSqlSessionManager extends AbstractSessionManager implements SessionManager
{
@ -241,7 +240,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
* The State Period is the maximum time in seconds that an in memory session is allows to be stale:
* <ul>
* <li>If this period is exceeded, the DB will be checked to see if a more recent version is available.</li>
* <li>If the state period is set to a value < 0, then no staleness check will be made.</li>
* <li>If the state period is set to a value &lt; 0, then no staleness check will be made.</li>
* <li>If the state period is set to 0, then a staleness check is made whenever the active request count goes from 0 to 1.</li>
* </ul>
* @return the stalePeriod in seconds
@ -256,7 +255,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
* The State Period is the maximum time in seconds that an in memory session is allows to be stale:
* <ul>
* <li>If this period is exceeded, the DB will be checked to see if a more recent version is available.</li>
* <li>If the state period is set to a value < 0, then no staleness check will be made.</li>
* <li>If the state period is set to a value &lt; 0, then no staleness check will be made.</li>
* <li>If the state period is set to 0, then a staleness check is made whenever the active request count goes from 0 to 1.</li>
* </ul>
* @param stalePeriod the stalePeriod in seconds
@ -274,9 +273,9 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
* <li>a save period of -1 means the session is never saved to the DB other than on a shutdown</li>
* <li>a save period of 0 means the session is written to the DB whenever the active request count goes from 1 to 0.</li>
* <li>a save period of 1 means the session is written to the DB whenever the active request count goes from 1 to 0 and the session is dirty.</li>
* <li>a save period of > 1 means the session is written after that period in seconds of being dirty.</li>
* <li>a save period of &gt; 1 means the session is written after that period in seconds of being dirty.</li>
* </ul>
* @return the savePeriod -2,-1,0,1 or the period in seconds >=2
* @return the savePeriod -2,-1,0,1 or the period in seconds &gt;=2
*/
public int getSavePeriod()
{
@ -291,9 +290,9 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
* <li>a save period of -1 means the session is never saved to the DB other than on a shutdown</li>
* <li>a save period of 0 means the session is written to the DB whenever the active request count goes from 1 to 0.</li>
* <li>a save period of 1 means the session is written to the DB whenever the active request count goes from 1 to 0 and the session is dirty.</li>
* <li>a save period of > 1 means the session is written after that period in seconds of being dirty.</li>
* <li>a save period of &gt; 1 means the session is written after that period in seconds of being dirty.</li>
* </ul>
* @param savePeriod the savePeriod -2,-1,0,1 or the period in seconds >=2
* @param savePeriod the savePeriod -2,-1,0,1 or the period in seconds &gt;=2
*/
public void setSavePeriod(int savePeriod)
{
@ -304,7 +303,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
/**
* The Idle Period is the time in seconds before an in memory session is passivated.
* When this period is exceeded, the session will be passivated and removed from memory. If the session was dirty, it will be written to the DB.
* If the idle period is set to a value < 0, then the session is never idled.
* If the idle period is set to a value &lt; 0, then the session is never idled.
* If the save period is set to 0, then the session is idled whenever the active request count goes from 1 to 0.
* @return the idlePeriod
*/
@ -317,7 +316,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
/**
* The Idle Period is the time in seconds before an in memory session is passivated.
* When this period is exceeded, the session will be passivated and removed from memory. If the session was dirty, it will be written to the DB.
* If the idle period is set to a value < 0, then the session is never idled.
* If the idle period is set to a value &lt; 0, then the session is never idled.
* If the save period is set to 0, then the session is idled whenever the active request count goes from 1 to 0.
* @param idlePeriod the idlePeriod in seconds
*/
@ -359,7 +358,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
/* ------------------------------------------------------------ */
/**
* Preserve sessions when the session manager is stopped otherwise remove them from the DB.
* @param removeOnStop the removeOnStop to set
* @param preserveOnStop the preserveOnStop to set
*/
public void setPreserveOnStop(boolean preserveOnStop)
{

View File

@ -49,13 +49,13 @@ import com.mongodb.MongoException;
/**
* Based partially on the JDBCSessionIdManager.
*
* <p>
* Theory is that we really only need the session id manager for the local
* instance so we have something to scavenge on, namely the list of known ids
*
* <p>
* This class has a timer that runs a periodic scavenger thread to query
* for all id's known to this node whose precalculated expiry time has passed.
*
* <p>
* These found sessions are then run through the invalidateAll(id) method that
* is a bit hinky but is supposed to notify all handlers this id is now DOA and
* ought to be cleaned up. this ought to result in a save operation on the session
@ -346,7 +346,7 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
/**
* The period in seconds between scavenge checks.
*
* @param scavengePeriod
* @param scavengePeriod the scavenge period in seconds
*/
public void setScavengePeriod(long scavengePeriod)
{
@ -377,6 +377,7 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
/**
* sets how old a session is to be persisted past the point it is
* no longer valid
* @param purgeValidAge the purge valid age
*/
public void setPurgeInvalidAge(long purgeValidAge)
{
@ -395,6 +396,7 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
* considered no longer viable and should be removed
*
* NOTE: set this value to 0 to disable purging of valid sessions
* @param purgeValidAge the purge valid age
*/
public void setPurgeValidAge(long purgeValidAge)
{
@ -578,7 +580,7 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
/**
* Expire this session for all contexts that are sharing the session
* id.
* @param sessionId
* @param sessionId the session id
*/
public void expireAll (String sessionId)
{

View File

@ -47,7 +47,7 @@ import com.mongodb.WriteConcern;
/**
* MongoSessionManager
*
* <p>
* Clustered session manager using MongoDB as the shared DB instance.
* The document model is an outer object that contains the elements:
* <ul>
@ -69,7 +69,7 @@ import com.mongodb.WriteConcern;
* </p>
* <p>
* For example:
* <code>
* <pre>
* { "_id" : ObjectId("52845534a40b66410f228f23"),
* "accessed" : NumberLong("1384818548903"),
* "maxIdle" : 1,
@ -85,14 +85,12 @@ import com.mongodb.WriteConcern;
* "id" : "w01ijx2vnalgv1sqrpjwuirprp7",
* "valid" : true
* }
* </code>
* </p>
* </pre>
* <p>
* In MongoDB, the nesting level is indicated by "." separators for the key name. Thus to
* interact with a session attribute, the key is composed of:
* "context".unique_context_name.attribute_name
* Eg "context"."::/contextA"."A"
* </p>
* <code>"context".unique_context_name.attribute_name</code>
* Eg <code>"context"."::/contextA"."A"</code>
*/
@ManagedObject("Mongo Session Manager")
public class MongoSessionManager extends NoSqlSessionManager
@ -701,6 +699,7 @@ public class MongoSessionManager extends NoSqlSessionManager
*
* the count() operation itself is optimized to perform on the server side
* and avoid loading to client side.
* @return the session store count
*/
@ManagedAttribute("total number of known sessions in the store")
public long getSessionStoreCount()

View File

@ -116,6 +116,7 @@ public class HeaderPatternRule extends PatternRule
/* ------------------------------------------------------------ */
/**
* Returns the add flag value.
* @return true if add flag set
*/
public boolean isAdd()
{

View File

@ -109,7 +109,7 @@ public class HeaderRegexRule extends RegexRule
/* ------------------------------------------------------------ */
/**
* Returns the add flag value.
* @return the add flag value.
*/
public boolean isAdd()
{
@ -118,7 +118,7 @@ public class HeaderRegexRule extends RegexRule
/* ------------------------------------------------------------ */
/**
* Returns the header contents.
* @return the header contents.
*/
@Override
public String toString()

View File

@ -53,7 +53,7 @@ public class ResponsePatternRule extends PatternRule
* Sets the reason for the response status code. Reasons will only reflect
* if the code value is greater or equal to 400.
*
* @param reason
* @param reason the reason
*/
public void setReason(String reason)
{

View File

@ -54,7 +54,6 @@ import org.eclipse.jetty.server.handler.HandlerWrapper;
* <li> {@link RewritePatternRule} - rewrites the requested URI. </li>
* <li> {@link RewriteRegexRule} - rewrites the requested URI using regular expression for pattern matching. </li>
* <li> {@link MsieSslRule} - disables the keep alive on SSL for IE5 and IE6. </li>
* <li> {@link LegacyRule} - the old version of rewrite. </li>
* <li> {@link ForwardedSchemeHeaderRule} - set the scheme according to the headers present. </li>
* <li> {@link VirtualHostRuleContainer} - checks whether the request matches one of a set of virtual host names.</li>
* </ul>

View File

@ -56,12 +56,6 @@ public class RewritePatternRule extends PatternRule implements Rule.ApplyURI
}
/* ------------------------------------------------------------ */
/*
* (non-Javadoc)
*
* @see org.eclipse.jetty.server.handler.rules.RuleBase#apply(javax.servlet.http.HttpServletRequest,
* javax.servlet.http.HttpServletResponse)
*/
@Override
public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
{
@ -73,14 +67,14 @@ public class RewritePatternRule extends PatternRule implements Rule.ApplyURI
/**
* This method will add _query to the requests's queryString and also combine it with existing queryStrings in
* the request. However it won't take care for duplicate. E.g. if request.getQueryString contains a parameter
* "param1 = true" and _query will contain "param1=false" the result will be param1=true&param1=false.
* <code>param1 = true</code> and _query will contain <code>param1=false</code> the result will be <code>param1=true&amp;param1=false</code>.
* To cover this use case some more complex pattern matching is necessary. We can implement this if there's use
* cases.
*
* @param request
* @param oldURI
* @param newURI
* @throws IOException
* @param request the request
* @param oldURI the old URI
* @param newURI the new URI
* @throws IOException if unable to apply the URI
*/
@Override
public void applyURI(Request request, String oldURI, String newURI) throws IOException

View File

@ -44,20 +44,18 @@ public abstract class Rule
/**
* This method calls tests the rule against the request/response pair and if the Rule
* applies, then the rule's action is triggered.
* @param target The target of the request
* @param request
* @param response
*
* @param target The target of the request
* @param request the request
* @param response the response
* @return The new target if the rule has matched, else null
* @throws IOException
* @throws IOException if unable to match the rule
*/
public abstract String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException;
/**
* Sets terminating to true or false.
* If true, this rule will terminate the loop if this rule has been applied.
*
* @param terminating
* @param terminating If true, this rule will terminate the loop if this rule has been applied.
*/
public void setTerminating(boolean terminating)
{

View File

@ -32,10 +32,7 @@ import org.eclipse.jetty.util.log.Logger;
/**
* Base container to group rules. Can be extended so that the contained rules
* will only be applied under certain conditions
*
*
*/
public class RuleContainer extends Rule
{
private static final Logger LOG = Log.getLogger(RuleContainer.class);
@ -154,6 +151,8 @@ public class RuleContainer extends Rule
* @param target target field to pass on to the contained rules
* @param request request object to pass on to the contained rules
* @param response response object to pass on to the contained rules
* @return the target
* @throws IOException if unable to apply the rule
*/
protected String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
{

View File

@ -29,12 +29,13 @@ import org.eclipse.jetty.util.log.Logger;
/**
* This rule can be used to protect against invalid unicode characters in a url making it into applications.
*
* <p>
* The logic is as follows.
*
* - if decoded uri character is an iso control character return code/reason
* - if no UnicodeBlock is found for character return code/reason
* - if character is in UnicodeBlock.SPECIALS return code/reason
* <ul>
* <li>if decoded uri character is an iso control character return code/reason</li>
* <li>if no UnicodeBlock is found for character return code/reason</li>
* <li>if character is in UnicodeBlock.SPECIALS return code/reason</li>
* </ul>
*/
public class ValidUrlRule extends Rule
{
@ -65,7 +66,7 @@ public class ValidUrlRule extends Rule
/**
* Sets the reason for the response status code. Reasons will only reflect if the code value is greater or equal to 400.
*
* @param reason
* @param reason the reason
*/
public void setReason(String reason)
{

View File

@ -56,13 +56,10 @@ import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.xml.XmlConfiguration;
/**
* Runner
*
* <p>
* Combine jetty classes into a single executable jar and run webapps based on the args to it.
*
*/
public class Runner
{
@ -96,8 +93,6 @@ public class Runner
/**
* Classpath
*
*
*/
public class Classpath
{
@ -149,22 +144,15 @@ public class Runner
}
}
/**
*
*/
public Runner()
{
}
/**
* Generate helpful usage message and exit
*
* @param error
* @param error the error header
*/
public void usage(String error)
{
@ -204,8 +192,8 @@ public class Runner
/**
* Configure a jetty instance and deploy the webapps presented as args
*
* @param args
* @throws Exception
* @param args the command line arguments
* @throws Exception if unable to configure
*/
public void configure(String[] args) throws Exception
{
@ -494,10 +482,6 @@ public class Runner
}
/**
* @param handler
* @param handlers
*/
protected void prependHandler (Handler handler, HandlerCollection handlers)
{
if (handler == null || handlers == null)
@ -513,9 +497,6 @@ public class Runner
/**
* @throws Exception
*/
public void run() throws Exception
{
_server.start();
@ -546,9 +527,6 @@ public class Runner
/**
* @param args
*/
public static void main(String[] args)
{
Runner runner = new Runner();

View File

@ -36,7 +36,6 @@ import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
@ -52,7 +51,7 @@ import org.springframework.core.io.UrlResource;
* <p>
* The objects mapped by {@link XmlConfiguration#getIdMap()} are set as singletons before any configuration calls
* and if the spring configuration file contains a definition for the singleton id, the the singleton is updated
* with a call to {@link XmlBeanFactory#configureBean(Object, String)}.
* with a call to {@link DefaultListableBeanFactory#configureBean(Object, String)}.
* <p>
* The property map obtained via {@link XmlConfiguration#getProperties()} is set as a singleton called "properties"
* and values can be accessed by somewhat verbose

View File

@ -50,7 +50,7 @@ public class BaseBuilder
* the module to add
* @return true if module was added, false if module was not added
* (because that module already exists)
* @throws IOException
* @throws IOException if unable to add the module
*/
public boolean addModule(Module module) throws IOException;
}
@ -130,7 +130,7 @@ public class BaseBuilder
* Build out the Base directory (if needed)
*
* @return true if base directory was changed, false if left unchanged.
* @throws IOException
* @throws IOException if unable to build
*/
public boolean build() throws IOException
{

View File

@ -323,13 +323,12 @@ public class BaseHome
* <dt><code>lib/**&#47;*-dev.jar</code></dt>
* <dd>Relative pattern, recursive search <code>${jetty.home}</code> then <code>${jetty.base}</code> for files under <code>lib</code> ending in
* <code>-dev.jar</code></dd>
* </dl>
*
* <dt><code>etc/jetty.xml</code></dt>
* <dd>Relative pattern, no glob, search for <code>${jetty.home}/etc/jetty.xml</code> then <code>${jetty.base}/etc/jetty.xml</code></dd>
*
* <dt><code>glob:/opt/app/common/*-corp.jar</code></dt>
* <dd>PathMapper pattern, glob, search <code>/opt/app/common/</code> for <code>*-corp.jar</code></code></dd>
* <dd>PathMapper pattern, glob, search <code>/opt/app/common/</code> for <code>*-corp.jar</code></dd>
*
* </dl>
*
@ -414,6 +413,8 @@ public class BaseHome
/**
* Convenience method for <code>toShortForm(file.toPath())</code>
* @param path the path to shorten
* @return the short form of the path as a String
*/
public String toShortForm(final File path)
{

View File

@ -62,8 +62,8 @@ public class CommandLineBuilder
* Perform an optional quoting of the argument, being intelligent with spaces and quotes as needed. If a subString is set in quotes it won't the subString
* won't be escaped.
*
* @param arg
* @return
* @param arg the argument to quote
* @return the quoted and escaped argument
*/
public static String quote(String arg)
{
@ -126,7 +126,6 @@ public class CommandLineBuilder
/**
* Similar to {@link #addArg(String)} but concats both name + value with an "=" sign, quoting were needed, and excluding the "=" portion if the value is
* undefined or empty.
* <p>
*
* <pre>
* addEqualsArg("-Dname", "value") = "-Dname=value"

View File

@ -50,25 +50,16 @@ import org.eclipse.jetty.start.graph.Selection;
* This class is intended to be the main class listed in the MANIFEST.MF of the start.jar archive. It allows the Jetty Application server to be started with the
* command "java -jar start.jar".
* <p>
* Argument processing steps:
* <b>Argument processing steps:</b>
* <ol>
* <li>Directory Locations:
* <ul>
* <li>jetty.home=[directory] (the jetty.home location)</li>
* <li>jetty.base=[directory] (the jetty.base location)</li>
* </ul>
* </li>
* <li>Start Logging behavior:
* <ul>
* <li>--debug (debugging enabled)</li>
* <li>--start-log-file=logs/start.log (output start logs to logs/start.log location)</li>
* </ul>
* </li>
* <li>Directory Location: jetty.home=[directory] (the jetty.home location)</li>
* <li>Directory Location: jetty.base=[directory] (the jetty.base location)</li>
* <li>Start Logging behavior: --debug (debugging enabled)</li>
* <li>Start Logging behavior: --start-log-file=logs/start.log (output start logs to logs/start.log location)</li>
* <li>Module Resolution</li>
* <li>Properties Resolution</li>
* <li>Present Optional Informational Options</li>
* <li>Normal Startup</li>
* </li>
* </ol>
*/
public class Main
@ -264,6 +255,9 @@ public class Main
/**
* Convenience for <code>processCommandLine(cmdLine.toArray(new String[cmdLine.size()]))</code>
* @param cmdLine the command line
* @return the start args parsed from the command line
* @throws Exception if unable to process the command line
*/
public StartArgs processCommandLine(List<String> cmdLine) throws Exception
{
@ -471,6 +465,9 @@ public class Main
/**
* Stop a running jetty instance.
* @param host the host
* @param port the port
* @param key the key
*/
public void stop(String host, int port, String key)
{

View File

@ -129,6 +129,7 @@ public final class Props implements Iterable<Prop>
* If arg is not a property, ignore it.
* @param arg the argument to parse for a potential property
* @param source the source for this argument (to track origin of property from)
* @return true if the property was added, false if the property wasn't added
*/
public boolean addPossibleProperty(String arg, String source)
{

View File

@ -377,8 +377,8 @@ public class StartArgs
/**
* Expand any command line added <code>--lib</code> lib references.
*
* @param baseHome
* @throws IOException
* @param baseHome the base home in use
* @throws IOException if unable to expand the libraries
*/
public void expandLibs(BaseHome baseHome) throws IOException
{
@ -402,9 +402,9 @@ public class StartArgs
/**
* Build up the Classpath and XML file references based on enabled Module list.
*
* @param baseHome
* @param activeModules
* @throws IOException
* @param baseHome the base home in use
* @param activeModules the active (selected) modules
* @throws IOException if unable to expand the modules
*/
public void expandModules(BaseHome baseHome, List<Module> activeModules) throws IOException
{

View File

@ -20,12 +20,9 @@ package org.eclipse.jetty.start;
/**
* Utility class for parsing and comparing version strings. JDK 1.1 compatible.
*
*/
public class Version
{
int _version = 0;
int _revision = 0;
int _subrevision = 0;
@ -44,6 +41,7 @@ public class Version
/**
* Compares with other version. Does not take extension into account, as there is no reliable way to order them.
*
* @param other the other version to compare this to
* @return -1 if this is older version that other, 0 if its same version, 1 if it's newer version than other
*/
public int compare(Version other)
@ -81,6 +79,9 @@ public class Version
/**
* Check whether this verion is in range of versions specified
* @param low the low part of the range
* @param high the high part of the range
* @return true if this version is within the provided range
*/
public boolean isInRange(Version low, Version high)
{
@ -89,6 +90,7 @@ public class Version
/**
* parses version string in the form version[.revision[.subrevision[extension]]] into this instance.
* @param version_string the version string
*/
public void parse(String version_string)
{

View File

@ -37,7 +37,6 @@ import org.eclipse.jetty.start.UsageException;
/**
* Weighted List of ConfigSources.
* <p>
*/
public class ConfigSources implements Iterable<ConfigSource>
{

View File

@ -36,13 +36,13 @@ import org.eclipse.jetty.start.Utils;
* <p>
* Valid URI Formats:
* <dl>
* <dt><code>maven://&lt;groupId>/&lt;artifactId>/&lt;version></code></dt>
* <dt><code>maven://&lt;groupId&gt;/&lt;artifactId&gt;/&lt;version&gt;</code></dt>
* <dd>minimum requirement (type defaults to <code>jar</code>, with no
* classifier)</dd>
* <dt><code>maven://&lt;groupId>/&lt;artifactId>/&lt;version>/&lt;type></code></dt>
* <dt><code>maven://&lt;groupId&gt;/&lt;artifactId&gt;/&lt;version&gt;/&lt;type&gt;</code></dt>
* <dd>optional type requirement</dd>
* <dt>
* <code>maven://&lt;groupId>/&lt;artifactId>/&lt;version>/&lt;type>/&lt;classifier></code>
* <code>maven://&lt;groupId&gt;/&lt;artifactId&gt;/&lt;version&gt;/&lt;type&gt;/&lt;classifier&gt;</code>
* </dt>
* <dd>optional type and classifier requirement</dd>
* </dl>

View File

@ -39,6 +39,7 @@ import org.eclipse.jetty.start.Utils;
/**
* Basic Graph
* @param <T> the node type
*/
public abstract class Graph<T extends Node<T>> implements Iterable<T>
{
@ -264,6 +265,7 @@ public abstract class Graph<T extends Node<T>> implements Iterable<T>
/**
* Get the list of Selected nodes.
* @return the list of selected nodes
*/
public List<T> getSelected()
{
@ -358,6 +360,8 @@ public abstract class Graph<T extends Node<T>> implements Iterable<T>
* Resolve a node just in time.
* <p>
* Useful for nodes that are virtual/transient in nature (such as the jsp/jstl/alpn modules)
* @param name the name of the node to resolve
* @return the node
*/
public abstract T resolveNode(String name);

View File

@ -26,6 +26,7 @@ import java.util.Set;
/**
* Basic Graph Node
* @param <T> the node type
*/
public abstract class Node<T>
{

View File

@ -23,7 +23,6 @@ package org.eclipse.jetty.start.graph;
* <p>
* Each <code>Selection</code> can be used [0..n] times in the graph. The <code>Selection</code> must contain a unique
* 'criteria' description that how selection was determined.
* </p>
*/
public class Selection
{
@ -94,6 +93,7 @@ public class Selection
/**
* Get the criteria for this selection
* @return the criteria
*/
public String getCriteria()
{

View File

@ -48,7 +48,8 @@ public class ConfigurationAssert
* the StartArgs that has been processed via {@link Main#processCommandLine(String[])}
* @param filename
* the filename of the assertion values
* @throws IOException
* @throws FileNotFoundException if unable to find the configuration
* @throws IOException if unable to process the configuration
*/
public static void assertConfiguration(BaseHome baseHome, StartArgs args, String filename) throws FileNotFoundException, IOException
{

View File

@ -91,6 +91,7 @@ public class DistTest
/**
* Test for https://bugs.eclipse.org/452329
* @throws Exception on test failure
*/
@Test
public void testReAddServerModule() throws Exception
@ -120,6 +121,7 @@ public class DistTest
/**
* Test for https://bugs.eclipse.org/452329
* @throws Exception on test failure
*/
@Test
public void testReAddServerViaHttpModule() throws Exception
@ -149,6 +151,7 @@ public class DistTest
/**
* Test for https://bugs.eclipse.org/452329
* @throws Exception on test failure
*/
@Test
public void testReAddHttpThenDeployViaStartD() throws Exception

View File

@ -50,6 +50,7 @@ public class FSTest
/**
* Utility method used by other test cases
* @param expected the expected String paths to be converted (in place)
*/
public static void toOsSeparators(List<String> expected)
{

View File

@ -144,6 +144,7 @@ public class ModulesTest
* In other words. ${search-dir}/modules/*.mod should be the only
* valid references, but ${search-dir}/alt/foo/modules/*.mod should
* not be considered valid.
* @throws IOException on test failures
*/
@Test
public void testLoadShallowModulesOnly() throws IOException