464727 - Update Javadoc for Java 8 DocLint

This commit is contained in:
Joakim Erdfelt 2015-04-22 16:10:54 -07:00
parent 6ec2a50cae
commit ed22d7e0de
131 changed files with 441 additions and 176 deletions

View File

@ -36,10 +36,9 @@ import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.proxy.AsyncProxyServlet;
import org.eclipse.jetty.proxy.ProxyServlet;
/**
* Specific implementation of {@link ProxyServlet.Transparent} for FastCGI.
* Specific implementation of {@link org.eclipse.jetty.proxy.AsyncProxyServlet.Transparent} for FastCGI.
* <p>
* This servlet accepts a HTTP request and transforms it into a FastCGI request
* that is sent to the FastCGI server specified in the <code>proxyTo</code>

View File

@ -185,6 +185,7 @@ public abstract class AbstractProxyServlet extends HttpServlet
* <p>
* The init parameters used to configure the {@link HttpClient} instance are:
* <table>
* <caption>Init Parameters</caption>
* <thead>
* <tr>
* <th>init-param</th>

View File

@ -197,8 +197,6 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
/**
* <p>Convenience extension of {@link AsyncMiddleManServlet} that offers transparent proxy functionalities.</p>
*
* @see TransparentDelegate
*/
public static class Transparent extends ProxyServlet
{
@ -672,19 +670,19 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
* <p>Typical implementations:</p>
* <pre>
* // Identity transformation (no transformation, the input is copied to the output)
* public void transform(ByteBuffer input, boolean finished, List<ByteBuffer> output)
* public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
* {
* output.add(input);
* }
*
* // Discard transformation (all input is discarded)
* public void transform(ByteBuffer input, boolean finished, List<ByteBuffer> output)
* public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
* {
* // Empty
* }
*
* // Buffering identity transformation (all input is buffered aside until it is finished)
* public void transform(ByteBuffer input, boolean finished, List<ByteBuffer> output)
* public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
* {
* ByteBuffer copy = ByteBuffer.allocate(input.remaining());
* copy.put(input).flip();

View File

@ -101,8 +101,6 @@ public class AsyncProxyServlet extends ProxyServlet
/**
* <p>Convenience extension of {@link AsyncProxyServlet} that offers transparent proxy functionalities.</p>
*
* @see TransparentDelegate
*/
public static class Transparent extends AsyncProxyServlet
{

View File

@ -127,8 +127,6 @@ public class ProxyServlet extends AbstractProxyServlet
/**
* <p>Convenience extension of {@link ProxyServlet} that offers transparent proxy functionalities.</p>
*
* @see TransparentDelegate
*/
public static class Transparent extends ProxyServlet
{

View File

@ -21,9 +21,6 @@ package org.eclipse.jetty.security;
import java.util.List;
import java.util.Set;
/**
* @version $Rev: 4466 $ $Date: 2009-02-10 23:42:54 +0100 (Tue, 10 Feb 2009) $
*/
public interface ConstraintAware
{
List<ConstraintMapping> getConstraintMappings();
@ -65,6 +62,7 @@ public interface ConstraintAware
/**
* See Servlet Spec 31, sec 13.8.4, pg 145
* Container must check if there are urls with uncovered http methods
* @return true if urls with uncovered http methods
*/
boolean checkPathsWithUncoveredHttpMethods();
}

View File

@ -50,14 +50,12 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.security.Constraint;
/* ------------------------------------------------------------ */
/**
* ConstraintSecurityHandler
*
* <p>
* Handler to enforce SecurityConstraints. This implementation is servlet spec
* 3.1 compliant and pre-computes the constraint combinations for runtime
* efficiency.
*
*/
public class ConstraintSecurityHandler extends SecurityHandler implements ConstraintAware
{
@ -78,9 +76,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
}
/* ------------------------------------------------------------ */
/**
* @param constraint
*/
public static Constraint createConstraint(Constraint constraint)
{
try
@ -97,10 +92,11 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/**
* Create a security constraint
*
* @param name
* @param authenticate
* @param roles
* @param dataConstraint
* @param name the name of the constraint
* @param authenticate true to authenticate
* @param roles list of roles
* @param dataConstraint the data constraint
* @return the constraint
*/
public static Constraint createConstraint (String name, boolean authenticate, String[] roles, int dataConstraint)
{
@ -116,8 +112,11 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/**
* @param name
* @param element
* Create a Constraint
*
* @param name the name
* @param element the http constraint element
* @return the created constraint
*/
public static Constraint createConstraint (String name, HttpConstraintElement element)
{
@ -127,10 +126,13 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/**
* @param name
* @param rolesAllowed
* @param permitOrDeny
* @param transport
* Create Constraint
*
* @param name the name
* @param rolesAllowed the list of allowed roles
* @param permitOrDeny the permission semantic
* @param transport the transport guarantee
* @return the created constraint
*/
public static Constraint createConstraint (String name, String[] rolesAllowed, EmptyRoleSemantic permitOrDeny, TransportGuarantee transport)
{
@ -167,10 +169,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/**
* @param pathSpec
* @param constraintMappings
*/
public static List<ConstraintMapping> getConstraintMappingsForPath(String pathSpec, List<ConstraintMapping> constraintMappings)
{
if (pathSpec == null || "".equals(pathSpec.trim()) || constraintMappings == null || constraintMappings.size() == 0)
@ -192,8 +190,9 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/** Take out of the constraint mappings those that match the
* given path.
*
* @param pathSpec
* @param pathSpec the path spec
* @param constraintMappings a new list minus the matching constraints
* @return the list of constraint mappings
*/
public static List<ConstraintMapping> removeConstraintMappingsForPath(String pathSpec, List<ConstraintMapping> constraintMappings)
{
@ -215,12 +214,13 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/** Generate Constraints and ContraintMappings for the given url pattern and ServletSecurityElement
/**
* Generate Constraints and ContraintMappings for the given url pattern and ServletSecurityElement
*
* @param name
* @param pathSpec
* @param securityElement
* @return
* @param name the name
* @param pathSpec the path spec
* @param securityElement the servlet security element
* @return the list of constraint mappings
*/
public static List<ConstraintMapping> createConstraintsWithMappingsForPath (String name, String pathSpec, ServletSecurityElement securityElement)
{
@ -463,7 +463,7 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
* Create and combine the constraint with the existing processed
* constraints.
*
* @param mapping
* @param mapping the constraint mapping
*/
protected void processConstraintMapping(ConstraintMapping mapping)
{
@ -521,8 +521,8 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
* the mappings: an entry that names the method of the Request specifically, an
* entry that names constraints that apply to all methods, entries of the form
* &lt;method&gt;.omission, where the method of the Request is not named in the omission.
* @param mapping
* @param mappings
* @param mapping the constraint mapping
* @param mappings the mappings of roles
*/
protected void processConstraintMappingWithMethodOmissions (ConstraintMapping mapping, Map<String, RoleInfo> mappings)
{
@ -544,8 +544,8 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/**
* Initialize or update the RoleInfo from the constraint
* @param ri
* @param mapping
* @param ri the role info
* @param mapping the constraint mapping
*/
protected void configureRoleInfo (RoleInfo ri, ConstraintMapping mapping)
{
@ -870,9 +870,9 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
* Check if any http method omissions exist in the list of method
* to auth info mappings.
*
* @param path
* @param methodMappings
* @return
* @param path the path
* @param methodMappings the method mappings
* @return true if ommision exist
*/
protected boolean omissionsExist (String path, Map<String, RoleInfo> methodMappings)
{
@ -890,11 +890,11 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
/* ------------------------------------------------------------ */
/**
* Given a string of the form &lt;method&gt;.&lt;method&gt;.omission
* Given a string of the form <code>&lt;method&gt;.&lt;method&gt;.omission</code>
* split out the individual method names.
*
* @param omission
* @return
* @param omission the method
* @return the list of strings
*/
protected Set<String> getOmittedMethods (String omission)
{

View File

@ -24,10 +24,8 @@ import javax.security.auth.Subject;
import org.eclipse.jetty.server.UserIdentity;
/* ------------------------------------------------------------ */
/**
* Associates UserIdentities from with threads and UserIdentity.Contexts.
*
*/
public interface IdentityService
{
@ -37,7 +35,7 @@ public interface IdentityService
/**
* Associate a user identity with the current thread.
* This is called with as a thread enters the
* {@link SecurityHandler#handle(String, Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
* {@link SecurityHandler#handle(String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
* method and then again with a null argument as that call exits.
* @param user The current user or null for no user to associated.
* @return an object representing the previous associated state

View File

@ -46,12 +46,12 @@ import org.eclipse.jetty.util.security.Credential;
/**
* PropertyUserStore
*
* <p>
* This class monitors a property file of the format mentioned below and notifies registered listeners of the changes to the the given file.
*
* <PRE>
* <pre>
* username: password [,rolename ...]
* </PRE>
* </pre>
*
* Passwords may be clear text, obfuscated or checksummed. The class com.eclipse.Util.Password should be used to generate obfuscated passwords or password
* checksums.
@ -93,7 +93,8 @@ public class PropertyUserStore extends AbstractLifeCycle
/* ------------------------------------------------------------ */
/**
* returns the resource associated with the configured properties file, creating it if necessary
* @return the resource associated with the configured properties file, creating it if necessary
* @throws IOException if unable to get the resource
*/
public Resource getConfigResource() throws IOException
{
@ -108,15 +109,16 @@ public class PropertyUserStore extends AbstractLifeCycle
/* ------------------------------------------------------------ */
/**
* sets the refresh interval (in seconds)
* @param sec the refresh interval
*/
public void setRefreshInterval(int msec)
public void setRefreshInterval(int sec)
{
_refreshInterval = msec;
_refreshInterval = sec;
}
/* ------------------------------------------------------------ */
/**
* refresh interval in seconds for how often the properties file should be checked for changes
* @return refresh interval in seconds for how often the properties file should be checked for changes
*/
public int getRefreshInterval()
{
@ -334,6 +336,7 @@ public class PropertyUserStore extends AbstractLifeCycle
/**
* registers a listener to be notified of the contents of the property file
* @param listener the user listener
*/
public void registerUserListener(UserListener listener)
{

View File

@ -44,6 +44,7 @@ import org.eclipse.jetty.util.log.Logger;
/**
* Abstract SecurityHandler.
* <p>
* Select and apply an {@link Authenticator} to a request.
* <p>
* The Authenticator may either be directly set on the handler
@ -54,7 +55,6 @@ import org.eclipse.jetty.util.log.Logger;
* Authentication.Configuration. At startup, any context init parameters
* that start with "org.eclipse.jetty.security." that do not have
* values in the SecurityHandler init parameters, are copied.
*
*/
public abstract class SecurityHandler extends HandlerWrapper implements Authenticator.AuthConfiguration
{
@ -129,8 +129,9 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
}
/* ------------------------------------------------------------ */
/** Set the authenticator.
* @param authenticator
/**
* Set the authenticator.
* @param authenticator the authenticator
* @throws IllegalStateException if the SecurityHandler is running
*/
public void setAuthenticator(Authenticator authenticator)
@ -247,8 +248,8 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
/* ------------------------------------------------------------ */
/** Set an initialization parameter.
* @param key
* @param value
* @param key the init key
* @param value the init value
* @return previous value
* @throws IllegalStateException if the SecurityHandler is running
*/
@ -414,6 +415,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
/** Set renew the session on Authentication.
* <p>
* If set to true, then on authentication, the session associated with a reqeuest is invalidated and replaced with a new session.
* @param renew true to renew the authentication on session
* @see org.eclipse.jetty.security.Authenticator.AuthConfiguration#isSessionRenewedOnAuthentication()
*/
public void setSessionRenewedOnAuthentication(boolean renew)

View File

@ -42,9 +42,6 @@ import org.eclipse.jetty.util.security.CertificateValidator;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
/**
* @version $Rev: 4793 $ $Date: 2009-03-19 00:00:01 +0100 (Thu, 19 Mar 2009) $
*/
public class ClientCertAuthenticator extends LoginAuthenticator
{
/** String name of keystore password property. */
@ -83,12 +80,6 @@ public class ClientCertAuthenticator extends LoginAuthenticator
return Constraint.__CERT_AUTH;
}
/**
* @return Authentication for request
* @throws ServerAuthException
*/
@Override
public Authentication validateRequest(ServletRequest req, ServletResponse res, boolean mandatory) throws ServerAuthException
{
@ -166,7 +157,7 @@ public class ClientCertAuthenticator extends LoginAuthenticator
* @param storeProvider keystore provider
* @param storePassword keystore password
* @return created keystore
* @throws Exception
* @throws Exception if unable to get keystore
*/
protected KeyStore getKeyStore(String storePath, String storeType, String storeProvider, String storePassword) throws Exception
{
@ -183,7 +174,7 @@ public class ClientCertAuthenticator extends LoginAuthenticator
* @param crlPath path of certificate revocation list file
* @return a (possibly empty) collection view of java.security.cert.CRL objects initialized with the data from the
* input stream.
* @throws Exception
* @throws Exception if unable to load CRL
*/
protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
{

View File

@ -140,7 +140,7 @@ public class DeferredAuthentication implements Authentication.Deferred
/* ------------------------------------------------------------ */
/**
* @param response
* @param response the response
* @return true if this response is from a deferred call to {@link #authenticate(ServletRequest)}
*/
public static boolean isDeferred(HttpServletResponse response)

View File

@ -64,8 +64,6 @@ import org.eclipse.jetty.util.security.Constraint;
* to the /j_security_check URI within the context. FormAuthentication uses
* {@link SessionAuthentication} to wrap Authentication results so that they
* are associated with the session.</p>
*
*
*/
public class FormAuthenticator extends LoginAuthenticator
{
@ -109,7 +107,7 @@ public class FormAuthenticator extends LoginAuthenticator
* be remembered. If false, only the first uri that leads to a login
* page redirect is remembered.
* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=379909
* @param alwaysSave
* @param alwaysSave true to always save the uri
*/
public void setAlwaysSaveUri (boolean alwaysSave)
{

View File

@ -92,11 +92,11 @@ public abstract class LoginAuthenticator implements Authenticator
/** Change the session id.
* The session is changed to a new instance with a new ID if and only if:<ul>
* <li>A session exists.
* <li>The {@link AuthConfiguration#isSessionRenewedOnAuthentication()} returns true.
* <li>The {@link org.eclipse.jetty.security.Authenticator.AuthConfiguration#isSessionRenewedOnAuthentication()} returns true.
* <li>The session ID has been given to unauthenticated responses
* </ul>
* @param request
* @param response
* @param request the request
* @param response the response
* @return The new session.
*/
protected HttpSession renewSession(HttpServletRequest request, HttpServletResponse response)

View File

@ -46,7 +46,7 @@ public class SpnegoAuthenticator extends LoginAuthenticator
/**
* Allow for a custom authMethod value to be set for instances where SPENGO may not be appropriate
* @param authMethod
* @param authMethod the auth method
*/
public SpnegoAuthenticator( String authMethod )
{

View File

@ -220,8 +220,8 @@ public class ConstraintTest
/**
* Equivalent of Servlet Spec 3.1 pg 132, sec 13.4.1.1, Example 13-1
* @ServletSecurity
* @throws Exception
* &#064;ServletSecurity
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_1() throws Exception
@ -234,9 +234,9 @@ public class ConstraintTest
/**
* Equivalent of Servlet Spec 3.1 pg 132, sec 13.4.1.1, Example 13-2
* @ServletSecurity(@HttpConstraint(transportGuarantee = TransportGuarantee.CONFIDENTIAL))
* &#064;ServletSecurity(@HttpConstraint(transportGuarantee = TransportGuarantee.CONFIDENTIAL))
*
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_2() throws Exception
@ -253,7 +253,7 @@ public class ConstraintTest
/**
* Equivalent of Servlet Spec 3.1 pg 132, sec 13.4.1.1, Example 13-3
* @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.DENY))
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_3() throws Exception
@ -270,7 +270,7 @@ public class ConstraintTest
/**
* Equivalent of Servlet Spec 3.1 pg 132, sec 13.4.1.1, Example 13-4
* @ServletSecurity(@HttpConstraint(rolesAllowed = "R1"))
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_4() throws Exception
@ -294,7 +294,7 @@ public class ConstraintTest
* @HttpMethodConstraint(value = "GET", rolesAllowed = "R1"),
* @HttpMethodConstraint(value = "POST", rolesAllowed = "R1",
* transportGuarantee = TransportGuarantee.CONFIDENTIAL)})
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_5() throws Exception
@ -319,7 +319,7 @@ public class ConstraintTest
/**
* Equivalent of Servlet Spec 3.1 pg 132, sec 13.4.1.1, Example 13-6
* @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"), httpMethodConstraints = @HttpMethodConstraint("GET"))
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_6 () throws Exception
@ -345,7 +345,7 @@ public class ConstraintTest
* @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"),
* httpMethodConstraints = @HttpMethodConstraint(value="TRACE",
* emptyRoleSemantic = EmptyRoleSemantic.DENY))
* @throws Exception
* @throws Exception if test fails
*/
@Test
public void testSecurityElementExample13_7() throws Exception

View File

@ -330,6 +330,7 @@ public class ClientContainer extends ContainerLifeCycle implements WebSocketCont
/**
* Used in {@link Session#getOpenSessions()}
* @return the set of open sessions
*/
public Set<Session> getOpenSessions()
{

View File

@ -58,6 +58,7 @@ public class JsrExtension implements Extension
/**
* A configured extension
* @param cfg the configuration for the extension
*/
public JsrExtension(ExtensionConfig cfg)
{
@ -73,6 +74,7 @@ public class JsrExtension implements Extension
/**
* A potential (unconfigured) extension
* @param name the name of the extension
*/
public JsrExtension(String name)
{

View File

@ -73,7 +73,7 @@ public class MessageHandlerWrapper
}
/**
* Flag for a onMessage() method that wants MessageHandler.{@link Whole} with a Decoder that is based on {@link TextStream} or {@link BinaryStream}
* Flag for a onMessage() method that wants MessageHandler.{@link Whole} with a Decoder that is based on {@link javax.websocket.Decoder.TextStream} or {@link javax.websocket.Decoder.BinaryStream}
*
* @return true for Streaming based Decoder, false for normal decoder for whole messages.
*/

View File

@ -37,6 +37,8 @@ import org.eclipse.jetty.websocket.jsr356.metadata.EndpointMetadata;
*
* @param <T>
* the annotation this metadata is based off of
* @param <C>
* the endpoint configuration this is based off of
*/
public abstract class AnnotatedEndpointMetadata<T extends Annotation, C extends EndpointConfig> implements EndpointMetadata
{

View File

@ -57,6 +57,7 @@ public abstract class JsrCallable extends CallableMethod
/**
* Copy Constructor
* @param copy the JsrCallable to copy from
*/
public JsrCallable(JsrCallable copy)
{

View File

@ -40,6 +40,8 @@ import org.eclipse.jetty.websocket.jsr356.JsrSession;
/**
* The live event methods found for a specific Annotated Endpoint
* @param <T> the annotation type
* @param <C> the endpoint config type
*/
public class JsrEvents<T extends Annotation, C extends EndpointConfig>
{

View File

@ -25,7 +25,7 @@ import org.eclipse.jetty.websocket.jsr356.annotations.Param.Role;
import org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadata;
/**
* Param handling for Text or Binary &#064;{@link OnMessage} parameters declared as {@link Decoder}s
* Param handling for Text or Binary &#064;{@link OnMessage} parameters declared as {@link javax.websocket.Decoder}s
*/
public class JsrParamIdDecoder extends JsrParamIdOnMessage implements IJsrParamId
{

View File

@ -31,9 +31,9 @@ import org.eclipse.jetty.websocket.jsr356.annotations.Param.Role;
/**
* Callable for {@link OnMessage} annotated methods with a whole or partial binary messages.
* <p>
* Not for use with {@link InputStream} based {@link OnMessage} method objects.
* Not for use with {@link java.io.InputStream} based {@link OnMessage} method objects.
*
* @see Binary
* @see javax.websocket.Decoder.Binary
*/
public class OnMessageBinaryCallable extends OnMessageCallable
{
@ -46,6 +46,7 @@ public class OnMessageBinaryCallable extends OnMessageCallable
/**
* Copy Constructor
* @param copy the callable to copy
*/
public OnMessageBinaryCallable(OnMessageCallable copy)
{

View File

@ -33,7 +33,7 @@ import org.eclipse.jetty.websocket.jsr356.annotations.Param.Role;
/**
* Callable for {@link OnMessage} annotated methods for {@link InputStream} based binary message objects
*
* @see BinaryStream
* @see javax.websocket.Decoder.BinaryStream
*/
public class OnMessageBinaryStreamCallable extends OnMessageCallable
{
@ -46,6 +46,7 @@ public class OnMessageBinaryStreamCallable extends OnMessageCallable
/**
* Copy Constructor
* @param copy the callable to copy from
*/
public OnMessageBinaryStreamCallable(OnMessageCallable copy)
{

View File

@ -40,6 +40,7 @@ public class OnMessagePongCallable extends OnMessageCallable
/**
* Copy Constructor
* @param copy the callable to copy from
*/
public OnMessagePongCallable(OnMessageCallable copy)
{

View File

@ -33,7 +33,7 @@ import org.eclipse.jetty.websocket.jsr356.annotations.Param.Role;
* <p>
* Not for use with {@link Reader} based {@link OnMessage} method objects.
*
* @see Text
* @see javax.websocket.Decoder.Text
*/
public class OnMessageTextCallable extends OnMessageCallable
{
@ -46,6 +46,7 @@ public class OnMessageTextCallable extends OnMessageCallable
/**
* Copy Constructor
* @param copy the callable to copy from
*/
public OnMessageTextCallable(OnMessageCallable copy)
{

View File

@ -32,7 +32,7 @@ import org.eclipse.jetty.websocket.jsr356.annotations.Param.Role;
/**
* Callable for {@link OnMessage} annotated methods for {@link Reader} based text message objects
*
* @see TextStream
* @see javax.websocket.Decoder.TextStream
*/
public class OnMessageTextStreamCallable extends OnMessageCallable
{
@ -45,6 +45,7 @@ public class OnMessageTextStreamCallable extends OnMessageCallable
/**
* Copy Constructor
* @param copy the callable to copy from
*/
public OnMessageTextStreamCallable(OnMessageCallable copy)
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Boolean} decoder.
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Boolean} decoder.
* <p>
* Note: delegates to {@link Boolean#parseBoolean(String)} and will only support "true" and "false" as boolean values.
*/

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Byte} decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Byte} decoder
*/
public class ByteDecoder extends AbstractDecoder implements Decoder.Text<Byte>
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Character} decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Character} decoder
*/
public class CharacterDecoder extends AbstractDecoder implements Decoder.Text<Character>
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Double} to decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Double} to decoder
*/
public class DoubleDecoder extends AbstractDecoder implements Decoder.Text<Double>
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Integer} decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Integer} decoder
*/
public class IntegerDecoder extends AbstractDecoder implements Decoder.Text<Integer>
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link Short} decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link Short} decoder
*/
public class ShortDecoder extends AbstractDecoder implements Decoder.Text<Short>
{

View File

@ -23,7 +23,7 @@ import javax.websocket.Decoder;
/**
* Default implementation of the {@link Text} Message to {@link String} decoder
* Default implementation of the {@link javax.websocket.Decoder.Text} Message to {@link String} decoder
*/
public class StringDecoder extends AbstractDecoder implements Decoder.Text<String>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Boolean} to {@link Text} Message encoder
* Default encoder for {@link Boolean} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class BooleanEncoder extends AbstractEncoder implements Encoder.Text<Boolean>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Byte} to {@link Text} Message encoder
* Default encoder for {@link Byte} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class ByteEncoder extends AbstractEncoder implements Encoder.Text<Byte>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Character} to {@link Text} Message encoder
* Default encoder for {@link Character} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class CharacterEncoder extends AbstractEncoder implements Encoder.Text<Character>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Double} to {@link Text} Message encoder
* Default encoder for {@link Double} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class DoubleEncoder extends AbstractEncoder implements Encoder.Text<Double>
{

View File

@ -21,7 +21,7 @@ package org.eclipse.jetty.websocket.jsr356.encoders;
import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Float} to {@link Text} Message encoder
* Default encoder for {@link Float} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class FloatEncoder extends AbstractEncoder implements Encoder.Text<Float>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Integer} to {@link Text} Message encoder
* Default encoder for {@link Integer} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class IntegerEncoder extends AbstractEncoder implements Encoder.Text<Integer>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Long} to {@link Text} Message encoder
* Default encoder for {@link Long} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class LongEncoder extends AbstractEncoder implements Encoder.Text<Long>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link Short} to {@link Text} Message encoder
* Default encoder for {@link Short} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class ShortEncoder extends AbstractEncoder implements Encoder.Text<Short>
{

View File

@ -22,7 +22,7 @@ import javax.websocket.EncodeException;
import javax.websocket.Encoder;
/**
* Default encoder for {@link String} to {@link Text} Message encoder
* Default encoder for {@link String} to {@link javax.websocket.Encoder.Text} Message encoder
*/
public class StringEncoder extends AbstractEncoder implements Encoder.Text<String>
{

View File

@ -21,10 +21,10 @@ package org.eclipse.jetty.websocket.jsr356.metadata;
import org.eclipse.jetty.websocket.jsr356.MessageType;
/**
* The immutable base metadata for a coder ({@link Decoder} or {@link Encoder}
* The immutable base metadata for a coder ({@link javax.websocket.Decoder} or {@link javax.websocket.Encoder}
*
* @param <T>
* the specific type of coder ({@link Decoder} or {@link Encoder}
* the specific type of coder ({@link javax.websocket.Decoder} or {@link javax.websocket.Encoder}
*/
public abstract class CoderMetadata<T>
{

View File

@ -32,7 +32,7 @@ import org.eclipse.jetty.websocket.api.InvalidWebSocketException;
* This is a write-only collection, and cannot be modified once initialized.
*
* @param <T>
* The type of coder ({@link Decoder} or {@link Encoder}
* The type of coder ({@link javax.websocket.Decoder} or {@link javax.websocket.Encoder}
* @param <M>
* The metadata for the coder
*/

View File

@ -21,7 +21,7 @@ package org.eclipse.jetty.websocket.jsr356.metadata;
import org.eclipse.jetty.websocket.api.InvalidWebSocketException;
/**
* Thrown when a duplicate coder is encountered when attempting to identify a Endpoint's metadata ( {@link Decoder} or {@link Encoder})
* Thrown when a duplicate coder is encountered when attempting to identify a Endpoint's metadata ({@link javax.websocket.Decoder} or {@link javax.websocket.Encoder})
*/
public class DuplicateCoderException extends InvalidWebSocketException
{

View File

@ -40,7 +40,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**
* Tests of {@link Configurator}
* Tests of {@link javax.websocket.ClientEndpointConfig.Configurator}
*/
public class ConfiguratorTest
{

View File

@ -28,6 +28,7 @@ public class InvalidCloseIntSocket extends TrackingSocket
{
/**
* Invalid Close Method Declaration (parameter type int)
* @param statusCode the status code
*/
@OnClose
public void onClose(int statusCode)

View File

@ -28,6 +28,7 @@ public class InvalidErrorErrorSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type Error)
* @param error the error
*/
@OnError
public void onError(Error error)

View File

@ -28,6 +28,7 @@ public class InvalidErrorExceptionSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type Exception)
* @param e the extension
*/
@OnError
public void onError(Exception e)

View File

@ -28,6 +28,7 @@ public class InvalidErrorIntSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type int)
* @param errorCount the error count
*/
@OnError
public void onError(int errorCount)

View File

@ -29,6 +29,7 @@ public class InvalidOpenCloseReasonSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter type CloseReason)
* @param reason the close reason
*/
@OnOpen
public void onOpen(CloseReason reason)

View File

@ -28,6 +28,7 @@ public class InvalidOpenIntSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter type int)
* @param value the open value
*/
@OnOpen
public void onOpen(int value)

View File

@ -29,6 +29,8 @@ public class InvalidOpenSessionIntSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter of type int)
* @param session the session for the open
* @param count the open count
*/
@OnOpen
public void onOpen(Session session, int count)

View File

@ -22,6 +22,7 @@ import javax.websocket.Decoder;
/**
* Testing scenario of an extended Decoder interface
* @param <T> the decoder type
*/
public interface ExtDecoder<T> extends Decoder.Text<T>
{

View File

@ -34,7 +34,7 @@ import org.eclipse.jetty.websocket.api.util.QuoteUtil;
/**
* The "Container Default Configurator" per the JSR-356 spec.
*
* @see ServiceLoader behavior of {@link ServerEndpointConfig.Configurator}
* @see ServiceLoader behavior of {@link javax.websocket.server.ServerEndpointConfig.Configurator}
*/
public final class ContainerDefaultConfigurator extends Configurator
{

View File

@ -51,6 +51,10 @@ public class WebSocketServerContainerInitializer implements ServletContainerInit
* Jetty Native approach.
* <p>
* Note: this will add the Upgrade filter to the existing list, with no regard for order. It will just be tacked onto the end of the list.
*
* @param context the servlet context handler
* @return the created websocket server container
* @throws ServletException if unable to create the websocket server container
*/
public static ServerContainer configureContext(ServletContextHandler context) throws ServletException
{
@ -71,6 +75,11 @@ public class WebSocketServerContainerInitializer implements ServletContainerInit
* Servlet 3.1 approach.
* <p>
* This will use Servlet 3.1 techniques on the {@link ServletContext} to add a filter at the start of the filter chain.
*
* @param context the servlet context
* @param jettyContext the jetty servlet context handler
* @return the created websocket server container
* @throws ServletException if unable to create the websocket server container
*/
public static ServerContainer configureContext(ServletContext context, ServletContextHandler jettyContext) throws ServletException
{

View File

@ -35,7 +35,7 @@ import org.junit.Rule;
import org.junit.Test;
/**
* Example of an {@link Endpoint} extended echo server added programmatically via the
* Example of an {@link javax.websocket.Endpoint} extended echo server added programmatically via the
* {@link ServerContainer#addEndpoint(javax.websocket.server.ServerEndpointConfig)}
*/
public class BasicEndpointTest

View File

@ -417,6 +417,7 @@ public class ConfiguratorTest
/**
* Test of Sec-WebSocket-Protocol, as seen in RFC-6455, 1 protocol
* @throws Exception on test failure
*/
@Test
public void testProtocol_Single() throws Exception
@ -440,6 +441,7 @@ public class ConfiguratorTest
/**
* Test of Sec-WebSocket-Protocol, as seen in RFC-6455, 3 protocols
* @throws Exception on test failure
*/
@Test
public void testProtocol_Triple() throws Exception
@ -463,6 +465,7 @@ public class ConfiguratorTest
/**
* Test of Sec-WebSocket-Protocol, using all lowercase header
* @throws Exception on test failure
*/
@Test
public void testProtocol_LowercaseHeader() throws Exception
@ -486,6 +489,7 @@ public class ConfiguratorTest
/**
* Test of Sec-WebSocket-Protocol, using non-spec case header
* @throws Exception on test failure
*/
@Test
public void testProtocol_AltHeaderCase() throws Exception

View File

@ -28,6 +28,7 @@ public class InvalidCloseIntSocket extends TrackingSocket
{
/**
* Invalid Close Method Declaration (parameter type int)
* @param statusCode the status code
*/
@OnClose
public void onClose(int statusCode)

View File

@ -28,6 +28,7 @@ public class InvalidErrorErrorSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type Error)
* @param error the error
*/
@OnError
public void onError(Error error)

View File

@ -28,6 +28,7 @@ public class InvalidErrorExceptionSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type Exception)
* @param e the exception
*/
@OnError
public void onError(Exception e)

View File

@ -28,6 +28,7 @@ public class InvalidErrorIntSocket extends TrackingSocket
{
/**
* Invalid Error Method Declaration (parameter type int)
* @param errorCount the error count
*/
@OnError
public void onError(int errorCount)

View File

@ -29,6 +29,7 @@ public class InvalidOpenCloseReasonSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter type CloseReason)
* @param reason the close reason
*/
@OnOpen
public void onOpen(CloseReason reason)

View File

@ -28,6 +28,7 @@ public class InvalidOpenIntSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter type int)
* @param value the value
*/
@OnOpen
public void onOpen(int value)

View File

@ -29,6 +29,8 @@ public class InvalidOpenSessionIntSocket extends TrackingSocket
{
/**
* Invalid Open Method Declaration (parameter of type int)
* @param session the sesion
* @param count the count
*/
@OnOpen
public void onOpen(Session session, int count)

View File

@ -25,7 +25,7 @@ import javax.websocket.server.ServerContainer;
import javax.websocket.server.ServerEndpointConfig;
/**
* Example of adding a server WebSocket (extending {@link Endpoint}) programmatically via config
* Example of adding a server WebSocket (extending {@link javax.websocket.Endpoint}) programmatically via config
*/
public class BasicEchoEndpointConfigContextListener implements ServletContextListener
{

View File

@ -27,7 +27,7 @@ import javax.websocket.server.ServerEndpointConfig;
import org.eclipse.jetty.websocket.jsr356.server.samples.pong.PongMessageEndpoint;
/**
* Example of adding a server WebSocket (extending {@link Endpoint}) programmatically directly.
* Example of adding a server WebSocket (extending {@link javax.websocket.Endpoint}) programmatically directly.
* <p>
* NOTE: this shouldn't work as the endpoint has no path associated with it.
*/

View File

@ -25,7 +25,7 @@ import javax.websocket.server.ServerContainer;
import javax.websocket.server.ServerEndpointConfig;
/**
* Example of adding a server socket (which extends {@link Endpoint}) programmatically via the {@link ServerContainer#addEndpoint(ServerEndpointConfig)}
* Example of adding a server socket (which extends {@link javax.websocket.Endpoint}) programmatically via the {@link ServerContainer#addEndpoint(ServerEndpointConfig)}
*/
public class BasicEchoSocketConfigContextListener implements ServletContextListener
{

View File

@ -25,7 +25,7 @@ import javax.websocket.server.ServerContainer;
import javax.websocket.server.ServerEndpointConfig;
/**
* Example of adding a server WebSocket (extending {@link Endpoint}) programmatically via config
* Example of adding a server WebSocket (extending {@link javax.websocket.Endpoint}) programmatically via config
*/
public class IdleTimeoutContextListener implements ServletContextListener
{

View File

@ -21,7 +21,7 @@ package org.eclipse.jetty.websocket.api;
import org.eclipse.jetty.websocket.api.extensions.OutgoingFrames;
/**
* The possible batch modes when invoking {@link OutgoingFrames#outgoingFrame(Frame, WriteCallback, BatchMode)}.
* The possible batch modes when invoking {@link OutgoingFrames#outgoingFrame(org.eclipse.jetty.websocket.api.extensions.Frame, WriteCallback, BatchMode)}.
*/
public enum BatchMode
{

View File

@ -31,11 +31,14 @@ public interface RemoteEndpoint
*
* @param data
* the message to be sent
* @throws IOException
* if unable to send the bytes
*/
void sendBytes(ByteBuffer data) throws IOException;
/**
* Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may use the returned
* Initiates the asynchronous transmission of a binary message. This method returns before the message is
* transmitted. Developers may use the returned
* Future object to track progress of the transmission.
*
* @param data
@ -45,7 +48,8 @@ public interface RemoteEndpoint
Future<Void> sendBytesByFuture(ByteBuffer data);
/**
* Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers may provide a callback to
* Initiates the asynchronous transmission of a binary message. This method returns before the message is
* transmitted. Developers may provide a callback to
* be notified when the message has been transmitted or resulted in an error.
*
* @param data
@ -56,38 +60,54 @@ public interface RemoteEndpoint
void sendBytes(ByteBuffer data, WriteCallback callback);
/**
* Send a binary message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are
* Send a binary message in pieces, blocking until all of the message has been transmitted. The runtime reads the
* message in order. Non-final pieces are
* sent with isLast set to false. The final piece must be sent with isLast set to true.
*
* @param fragment
* the piece of the message being sent
* @param isLast
* true if this is the last piece of the partial bytes
* @throws IOException
* if unable to send the partial bytes
*/
void sendPartialBytes(ByteBuffer fragment, boolean isLast) throws IOException;
/**
* Send a text message in pieces, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final pieces are sent
* Send a text message in pieces, blocking until all of the message has been transmitted. The runtime reads the
* message in order. Non-final pieces are sent
* with isLast set to false. The final piece must be sent with isLast set to true.
*
* @param fragment
* the piece of the message being sent
* @param isLast
* true if this is the last piece of the partial bytes
* @throws IOException
* if unable to send the partial bytes
*/
void sendPartialString(String fragment, boolean isLast) throws IOException;
/**
* Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message may be picked up using the
* Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message
* may be picked up using the
* MessageHandler.Pong handler.
*
* @param applicationData
* the data to be carried in the ping request
* @throws IOException
* if unable to send the ping
*/
void sendPing(ByteBuffer applicationData) throws IOException;
/**
* Allows the developer to send an unsolicited Pong message containing the given application data in order to serve as a unidirectional heartbeat for the
* Allows the developer to send an unsolicited Pong message containing the given application data in order to serve
* as a unidirectional heartbeat for the
* session.
*
* @param applicationData
* the application data to be carried in the pong response.
* @throws IOException
* if unable to send the pong
*/
void sendPong(ByteBuffer applicationData) throws IOException;
@ -98,11 +118,14 @@ public interface RemoteEndpoint
*
* @param text
* the message to be sent
* @throws IOException
* if unable to send the text message
*/
void sendString(String text) throws IOException;
/**
* Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may use the returned
* Initiates the asynchronous transmission of a text message. This method may return before the message is
* transmitted. Developers may use the returned
* Future object to track progress of the transmission.
*
* @param text
@ -112,7 +135,8 @@ public interface RemoteEndpoint
Future<Void> sendStringByFuture(String text);
/**
* Initiates the asynchronous transmission of a text message. This method may return before the message is transmitted. Developers may provide a callback to
* Initiates the asynchronous transmission of a text message. This method may return before the message is
* transmitted. Developers may provide a callback to
* be notified when the message has been transmitted or resulted in an error.
*
* @param text
@ -130,7 +154,9 @@ public interface RemoteEndpoint
/**
* Flushes messages that may have been batched by the implementation.
* @throws IOException if the flush fails
*
* @throws IOException
* if the flush fails
* @see #getBatchMode()
*/
void flush() throws IOException;

View File

@ -26,7 +26,6 @@ import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
/**
* Session represents an active link of communications with a Remote WebSocket Endpoint.
* <p>
*/
public interface Session extends Closeable
{
@ -82,7 +81,11 @@ public interface Session extends Closeable
* Once called, any read/write activity on the websocket from this point will be indeterminate.
* <p>
* Once the underlying connection has been determined to be closed, the various onClose() events (either
* {@link WebSocketListener#onWebSocketClose(int, String)} or {@link OnWebSocketClose}) will be called on your websocket.
* {@link WebSocketListener#onWebSocketClose(int, String)} or {@link OnWebSocketClose}) will be called on your
* websocket.
*
* @throws IOException
* if unable to disconnect
*
* @see #close()
* @see #close(CloseStatus)

View File

@ -136,13 +136,15 @@ public class UpgradeResponse
/**
* Issue a forbidden upgrade response.
* <p>
* This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden access.
* This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden
* access.
* <p>
* Use this when the origin or authentication is invalid.
*
* @param message
* the short 1 line detail message about the forbidden response
* @throws IOException
* if unable to send the forbidden
*/
public void sendForbidden(String message) throws IOException
{

View File

@ -66,7 +66,7 @@ public interface WebSocketListener
* <p>
* This will result in the {@link Session} being closed by the implementing side.
*
* @param error
* @param cause
* the error that occurred.
*/
void onWebSocketError(Throwable cause);
@ -74,7 +74,7 @@ public interface WebSocketListener
/**
* A WebSocket Text frame was received.
*
* @param message
* @param message the message
*/
void onWebSocketText(String message);
}

View File

@ -31,7 +31,6 @@ import org.eclipse.jetty.websocket.api.Session;
* <p>
* Acceptable method patterns.<br>
* Note: <code>methodName</code> can be any name you want to use.
* <p>
* <ol>
* <li><code>public void methodName({@link Throwable} error)</code></li>
* <li><code>public void methodName({@link Session} session, {@link Throwable} error)</code></li>

View File

@ -32,8 +32,8 @@ import org.eclipse.jetty.websocket.api.Session;
* Acceptable method patterns.<br>
* Note: <code>methodName</code> can be any name you want to use.
* <ol>
* <li><code>public void methodName({@link Frame} frame)</code></li>
* <li><code>public void methodName({@link Session} session, {@link Frame} frame)</code></li>
* <li><code>public void methodName({@link org.eclipse.jetty.websocket.api.extensions.Frame} frame)</code></li>
* <li><code>public void methodName({@link Session} session, {@link org.eclipse.jetty.websocket.api.extensions.Frame} frame)</code></li>
* </ol>
*/
@Documented

View File

@ -36,6 +36,7 @@ public interface Extension extends IncomingFrames, OutgoingFrames
* The <code>Sec-WebSocket-Extensions</code> name for this extension.
* <p>
* Also known as the <a href="https://tools.ietf.org/html/rfc6455#section-9.1"><code>extension-token</code> per Section 9.1. Negotiating Extensions</a>.
* @return the name of the extension
*/
public String getName();

View File

@ -128,6 +128,7 @@ public class ExtensionConfig
/**
* Copy constructor
* @param copy the extension config to copy
*/
public ExtensionConfig(ExtensionConfig copy)
{

View File

@ -27,7 +27,6 @@ import java.util.NoSuchElementException;
* Provide some consistent Http header value and Extension configuration parameter quoting support.
* <p>
* While QuotedStringTokenizer exists in jetty-util, and works great with http header values, using it in websocket-api is undesired.
* <p>
* <ul>
* <li>Using QuotedStringTokenizer would introduce a dependency to jetty-util that would need to be exposed via the WebAppContext classloader</li>
* <li>ABNF defined extension parameter parsing requirements of RFC-6455 (WebSocket) ABNF, is slightly different than the ABNF parsing defined in RFC-2616

View File

@ -512,6 +512,7 @@ public class WebSocketClient extends ContainerLifeCycle implements SessionListen
}
/**
* @param bindAddress the address to bind to
* @deprecated use {@link #setBindAddress(SocketAddress)} instead
*/
@Deprecated

View File

@ -20,14 +20,15 @@
* Jetty WebSocket Client API
* <p>
* The core class is {@link org.eclipse.jetty.websocket.client.WebSocketClient}, which acts as a central configuration object (for example
* for {@link org.eclipse.jetty.websocket.client.WebSocketClient#setConnectTimeout(int) connect timeouts}, {@link WebSocketClient#setCookieStore(CookieStore)
* request cookie store}, etc.) and as a factory for WebSocket {@link org.eclipse.jetty.websocket.api.Session} objects.
* for {@link org.eclipse.jetty.websocket.client.WebSocketClient#setConnectTimeout(long)},
* {@link org.eclipse.jetty.websocket.client.WebSocketClient#setCookieStore(java.net.CookieStore)},
* etc.) and as a factory for WebSocket {@link org.eclipse.jetty.websocket.api.Session} objects.
* <p>
* The <a href="https://tools.ietf.org/html/rfc6455">WebSocket protocol</a> is based on a framing protocol built
* around an upgraded HTTP connection. It is primarily focused on the sending of messages (text or binary), with an
* occasional control frame (close, ping, pong) that this implementation uses.
* <p>
* {@link org.eclipse.jetty.websocket.client.WebSocketClient} holds a number of {@link org.eclipse.jetty.websocket.api.Session Sessions}, which in turn
* {@link org.eclipse.jetty.websocket.client.WebSocketClient} holds a number of {@link org.eclipse.jetty.websocket.api.Session}, which in turn
* is used to manage physical vs virtual connection handling (mux extension).
*/
package org.eclipse.jetty.websocket.client;

View File

@ -67,7 +67,7 @@ public class TomcatServerQuirksTest
* <li><a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=54067">Apache Tomcat Bug #54067</a></li>
* </ul>
*
* @throws IOException
* @throws Exception on test failure
*/
@Test
public void testTomcat7_0_32_WithTransferEncoding() throws Exception

View File

@ -61,11 +61,13 @@ public interface LogicalConnection extends OutgoingFrames, SuspendToken
/**
* Get the ByteBufferPool in use by the connection
* @return the buffer pool
*/
ByteBufferPool getBufferPool();
/**
* Get the Executor used by this connection.
* @return the executor
*/
Executor getExecutor();
@ -165,6 +167,7 @@ public interface LogicalConnection extends OutgoingFrames, SuspendToken
/**
* Suspend a the incoming read events on the connection.
* @return the suspend token
*/
SuspendToken suspend();
}

View File

@ -96,7 +96,6 @@ public abstract class WebSocketFrame implements Frame
/**
* Combined FIN + RSV1 + RSV2 + RSV3 + OpCode byte.
* <p>
*
* <pre>
* 1000_0000 (0x80) = fin
@ -119,6 +118,7 @@ public abstract class WebSocketFrame implements Frame
/**
* Construct form opcode
* @param opcode the opcode the frame is based on
*/
protected WebSocketFrame(byte opcode)
{
@ -341,6 +341,7 @@ public abstract class WebSocketFrame implements Frame
*
* @param buf
* the bytebuffer to set
* @return the frame itself
*/
public WebSocketFrame setPayload(ByteBuffer buf)
{

View File

@ -101,7 +101,7 @@ public class EventDriverFactory
* Wrap the given WebSocket object instance in a suitable EventDriver
*
* @param websocket
* the websocket instance to wrap. Must either implement {@link WebSocketListener} or be annotated with {@link WebSocket &#064WebSocket}
* the websocket instance to wrap. Must either implement {@link WebSocketListener} or be annotated with {@link WebSocket &#064;WebSocket}
* @return appropriate EventDriver for this websocket instance.
*/
public EventDriver wrap(Object websocket)

View File

@ -27,6 +27,7 @@ import org.eclipse.jetty.websocket.common.events.ParamList;
/**
* Basic scanner for Annotated Methods
* @param <T> The type of metadata
*/
public abstract class AbstractMethodAnnotationScanner<T>
{

View File

@ -36,6 +36,7 @@ public class DataFrame extends WebSocketFrame
* Construct new DataFrame based on headers of provided frame.
* <p>
* Useful for when working in extensions and a new frame needs to be created.
* @param basedOn the frame this one is based on
*/
public DataFrame(Frame basedOn)
{
@ -46,6 +47,8 @@ public class DataFrame extends WebSocketFrame
* Construct new DataFrame based on headers of provided frame, overriding for continuations if needed.
* <p>
* Useful for when working in extensions and a new frame needs to be created.
* @param basedOn the frame this one is based on
* @param continuation true if this is a continuation frame
*/
public DataFrame(Frame basedOn, boolean continuation)
{

View File

@ -56,7 +56,7 @@ import org.eclipse.jetty.websocket.common.WebSocketSession;
import org.eclipse.jetty.websocket.common.io.IOState.ConnectionStateListener;
/**
* Provides the implementation of {@link LogicalConnection} within the framework of the new {@link Connection} framework of {@code jetty-io}.
* Provides the implementation of {@link LogicalConnection} within the framework of the new {@link org.eclipse.jetty.io.Connection} framework of {@code jetty-io}.
*/
public abstract class AbstractWebSocketConnection extends AbstractConnection implements LogicalConnection, ConnectionStateListener, Dumpable
{
@ -518,6 +518,7 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp
* Extra bytes from the initial HTTP upgrade that need to
* be processed by the websocket parser before starting
* to read bytes from the connection
* @param prefilled the bytes of prefilled content encountered during upgrade
*/
protected void setInitialBuffer(ByteBuffer prefilled)
{

View File

@ -40,7 +40,7 @@ import org.eclipse.jetty.websocket.common.OpCode;
import org.eclipse.jetty.websocket.common.frames.BinaryFrame;
/**
* Interface for working with bytes destined for {@link EndPoint#write(Callback, ByteBuffer...)}
* Interface for working with bytes destined for {@link EndPoint#write(org.eclipse.jetty.util.Callback, ByteBuffer...)}
*/
public class FrameFlusher
{

View File

@ -190,6 +190,7 @@ public class IOState
* A websocket connection has been disconnected for abnormal close reasons.
* <p>
* This is the low level disconnect of the socket. It could be the result of a normal close operation, from an IO error, or even from a timeout.
* @param close the close information
*/
public void onAbnormalClose(CloseInfo close)
{
@ -221,6 +222,7 @@ public class IOState
/**
* A close handshake has been issued from the local endpoint
* @param close the close information
*/
public void onCloseLocal(CloseInfo close)
{
@ -302,6 +304,7 @@ public class IOState
/**
* A close handshake has been received from the remote endpoint
* @param close the close information
*/
public void onCloseRemote(CloseInfo close)
{
@ -427,6 +430,7 @@ public class IOState
* The local endpoint has reached a read failure.
* <p>
* This could be a normal result after a proper close handshake, or even a premature close due to a connection disconnect.
* @param t the read failure
*/
public void onReadFailure(Throwable t)
{
@ -478,6 +482,7 @@ public class IOState
* The local endpoint has reached a write failure.
* <p>
* A low level I/O failure, or even a jetty side EndPoint close (from idle timeout) are a few scenarios
* @param t the throwable that caused the write failure
*/
public void onWriteFailure(Throwable t)
{

View File

@ -27,11 +27,13 @@ public interface WebSocketSessionScope
{
/**
* Active {@link WebSocketSession} associated with this scope.
* @return the websocket session
*/
WebSocketSession getWebSocketSession();
/**
* The parent {@link WebSocketContainerScope} for this session scope.
* @return the websocket container scope
*/
WebSocketContainerScope getContainerScope();
}

View File

@ -43,7 +43,6 @@ public final class TextUtil
/**
* Smash a long string to fit within the max string length, by taking the middle section of the string and replacing them with an ellipsis "..."
* <p>
*
* <pre>
* Examples:

View File

@ -30,6 +30,11 @@ public class BadBinarySignatureSocket
{
/**
* Declaring a non-void return type
* @param session the session
* @param buf the buffer
* @param offset the offset
* @param len the length
* @return the response boolean
*/
@OnWebSocketMessage
public boolean onBinary(Session session, byte buf[], int offset, int len)

View File

@ -31,6 +31,9 @@ public class BadDuplicateBinarySocket
{
/**
* First method
* @param payload the payload
* @param offset the offset
* @param len the len
*/
@OnWebSocketMessage
public void binMe(byte[] payload, int offset, int len)
@ -40,6 +43,7 @@ public class BadDuplicateBinarySocket
/**
* Second method
* @param stream the input stream
*/
@OnWebSocketMessage
public void streamMe(InputStream stream)

View File

@ -27,6 +27,7 @@ public class BadDuplicateFrameSocket
{
/**
* The get a frame
* @param frame the frame
*/
@OnWebSocketFrame
public void frameMe(Frame frame)
@ -36,6 +37,7 @@ public class BadDuplicateFrameSocket
/**
* This is a duplicate frame type (should throw an exception attempting to use)
* @param frame the frame
*/
@OnWebSocketFrame
public void watchMe(Frame frame)

View File

@ -30,6 +30,8 @@ public class BadTextSignatureSocket
{
/**
* Declaring a static method
* @param session the session
* @param text the text message
*/
@OnWebSocketMessage
public static void onText(Session session, String text)

View File

@ -27,6 +27,7 @@ public class FrameSocket
{
/**
* A frame
* @param frame the frame
*/
@OnWebSocketFrame
public void frameMe(Frame frame)

View File

@ -140,6 +140,7 @@ public class FragmentExtensionTest
/**
* Verify that outgoing text frames are fragmented by the maxLength configuration.
* @throws IOException on test failure
*/
@Test
public void testOutgoingFramesByMaxLength() throws IOException
@ -212,6 +213,7 @@ public class FragmentExtensionTest
/**
* Verify that outgoing text frames are fragmented by default configuration
* @throws IOException on test failure
*/
@Test
public void testOutgoingFramesDefaultConfig() throws IOException
@ -276,6 +278,7 @@ public class FragmentExtensionTest
/**
* Outgoing PING (Control Frame) should pass through extension unmodified
* @throws IOException on test failure
*/
@Test
public void testOutgoingPing() throws IOException

Some files were not shown because too many files have changed in this diff Show More