Fixing javadoc

This commit is contained in:
Joakim Erdfelt 2016-03-07 10:24:57 -07:00
parent 13f267bf8a
commit da6be3ed7a
38 changed files with 139 additions and 359 deletions

View File

@ -19,21 +19,6 @@
package org.eclipse.jetty.gcloud.session;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.server.session.AbstractSessionDataStore;
import org.eclipse.jetty.server.session.SessionContext;
import org.eclipse.jetty.server.session.SessionData;
import org.eclipse.jetty.util.ClassLoadingObjectInputStream;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import com.google.gcloud.datastore.Blob;
import com.google.gcloud.datastore.Datastore;
import com.google.gcloud.datastore.DatastoreFactory;
@ -50,6 +35,21 @@ import com.google.gcloud.datastore.StructuredQuery.Projection;
import com.google.gcloud.datastore.StructuredQuery.ProjectionEntityQueryBuilder;
import com.google.gcloud.datastore.StructuredQuery.PropertyFilter;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.server.session.AbstractSessionDataStore;
import org.eclipse.jetty.server.session.SessionContext;
import org.eclipse.jetty.server.session.SessionData;
import org.eclipse.jetty.util.ClassLoadingObjectInputStream;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/**
* GCloudSessionDataStore
*
@ -182,7 +182,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)
@ -296,8 +296,9 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
* </ol>
*
*
* @param session
* @return
* @param id the id
* @param context the session context
* @return the key
*/
private Key makeKey (String id, SessionContext context)
{
@ -308,9 +309,9 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
/**
* Generate a gcloud datastore Entity from SessionData
* @param session
* @param key
* @return
* @param session the session data
* @param key the key
* @return the entity
* @throws Exception
*/
private Entity entityFromSession (SessionData session, Key key) throws Exception

View File

@ -18,11 +18,6 @@
package org.eclipse.jetty.gcloud.session;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
import javax.servlet.http.HttpServletRequest;
import org.eclipse.jetty.server.session.AbstractSessionStore;
import org.eclipse.jetty.server.session.MemorySessionStore;
import org.eclipse.jetty.server.session.SessionManager;
@ -49,9 +44,7 @@ public class GCloudSessionManager extends SessionManager
/*
*//**
/* *
* Session
*
* Representation of a session in local memory.
@ -75,7 +68,8 @@ public class GCloudSessionManager extends SessionManager
*//**
*/
/* *
* Called on entry to the session.
*
* @see org.eclipse.jetty.server.session.AbstractSession#access(long)
@ -122,7 +116,7 @@ public class GCloudSessionManager extends SessionManager
}
*//**
*//* *
* Exit from session
* @see org.eclipse.jetty.server.session.AbstractSession#complete()
*//*
@ -174,7 +168,7 @@ public class GCloudSessionManager extends SessionManager
}
}
*//** Test if the session is stale
*//* * Test if the session is stale
* @param atTime
* @return
*//*
@ -184,7 +178,7 @@ public class GCloudSessionManager extends SessionManager
}
*//**
*//* *
* Reload the session from the cluster. If the node that
* last managed the session from the cluster is ourself,
* then the session does not need refreshing.
@ -295,7 +289,7 @@ public class GCloudSessionManager extends SessionManager
/**
* Start the session manager.
*
* @see org.eclipse.jetty.server.session.AbstractSessionManager#doStart()
* @see org.eclipse.jetty.server.session.SessionManager#doStart()
*/
@Override
public void doStart() throws Exception
@ -308,7 +302,7 @@ public class GCloudSessionManager extends SessionManager
/**
* Stop the session manager.
*
* @see org.eclipse.jetty.server.session.AbstractSessionManager#doStop()
* @see org.eclipse.jetty.server.session.SessionManager#doStop()
*/
@Override
public void doStop() throws Exception

View File

@ -73,7 +73,7 @@ public interface HttpContent
* @param maxBuffer The maximum buffer to allocated for this request. For cached content, a larger buffer may have
* previously been allocated and returned by the {@link HttpContent#getDirectBuffer()} or {@link HttpContent#getIndirectBuffer()} calls.
* @return A {@link HttpContent}
* @throws IOException
* @throws IOException if unable to get content
*/
HttpContent getContent(String path,int maxBuffer) throws IOException;
}

View File

@ -177,9 +177,10 @@ public class HttpURI
}
/* ------------------------------------------------------------ */
/** Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
* @param method
* @param uri
/**
* Parse according to https://tools.ietf.org/html/rfc7230#section-5.3
* @param method the request method
* @param uri the request uri
*/
public void parseRequestTarget(String method,String uri)
{

View File

@ -62,8 +62,7 @@ public enum PathSpecGroup
MIDDLE_GLOB,
/**
* For path specs that have a hardcoded prefix and a trailing wildcard glob.
* <p>
*
*
* <pre>
* "/downloads/*" - servlet spec
* "/api/*" - servlet spec

View File

@ -82,7 +82,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#load(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.SessionDataStore#load(String)
*/
@Override
public SessionData load(String id) throws Exception
@ -120,7 +120,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#delete(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.SessionDataStore#delete(String)
*/
@Override
public boolean delete(String id) throws Exception
@ -131,7 +131,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)
@ -202,7 +202,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(org.eclipse.jetty.server.session.SessionKey, org.eclipse.jetty.server.session.SessionData, long)
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(String, SessionData, long)
*/
@Override
public void doStore(String id, SessionData data, long lastSaveTime) throws Exception

View File

@ -21,17 +21,9 @@ package org.eclipse.jetty.session.infinispan;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.session.AbstractSessionIdManager;
import org.eclipse.jetty.server.session.Session;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.server.session.SessionManager;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.infinispan.commons.api.BasicCache;
@ -270,7 +262,7 @@ public class InfinispanSessionIdManager extends AbstractSessionIdManager
}
/**
* @see org.eclipse.jetty.server.SessionIdManager#useId(java.lang.String)
* @see org.eclipse.jetty.server.SessionIdManager#useId(Session)
*/
@Override
public void useId(Session session)

View File

@ -51,7 +51,7 @@ public class InfinispanSessionManager extends SessionManager
/**
* Start the session manager.
*
* @see org.eclipse.jetty.server.session.AbstractSessionManager#doStart()
* @see org.eclipse.jetty.server.session.SessionManager#doStart()
*/
@Override
public void doStart() throws Exception
@ -69,7 +69,7 @@ public class InfinispanSessionManager extends SessionManager
/**
* Stop the session manager.
*
* @see org.eclipse.jetty.server.session.AbstractSessionManager#doStop()
* @see org.eclipse.jetty.server.session.SessionManager#doStop()
*/
@Override
public void doStop() throws Exception

View File

@ -40,15 +40,6 @@ public abstract class NoSqlSessionDataStore extends AbstractSessionDataStore
private Set<String> _dirtyAttributes = new HashSet<String>();
/**
* @param id
* @param cpath
* @param vhost
* @param created
* @param accessed
* @param lastAccessed
* @param maxInactiveMs
*/
public NoSqlSessionData(String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
{
super(id, cpath, vhost, created, accessed, lastAccessed, maxInactiveMs);

View File

@ -19,6 +19,12 @@
package org.eclipse.jetty.nosql.mongodb;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.mongodb.WriteConcern;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@ -36,13 +42,6 @@ import org.eclipse.jetty.util.ClassLoadingObjectInputStream;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.mongodb.WriteConcern;
import com.mongodb.WriteResult;
/**
* MongoSessionDataStore
*
@ -159,9 +158,6 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
}
/**
* @return
*/
public DBCollection getDBCollection ()
{
return _dbSessions;
@ -170,7 +166,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#load(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.SessionDataStore#load(String)
*/
@Override
public SessionData load(String id) throws Exception
@ -262,7 +258,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#delete(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.SessionDataStore#delete(String)
*/
@Override
public boolean delete(String id) throws Exception
@ -320,7 +316,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)
@ -384,7 +380,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(org.eclipse.jetty.server.session.SessionKey, org.eclipse.jetty.server.session.SessionData, long)
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(String, SessionData, long)
*/
@Override
public void doStore(String id, SessionData data, long lastSaveTime) throws Exception

View File

@ -18,21 +18,20 @@
package org.eclipse.jetty.nosql.mongodb;
import com.mongodb.DBCollection;
import com.mongodb.MongoException;
import java.net.UnknownHostException;
import org.eclipse.jetty.server.SessionIdManager;
import org.eclipse.jetty.server.session.AbstractSessionStore;
import org.eclipse.jetty.server.session.MemorySessionStore;
import org.eclipse.jetty.server.session.SessionDataStore;
import org.eclipse.jetty.server.session.SessionManager;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import com.mongodb.DBCollection;
import com.mongodb.MongoException;
/**
* MongoSessionManager
@ -116,9 +115,6 @@ public class MongoSessionManager extends SessionManager
}
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.session.AbstractSessionManager#setSessionIdManager(org.eclipse.jetty.server.SessionIdManager)
*/
@Override
public void setSessionIdManager(SessionIdManager metaManager)
{

View File

@ -222,6 +222,9 @@ public abstract class AbstractNCSARequestLog extends AbstractLifeCycle implement
}
/**
* @param request request object
* @param b StringBuilder to write to
* @throws IOException if unable to append extended log
* @deprecated override {@link #logExtended(StringBuilder, Request, Response)} instead
*/
@Deprecated

View File

@ -179,7 +179,7 @@ public interface PushBuilder
* Set the URI path to be used for the push. The path may start
* with "/" in which case it is treated as an absolute path,
* otherwise it is relative to the context path of the associated
* request. There is no path default and {@link #path(String)} must
* request. There is no path default and <code>path(String)</code> must
* be called before every call to {@link #push()}. If a query
* string is present in the argument {@code path}, its contents must
* be merged with the contents previously passed to {@link

View File

@ -2036,7 +2036,7 @@ public class Request implements HttpServletRequest
/* ------------------------------------------------------------ */
/**
* @return True if this is the first call of {@link #takeNewContext()} since the last
* @return True if this is the first call of <code>takeNewContext()</code> since the last
* {@link #setContext(org.eclipse.jetty.server.handler.ContextHandler.Context)} call.
*/
public boolean takeNewContext()

View File

@ -32,15 +32,9 @@ import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.server.session.SessionStore;
import org.eclipse.jetty.util.component.LifeCycle;
/* --------------------------------------------------------------------- */
/**
* Session Manager.
* The API required to manage sessions for a servlet context.
*
*/
/* ------------------------------------------------------------ */
/**
*/
public interface SessionManager extends LifeCycle
{
@ -313,7 +307,7 @@ public interface SessionManager extends LifeCycle
/**
* Get the session store for this manager
* @return
* @return the session store
*/
public SessionStore getSessionStore();

View File

@ -49,7 +49,7 @@ import org.eclipse.jetty.util.log.Logger;
/* ------------------------------------------------------------ */
/** Handler for Error pages
* An ErrorHandler is registered with {@link ContextHandler#setErrorHandler(ErrorHandler)} or
* {@link Server#setErrorHandler(ErrorHandler).
* {@link Server#setErrorHandler(ErrorHandler)}.
* It is called by the HttpResponse.sendError method to write a error page via {@link #handle(String, Request, HttpServletRequest, HttpServletResponse)}
* or via {@link #badMessageError(int, String, HttpFields)} for bad requests for which a dispatch cannot be done.
*

View File

@ -42,7 +42,7 @@ public abstract class AbstractSessionDataStore extends AbstractLifeCycle impleme
* @param id identity of session to store
* @param data info of the session
* @param lastSaveTime time of previous save or 0 if never saved
* @throws Exception
* @throws Exception if unable to store data
*/
public abstract void doStore(String id, SessionData data, long lastSaveTime) throws Exception;
@ -54,7 +54,6 @@ public abstract class AbstractSessionDataStore extends AbstractLifeCycle impleme
* @param candidates the ids of sessions the SessionStore thinks has expired
* @param scavengePeriodSec the period in sec of the scavenge cycle checks
* @return the reconciled set of session ids that this node should attempt to expire
* @throws Exception
*/
public abstract Set<String> doGetExpired (Set<String> candidates, int scavengePeriodSec);
@ -123,18 +122,12 @@ public abstract class AbstractSessionDataStore extends AbstractLifeCycle impleme
return new SessionData(id, _context.getCanonicalContextPath(), _context.getVhost(), created, accessed, lastAccessed, maxInactiveMs);
}
/**
* @throws IllegalStateException
*/
protected void checkStarted () throws IllegalStateException
{
if (isStarted())
throw new IllegalStateException("Already started");
}
@Override
protected void doStart() throws Exception
{
@ -144,28 +137,13 @@ public abstract class AbstractSessionDataStore extends AbstractLifeCycle impleme
super.doStart();
}
/**
* @return
*/
public int getGracePeriodSec()
{
return _gracePeriodSec;
}
/**
* @param sec
*/
public void setGracePeriodSec(int sec)
{
_gracePeriodSec = sec;
}
}

View File

@ -100,7 +100,7 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme
/* ------------------------------------------------------------ */
/**
* @param period inspector of sessions
* @param inspector inspector of sessions
*/
public void setSessionInspector (PeriodicSessionInspector inspector)
{
@ -219,7 +219,7 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme
/* ------------------------------------------------------------ */
/**
* @param seedTerm
* @param seedTerm the seed for RNG
* @return a new unique session id
*/
public String newSessionId(long seedTerm)
@ -399,9 +399,6 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme
}
/* ------------------------------------------------------------ */
/**
* @param id
*/
public void invalidateAll (String id)
{
//take the id out of the list of known sessionids for this node

View File

@ -21,15 +21,15 @@ package org.eclipse.jetty.server.session;
/**
* AbstractInspector
*
*
*/
public abstract class AbstractSessionInspector implements SessionInspector
{
/**
* <0 means never inspect
* 0 means always inspect
* >0 means inspect at that interval
* <ul>
* <li>&lt;0 means never inspect</li>
* <li>0 means always inspect</li>
* <li>&gt;0 means inspect at that interval</li>
* </ul>
*/
protected int _timeoutSec = -1;

View File

@ -21,7 +21,6 @@ package org.eclipse.jetty.server.session;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Stream;
@ -56,7 +55,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* Create a new Session object from session data
* @param data
* @param data the session data
* @return a new Session object
*/
public abstract Session newSession (SessionData data);
@ -84,9 +83,9 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* Replace the mapping from id to oldValue with newValue
* @param id
* @param oldValue
* @param newValue
* @param id the id
* @param oldValue the old value
* @param newValue the new value
* @return true if replacement was done
*/
public abstract boolean doReplace (String id, Session oldValue, Session newValue);
@ -95,7 +94,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* Check to see if the session exists in the store
* @param id
* @param id the id
* @return true if the Session object exists in the session store
*/
public abstract boolean doExists (String id);
@ -104,7 +103,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* Remove the session with this identity from the store
* @param id
* @param id the id
* @return true if removed false otherwise
*/
public abstract Session doDelete (String id);
@ -113,14 +112,12 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* PlaceHolder
*
*
*/
protected class PlaceHolderSession extends Session
{
/**
* @param data
* @param data the session data
*/
public PlaceHolderSession(SessionData data)
{
@ -139,7 +136,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* @param manager
* @param manager the SessionManager
*/
public void setSessionManager (SessionManager manager)
{
@ -216,7 +213,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
}
/**
* @param sessionDataStore
* @param sessionDataStore the session datastore
*/
public void setSessionDataStore(SessionDataStore sessionDataStore)
{
@ -402,7 +399,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* Load the info for the session from the session data store
*
* @param id
* @param id the id
* @return a Session object filled with data or null if the session doesn't exist
* @throws Exception
*/
@ -555,7 +552,7 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
/**
* @see org.eclipse.jetty.server.session.SessionStore#checkExpiry(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionStore#checkExpiration(Set)
*/
@Override
public Set<String> checkExpiration(Set<String> candidates)
@ -695,23 +692,16 @@ public abstract class AbstractSessionStore extends AbstractLifeCycle implements
}
/**
* @param passivateOnComplete
*/
public void setPassivateOnComplete (boolean passivateOnComplete)
{
_passivateOnComplete = passivateOnComplete;
}
/**
* @return
*/
public boolean isPassivateOnComplete ()
{
return _passivateOnComplete;
}
/**
* @see org.eclipse.jetty.server.session.SessionStore#newSession(javax.servlet.http.HttpServletRequest, java.lang.String, long, long)

View File

@ -116,7 +116,7 @@ public class CachingSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)

View File

@ -42,8 +42,8 @@ public class ExpiryInspector extends AbstractSessionInspector
/**
* @param sessionStore
* @param idManager
* @param sessionStore the session store
* @param idManager the session id manager
*/
public ExpiryInspector (AbstractSessionStore sessionStore, SessionIdManager idManager)
{
@ -52,7 +52,7 @@ public class ExpiryInspector extends AbstractSessionInspector
}
/**
* @see org.eclipse.jetty.server.session.SessionInspector#inspect(org.eclipse.jetty.server.session.SessionStore, org.eclipse.jetty.server.session.Session)
* @see org.eclipse.jetty.server.session.SessionInspector#inspect(Session)
*/
@Override
public void inspect(Session s)

View File

@ -111,7 +111,7 @@ public class FileSessionDataStore extends AbstractSessionDataStore
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)
@ -258,7 +258,7 @@ public class FileSessionDataStore extends AbstractSessionDataStore
/**
* @param id identity of session
* @return
* @return the filename of the session data store
*/
private String getFileName (String id)
{
@ -268,7 +268,7 @@ public class FileSessionDataStore extends AbstractSessionDataStore
/**
* @param is inputstream containing session data
* @return
* @return the session data
* @throws Exception
*/
private SessionData load (InputStream is)

View File

@ -54,7 +54,7 @@ public class FileSessionManager extends SessionManager
/**
* Get the SessionDataStore to configure it
* @return
* @return the session datastore
*/
public FileSessionDataStore getSessionDataStore()
{

View File

@ -32,7 +32,7 @@ import org.eclipse.jetty.util.ConcurrentHashSet;
public class HashSessionIdManager extends AbstractSessionIdManager
{
/**
* @param server
* @param server the server
*/
public HashSessionIdManager(Server server)
{

View File

@ -39,7 +39,7 @@ public class IdleInspector extends AbstractSessionInspector
protected AbstractSessionStore _sessionStore;
/**
* @param sessionStore
* @param sessionStore the session store
*/
public IdleInspector (AbstractSessionStore sessionStore)
{

View File

@ -518,10 +518,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
/**
* Set up the tables in the database
* @throws SQLException
*/
/**
* @throws SQLException
* @throws SQLException if unable to prepare tables
*/
public void prepareTables()
throws SQLException
@ -782,7 +779,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
/**
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(java.lang.String, org.eclipse.jetty.server.session.SessionData, boolean)
* @see org.eclipse.jetty.server.session.AbstractSessionDataStore#doStore(String, SessionData, long)
*/
@Override
public void doStore(String id, SessionData data, long lastSaveTime) throws Exception
@ -887,7 +884,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int scavengeIntervalSec)
@ -999,45 +996,29 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
}
/**
* @param dbAdaptor
*/
public void setDatabaseAdaptor (DatabaseAdaptor dbAdaptor)
{
checkStarted();
_dbAdaptor = dbAdaptor;
}
/**
* @param schema
*/
public void setSessionTableSchema (SessionTableSchema schema)
{
checkStarted();
_sessionTableSchema = schema;
}
/**
* @param attempts
*/
public void setLoadAttempts (int attempts)
{
checkStarted();
_attempts = attempts;
}
/**
* @return
*/
public int getLoadAttempts ()
{
return _attempts;
}
/**
* @param id
* @return
*/
public boolean loadAttemptsExhausted (String id)
{
AtomicInteger i = _unloadables.get(id);
@ -1046,9 +1027,6 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
return (i.get() >= _attempts);
}
/**
* @param delete
*/
public void setDeleteUnloadableSessions (boolean delete)
{
checkStarted();
@ -1064,9 +1042,6 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
}
/**
* @param id
*/
protected void incLoadAttempt (String id)
{
AtomicInteger i = new AtomicInteger(0);
@ -1079,7 +1054,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
/**
* @param id
* @param id the id
* @return number of attempts to load the given id
*/
public int getLoadAttempts (String id)
@ -1107,9 +1082,6 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore
}
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#isPassivating()
*/

View File

@ -55,7 +55,7 @@ public class JDBCSessionManager extends SessionManager
/**
* Get the db adaptor to configure jdbc settings
* @return
* @return the database adaptor
*/
public DatabaseAdaptor getDatabaseAdaptor()
{
@ -64,7 +64,7 @@ public class JDBCSessionManager extends SessionManager
/**
* Get the SessionDataStore to configure it
* @return
* @return the session data store
*/
public JDBCSessionDataStore getSessionDataStore ()
{

View File

@ -69,7 +69,7 @@ public class NullSessionDataStore extends AbstractSessionDataStore
/**
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(java.util.Set)
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set, int)
*/
@Override
public Set<String> doGetExpired(Set<String> candidates, int expiryTimeoutSec)

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.server.session;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.server.SessionIdManager;
@ -77,7 +76,7 @@ public class PeriodicSessionInspector extends AbstractLifeCycle
/**
* SessionIdManager associated with this scavenger
* @param sessionIdManager
* @param sessionIdManager the session id manager
*/
public void setSessionIdManager (SessionIdManager sessionIdManager)
{
@ -137,7 +136,7 @@ public class PeriodicSessionInspector extends AbstractLifeCycle
/**
* Set the period between scavenge cycles
* @param sec
* @param sec the interval (in seconds)
*/
public void setIntervalSec (long sec)
{
@ -176,7 +175,7 @@ public class PeriodicSessionInspector extends AbstractLifeCycle
/**
* Get the period between inspection cycles.
*
* @return
* @return the interval (in seconds)
*/
public long getIntervalSec ()
{

View File

@ -90,8 +90,8 @@ public class Session implements SessionManager.SessionIf
/**
* Create a new session
*
* @param request
* @param data
* @param request the request the session should be based on
* @param data the session data
*/
public Session (HttpServletRequest request, SessionData data)
{
@ -104,7 +104,7 @@ public class Session implements SessionManager.SessionIf
/**
* Re-create an existing session
* @param data
* @param data the session data
*/
public Session (SessionData data)
{
@ -116,7 +116,7 @@ public class Session implements SessionManager.SessionIf
* Should call this method with a lock held if you want to
* make decision on what to do with the session
*
* @return
* @return the number of active requests for this session
*/
public long getRequests()
{
@ -206,18 +206,12 @@ public class Session implements SessionManager.SessionIf
/* ------------------------------------------------------------ */
/**
* @param nodename
*/
public void setLastNode (String nodename)
{
_sessionData.setLastNode(nodename);
}
/* ------------------------------------------------------------ */
/**
* @return
*/
public String getLastNode ()
{
return _sessionData.getLastNode();
@ -479,9 +473,6 @@ public class Session implements SessionManager.SessionIf
/* ------------------------------------------------------------- */
/**
* @throws IllegalStateException
*/
protected void checkLocked ()
throws IllegalStateException
{
@ -640,9 +631,6 @@ public class Session implements SessionManager.SessionIf
}
/* ------------------------------------------------------------ */
/**
* @param request
*/
public void renewId(HttpServletRequest request)
{
if (_manager == null)
@ -663,7 +651,7 @@ public class Session implements SessionManager.SessionIf
/* ------------------------------------------------------------- */
/** Swap the id on a session from old to new, keeping the object
/* * Swap the id on a session from old to new, keeping the object
* the same.
*
* @param oldId
@ -739,22 +727,16 @@ public class Session implements SessionManager.SessionIf
LOG.warn(e);
}
}
/* ------------------------------------------------------------- */
/** Grab the lock on the session
* @return
* @return the lock
*/
public Lock lock ()
{
return _lock.lock();
}
/* ------------------------------------------------------------- */
protected void doInvalidate() throws IllegalStateException
{
@ -863,21 +845,12 @@ public class Session implements SessionManager.SessionIf
_passivationState = PassivationState.ACTIVE;
}
/**
* @return
*/
public boolean isActive ()
{
checkLocked();
return _passivationState == PassivationState.ACTIVE;
}
/**
* @return
*/
public boolean isPassivated ()
{
checkLocked();

View File

@ -78,7 +78,7 @@ public class SessionContext
/**
* Run a runnable in the context (with context classloader set) if
* there is one, otherwise just run it.
* @param r
* @param r the runnable
*/
public void run (Runnable r)
{
@ -120,8 +120,8 @@ public class SessionContext
/**
* Make an acceptable name from a context path.
*
* @param path
* @return
* @param path the path to normalize/fix
* @return the clean/acceptable form of the path
*/
private String canonicalize (String path)
{

View File

@ -62,16 +62,6 @@ public class SessionData implements Serializable
protected boolean _dirty;
protected long _lastSaved; //time in msec since last save
/**
* @param id
* @param cpath
* @param vhost
* @param created
* @param accessed
* @param lastAccessed
* @param maxInactiveMs
*/
public SessionData (String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
{
_id = id;
@ -123,10 +113,6 @@ public class SessionData implements Serializable
}
/**
* @param lastSaved
*/
public void setLastSaved(long lastSaved)
{
_lastSaved = lastSaved;
@ -141,16 +127,13 @@ public class SessionData implements Serializable
return _dirty;
}
/**
* @param dirty
*/
public void setDirty(boolean dirty)
{
_dirty = dirty;
}
/**
* @param name
* @param name the name of the attribute
* @return the value of the attribute named
*/
public Object getAttribute (String name)
@ -166,11 +149,6 @@ public class SessionData implements Serializable
return _attributes.keySet();
}
/**
* @param name
* @param value
* @return
*/
public Object setAttribute (String name, Object value)
{
Object old = (value==null?_attributes.remove(name):_attributes.put(name,value));
@ -181,20 +159,11 @@ public class SessionData implements Serializable
return old;
}
/**
* @param name
*/
public void setDirty (String name)
{
setDirty (true);
}
/**
* @param attributes
*/
public void putAllAttributes (Map<String,Object> attributes)
{
_attributes.putAll(attributes);
@ -224,9 +193,6 @@ public class SessionData implements Serializable
return _id;
}
/**
* @param id
*/
public void setId(String id)
{
_id = id;
@ -240,9 +206,6 @@ public class SessionData implements Serializable
return _contextPath;
}
/**
* @param contextPath
*/
public void setContextPath(String contextPath)
{
_contextPath = contextPath;
@ -256,9 +219,6 @@ public class SessionData implements Serializable
return _vhost;
}
/**
* @param vhost
*/
public void setVhost(String vhost)
{
_vhost = vhost;
@ -272,9 +232,6 @@ public class SessionData implements Serializable
return _lastNode;
}
/**
* @param lastNode
*/
public void setLastNode(String lastNode)
{
_lastNode = lastNode;
@ -288,25 +245,16 @@ public class SessionData implements Serializable
return _expiry;
}
/**
* @param expiry
*/
public void setExpiry(long expiry)
{
_expiry = expiry;
}
/**
* @return
*/
public long getCreated()
{
return _created;
}
/**
* @param created
*/
public void setCreated(long created)
{
_created = created;
@ -320,9 +268,6 @@ public class SessionData implements Serializable
return _cookieSet;
}
/**
* @param cookieSet
*/
public void setCookieSet(long cookieSet)
{
_cookieSet = cookieSet;
@ -336,9 +281,6 @@ public class SessionData implements Serializable
return _accessed;
}
/**
* @param accessed
*/
public void setAccessed(long accessed)
{
_accessed = accessed;
@ -352,35 +294,21 @@ public class SessionData implements Serializable
return _lastAccessed;
}
/**
* @param lastAccessed
*/
public void setLastAccessed(long lastAccessed)
{
_lastAccessed = lastAccessed;
}
/**
* @return
*/
public long getMaxInactiveMs()
{
return _maxInactiveMs;
}
/**
* @param maxInactive
*/
public void setMaxInactiveMs(long maxInactive)
{
_maxInactiveMs = maxInactive;
}
/**
* @param out
* @throws IOException
*/
private void writeObject(java.io.ObjectOutputStream out) throws IOException
{
out.writeUTF(_id); //session id
@ -398,11 +326,6 @@ public class SessionData implements Serializable
out.writeObject(_attributes);
}
/**
* @param in
* @throws IOException
* @throws ClassNotFoundException
*/
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
{
_id = in.readUTF();
@ -419,11 +342,6 @@ public class SessionData implements Serializable
_attributes = (ConcurrentHashMap<String,Object>)in.readObject();
}
/**
* @param time
* @return
*/
public boolean isExpiredAt (long time)
{
if (LOG.isDebugEnabled())

View File

@ -46,18 +46,18 @@ public interface SessionDataStore extends LifeCycle
* Read in session data from storage
* @param id identity of session to load
* @return the SessionData matching the id
* @throws Exception
* @throws Exception if unable to load session data
*/
public SessionData load (String id) throws Exception;
/**
* Create a new SessionData
* @param id
* @param created
* @param accessed
* @param lastAccessed
* @param maxInactiveMs
* @param id the id
* @param created the timestamp when created
* @param accessed the timestamp when accessed
* @param lastAccessed the timestamp when last accessed
* @param maxInactiveMs the max inactive time in milliseconds
* @return a new SessionData object
*/
public SessionData newSessionData (String id, long created, long accessed, long lastAccessed, long maxInactiveMs);
@ -69,7 +69,7 @@ public interface SessionDataStore extends LifeCycle
* Write out session data to storage
* @param id identity of session to store
* @param data info of session to store
* @throws Exception
* @throws Exception if unable to write session data
*/
public void store (String id, SessionData data) throws Exception;
@ -79,7 +79,7 @@ public interface SessionDataStore extends LifeCycle
* Delete session data from storage
* @param id identity of session to delete
* @return true if the session was deleted from the permanent store
* @throws Exception
* @throws Exception if unable to delete session data
*/
public boolean delete (String id) throws Exception;
@ -93,6 +93,7 @@ public interface SessionDataStore extends LifeCycle
* @param candidates if provided, these are keys of sessions that
* the SessionStore thinks has expired and should be verified by the
* SessionDataStore
* @param scavengePeriodSec the time to attempt scavenge (in seconds)
* @return set of session ids
*/
public Set<String> getExpired (Set<String> candidates, int scavengePeriodSec);

View File

@ -19,8 +19,6 @@
package org.eclipse.jetty.server.session;
import static java.lang.Math.round;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
@ -53,7 +51,8 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.statistic.CounterStatistic;
import org.eclipse.jetty.util.statistic.SampleStatistic;
import org.eclipse.jetty.util.thread.Locker.Lock;
import static java.lang.Math.round;
@ -766,7 +765,7 @@ public class SessionManager extends ContainerLifeCycle implements org.eclipse.je
/* ------------------------------------------------------------ */
/**
* @return
* @return the session store
*/
public SessionStore getSessionStore ()
{
@ -1006,7 +1005,7 @@ public class SessionManager extends ContainerLifeCycle implements org.eclipse.je
* Called either when a session has expired, or the app has
* invalidated it.
*
* @param id
* @param id the id to invalidate
*/
public void invalidate (String id)
{
@ -1032,9 +1031,6 @@ public class SessionManager extends ContainerLifeCycle implements org.eclipse.je
/* ------------------------------------------------------------ */
/**
* @return
*/
public void inspect ()
{
//don't attempt to scavenge if we are shutting down

View File

@ -55,10 +55,6 @@ public class StalePeriodStrategy implements StalenessStrategy
}
/**
* @return
*/
public long getStaleSec ()
{
return (_staleMs<=0?0L:_staleMs/1000L);
@ -67,7 +63,7 @@ public class StalePeriodStrategy implements StalenessStrategy
/**
* The amount of time in seconds that a session can be held
* in memory without being refreshed from the cluster.
* @param sec
* @param sec the time in seconds
*/
public void setStaleSec (long sec)
{

View File

@ -18,22 +18,18 @@
package org.eclipse.jetty.server.session;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.Enumeration;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import javax.servlet.SessionCookieConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.eclipse.jetty.http.HttpCookie;
import org.eclipse.jetty.server.Server;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* SessionCookieTest
*/
@ -46,7 +42,7 @@ public class SessionCookieTest
{
/**
* @see org.eclipse.jetty.server.session.SessionStore#newSession(org.eclipse.jetty.server.session.SessionKey, long, long, long, long)
* @see org.eclipse.jetty.server.session.SessionStore#newSession(HttpServletRequest, String, long, long)
*/
@Override
public Session newSession(HttpServletRequest request, String key, long time, long maxInactiveMs)
@ -76,7 +72,7 @@ public class SessionCookieTest
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doGet(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doGet(String)
*/
@Override
public Session doGet(String key)
@ -86,7 +82,7 @@ public class SessionCookieTest
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doPutIfAbsent(org.eclipse.jetty.server.session.SessionKey, org.eclipse.jetty.server.session.Session)
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doPutIfAbsent(String, Session)
*/
@Override
public Session doPutIfAbsent(String key, Session session)
@ -95,7 +91,7 @@ public class SessionCookieTest
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doExists(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doExists(String)
*/
@Override
public boolean doExists(String key)
@ -105,7 +101,7 @@ public class SessionCookieTest
}
/**
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doDelete(org.eclipse.jetty.server.session.SessionKey)
* @see org.eclipse.jetty.server.session.AbstractSessionStore#doDelete(String)
*/
@Override
public Session doDelete(String key)
@ -140,10 +136,6 @@ public class SessionCookieTest
public class MockSessionIdManager extends AbstractSessionIdManager
{
/**
* @param server
*/
public MockSessionIdManager(Server server)
{
super(server);
@ -175,7 +167,7 @@ public class SessionCookieTest
}
/**
* @see org.eclipse.jetty.server.SessionIdManager#useId(java.lang.String)
* @see org.eclipse.jetty.server.SessionIdManager#useId(Session)
*/
@Override
public void useId(Session session)

View File

@ -368,15 +368,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<detectLinks>false</detectLinks>
<detectLinks>true</detectLinks>
<detectJavaApiLink>true</detectJavaApiLink>
<show>protected</show>
<excludePackageNames>com.acme.*;org.slf4j.*;org.mortbay.*</excludePackageNames>
<links>
<link>http://docs.oracle.com/javase/8/docs/api/</link>
<link>http://docs.oracle.com/javaee/7/api/</link>
<link>http://junit.org/javadoc/latest/</link>
<link>http://download.eclipse.org/jetty/stable-9/apidocs/</link>
</links>
<tags>