464727 - Update Javadoc for Java 8 DocLint
Eliminate empty tag warnings + Changed <p/> to <p> + Changed <br/> to <br>
This commit is contained in:
parent
10099dcb01
commit
09b5f680b7
|
@ -37,10 +37,10 @@ public interface ContentDecoder
|
|||
|
||||
/**
|
||||
* Factory for {@link ContentDecoder}s; subclasses must implement {@link #newContentDecoder()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Factory} have an {@link #getEncoding() encoding}, which is the string used in
|
||||
* {@code Accept-Encoding} request header and in {@code Content-Encoding} response headers.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Factory} instances are configured in {@link HttpClient} via
|
||||
* {@link HttpClient#getContentDecoderFactories()}.
|
||||
*/
|
||||
|
|
|
@ -719,7 +719,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
|
||||
/**
|
||||
* Sets the max number of connections to open to each destinations.
|
||||
* <p />
|
||||
* <p>
|
||||
* RFC 2616 suggests that 2 connections should be opened per each destination,
|
||||
* but browsers commonly open 6.
|
||||
* If this {@link HttpClient} is used for load testing, it is common to have only one destination
|
||||
|
@ -743,7 +743,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
|
||||
/**
|
||||
* Sets the max number of requests that may be queued to a destination.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this {@link HttpClient} performs a high rate of requests to a destination,
|
||||
* and all the connections managed by that destination are busy with other requests,
|
||||
* then new requests will be queued up in the destination.
|
||||
|
@ -839,7 +839,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
|
||||
/**
|
||||
* Whether to dispatch I/O operations from the selector thread to a different thread.
|
||||
* <p />
|
||||
* <p>
|
||||
* This implementation never blocks on I/O operation, but invokes application callbacks that may
|
||||
* take time to execute or block on other I/O.
|
||||
* If application callbacks are known to take time or block on I/O, then parameter {@code dispatchIO}
|
||||
|
@ -866,17 +866,17 @@ public class HttpClient extends ContainerLifeCycle
|
|||
|
||||
/**
|
||||
* Whether request/response events must be strictly ordered with respect to connection usage.
|
||||
* <p />
|
||||
* <p>
|
||||
* From the point of view of connection usage, the connection can be reused just before the
|
||||
* "complete" event notified to {@link org.eclipse.jetty.client.api.Response.CompleteListener}s
|
||||
* (but after the "success" event).
|
||||
* <p />
|
||||
* <p>
|
||||
* When a request/response exchange is completing, the destination may have another request
|
||||
* queued to be sent to the server.
|
||||
* If the connection for that destination is reused for the second request before the "complete"
|
||||
* event of the first exchange, it may happen that the "begin" event of the second request
|
||||
* happens before the "complete" event of the first exchange.
|
||||
* <p />
|
||||
* <p>
|
||||
* Enforcing strict ordering of events so that a "begin" event of a request can never happen
|
||||
* before the "complete" event of the previous exchange comes with the cost of increased
|
||||
* connection usage.
|
||||
|
@ -885,7 +885,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
* when the connection cannot yet be reused.
|
||||
* When strict event ordering is not enforced, the redirect request will reuse the already
|
||||
* open connection making the system more efficient.
|
||||
* <p />
|
||||
* <p>
|
||||
* The default value for this property is {@code false}.
|
||||
*
|
||||
* @param strictEventOrdering whether request/response events must be strictly ordered
|
||||
|
@ -906,7 +906,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
|
||||
/**
|
||||
* Whether destinations that have no connections (nor active nor idle) should be removed.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications typically make request to a limited number of destinations so keeping
|
||||
* destinations around is not a problem for the memory or the GC.
|
||||
* However, for applications that hit millions of different destinations (e.g. a spider
|
||||
|
|
|
@ -26,10 +26,10 @@ import org.eclipse.jetty.io.ClientConnectionFactory;
|
|||
/**
|
||||
* {@link HttpClientTransport} represents what transport implementations should provide
|
||||
* in order to plug-in a different transport for {@link HttpClient}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* While the {@link HttpClient} APIs define the HTTP semantic (request, response, headers, etc.)
|
||||
* <em>how</em> a HTTP exchange is carried over the network depends on implementations of this class.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The default implementation uses the HTTP protocol to carry over the network the HTTP exchange,
|
||||
* but the HTTP exchange may also be carried using the FCGI protocol, the HTTP/2 protocol or,
|
||||
* in future, other protocols.
|
||||
|
@ -41,7 +41,7 @@ public interface HttpClientTransport extends ClientConnectionFactory
|
|||
|
||||
/**
|
||||
* Sets the {@link HttpClient} instance on this transport.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is needed because of a chicken-egg problem: in order to create the {@link HttpClient}
|
||||
* a {@link HttpClientTransport} is needed, that therefore cannot have a reference yet to the
|
||||
* {@link HttpClient}.
|
||||
|
@ -52,7 +52,7 @@ public interface HttpClientTransport extends ClientConnectionFactory
|
|||
|
||||
/**
|
||||
* Creates a new, transport-specific, {@link HttpDestination} object.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link HttpDestination} controls the destination-connection cardinality: protocols like
|
||||
* HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality.
|
||||
*
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* {@link HttpContent} is a stateful, linear representation of the request content provided
|
||||
* by a {@link ContentProvider} that can be traversed one-way to obtain content buffers to
|
||||
* send to a HTTP server.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link HttpContent} offers the notion of a one-way cursor to traverse the content.
|
||||
* The cursor starts in a virtual "before" position and can be advanced using {@link #advance()}
|
||||
* until it reaches a virtual "after" position where the content is fully consumed.
|
||||
|
@ -57,7 +57,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* </ul>
|
||||
* {@link HttpContent} may not have content, if the related {@link ContentProvider} is {@code null}, and this
|
||||
* is reflected by {@link #hasContent()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link HttpContent} may have {@link AsyncContentProvider deferred content}, in which case {@link #advance()}
|
||||
* moves the cursor to a position that provides {@code null} {@link #getByteBuffer() buffer} and
|
||||
* {@link #getContent() content}. When the deferred content is available, a further call to {@link #advance()}
|
||||
|
@ -113,11 +113,11 @@ public class HttpContent implements Callback, Closeable
|
|||
|
||||
/**
|
||||
* Advances the cursor to the next block of content.
|
||||
* <p />
|
||||
* <p>
|
||||
* The next block of content may be valid (which yields a non-null buffer
|
||||
* returned by {@link #getByteBuffer()}), but may also be deferred
|
||||
* (which yields a null buffer returned by {@link #getByteBuffer()}).
|
||||
* <p />
|
||||
* <p>
|
||||
* If the block of content pointed by the new cursor position is valid, this method returns true.
|
||||
*
|
||||
* @return true if there is content at the new cursor's position, false otherwise.
|
||||
|
|
|
@ -42,9 +42,9 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* {@link HttpReceiver} provides the abstract code to implement the various steps of the receive of HTTP responses.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link HttpReceiver} maintains a state machine that is updated when the steps of receiving a response are executed.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses must handle the transport-specific details, for example how to read from the raw socket and how to parse
|
||||
* the bytes read from the socket. Then they have to call the methods defined in this class in the following order:
|
||||
* <ol>
|
||||
|
@ -59,7 +59,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* (for example, because of I/O exceptions).
|
||||
* At any time, user threads may abort the response which will cause {@link #responseFailure(Throwable)} to be
|
||||
* invoked.
|
||||
* <p />
|
||||
* <p>
|
||||
* The state machine maintained by this class ensures that the response steps are not executed by an I/O thread
|
||||
* if the response has already been failed.
|
||||
*
|
||||
|
@ -96,10 +96,10 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked when the response status code is available.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses must have set the response status code on the {@link Response} object of the {@link HttpExchange}
|
||||
* prior invoking this method.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.BeginListener}s.
|
||||
*
|
||||
* @param exchange the HTTP exchange
|
||||
|
@ -139,10 +139,10 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked when a response HTTP header is available.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses must not have added the header to the {@link Response} object of the {@link HttpExchange}
|
||||
* prior invoking this method.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.HeaderListener}s and storing cookies.
|
||||
*
|
||||
* @param exchange the HTTP exchange
|
||||
|
@ -223,7 +223,7 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked after all response HTTP headers are available.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.HeadersListener}s.
|
||||
*
|
||||
* @param exchange the HTTP exchange
|
||||
|
@ -281,7 +281,7 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked when response HTTP content is available.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes case of decoding the content, if necessary, and notifying {@link org.eclipse.jetty.client.api.Response.ContentListener}s.
|
||||
*
|
||||
* @param exchange the HTTP exchange
|
||||
|
@ -356,7 +356,7 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked when the response is successful.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.SuccessListener}s and possibly
|
||||
* {@link org.eclipse.jetty.client.api.Response.CompleteListener}s (if the exchange is completed).
|
||||
*
|
||||
|
@ -397,7 +397,7 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Method to be invoked when the response is failed.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method takes care of notifying {@link org.eclipse.jetty.client.api.Response.FailureListener}s.
|
||||
*
|
||||
* @param failure the response failure
|
||||
|
@ -451,9 +451,9 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Resets this {@link HttpReceiver} state.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses should override (but remember to call {@code super}) to reset their own state.
|
||||
* <p />
|
||||
* <p>
|
||||
* Either this method or {@link #dispose()} is called.
|
||||
*/
|
||||
protected void reset()
|
||||
|
@ -463,9 +463,9 @@ public abstract class HttpReceiver
|
|||
|
||||
/**
|
||||
* Disposes this {@link HttpReceiver} state.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses should override (but remember to call {@code super}) to dispose their own state.
|
||||
* <p />
|
||||
* <p>
|
||||
* Either this method or {@link #reset()} is called.
|
||||
*/
|
||||
protected void dispose()
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* Utility class that handles HTTP redirects.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications can disable redirection via {@link Request#followRedirects(boolean)}
|
||||
* and then rely on this class to perform the redirect in a simpler way, for example:
|
||||
* <pre>
|
||||
|
|
|
@ -37,16 +37,16 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* the transport-specific code to send requests over the wire, implementing
|
||||
* {@link #sendHeaders(HttpExchange, HttpContent, Callback)} and
|
||||
* {@link #sendContent(HttpExchange, HttpContent, Callback)}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link HttpSender} governs two state machines.
|
||||
* <p />
|
||||
* <p>
|
||||
* The request state machine is updated by {@link HttpSender} as the various steps of sending a request
|
||||
* are executed, see {@link RequestState}.
|
||||
* At any point in time, a user thread may abort the request, which may (if the request has not been
|
||||
* completely sent yet) move the request state machine to {@link RequestState#FAILURE}.
|
||||
* The request state machine guarantees that the request steps are executed (by I/O threads) only if
|
||||
* the request has not been failed already.
|
||||
* <p />
|
||||
* <p>
|
||||
* The sender state machine is updated by {@link HttpSender} from three sources: deferred content notifications
|
||||
* (via {@link #onContent()}), 100-continue notifications (via {@link #proceed(HttpExchange, Throwable)})
|
||||
* and normal request send (via {@link #sendContent(HttpExchange, HttpContent, Callback)}).
|
||||
|
@ -392,7 +392,7 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
/**
|
||||
* Implementations should send the HTTP headers over the wire, possibly with some content,
|
||||
* in a single write, and notify the given {@code callback} of the result of this operation.
|
||||
* <p />
|
||||
* <p>
|
||||
* If there is more content to send, then {@link #sendContent(HttpExchange, HttpContent, Callback)}
|
||||
* will be invoked.
|
||||
*
|
||||
|
@ -404,11 +404,11 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
|
||||
/**
|
||||
* Implementations should send the content at the {@link HttpContent} cursor position over the wire.
|
||||
* <p />
|
||||
* <p>
|
||||
* The {@link HttpContent} cursor is advanced by {@link HttpSender} at the right time, and if more
|
||||
* content needs to be sent, this method is invoked again; subclasses need only to send the content
|
||||
* at the {@link HttpContent} cursor position.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is invoked one last time when {@link HttpContent#isConsumed()} is true and therefore
|
||||
* there is no actual content to send.
|
||||
* This is done to allow subclasses to write "terminal" bytes (such as the terminal chunk when the
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.jetty.io.ClientConnectionFactory;
|
|||
|
||||
/**
|
||||
* The configuration of the forward proxy to use with {@link org.eclipse.jetty.client.HttpClient}.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications add subclasses of {@link Proxy} to this configuration via:
|
||||
* <pre>
|
||||
* ProxyConfiguration proxyConfig = httpClient.getProxyConfiguration();
|
||||
|
|
|
@ -25,12 +25,12 @@ import org.eclipse.jetty.util.Attributes;
|
|||
|
||||
/**
|
||||
* {@link Authentication} represents a mechanism to authenticate requests for protected resources.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Authentication}s are added to an {@link AuthenticationStore}, which is then
|
||||
* {@link #matches(String, URI, String) queried} to find the right
|
||||
* {@link Authentication} mechanism to use based on its type, URI and realm, as returned by
|
||||
* {@code WWW-Authenticate} response headers.
|
||||
* <p />
|
||||
* <p>
|
||||
* If an {@link Authentication} mechanism is found, it is then
|
||||
* {@link #authenticate(Request, ContentResponse, HeaderInfo, Attributes) executed} for the given request,
|
||||
* returning an {@link Authentication.Result}, which is then stored in the {@link AuthenticationStore}
|
||||
|
@ -50,7 +50,7 @@ public interface Authentication
|
|||
/**
|
||||
* Executes the authentication mechanism for the given request, returning a {@link Result} that can be
|
||||
* used to actually authenticate the request via {@link Result#apply(Request)}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a request for {@code "/secure"} returns a {@link Result}, then the result may be used for other
|
||||
* requests such as {@code "/secure/foo"} or {@code "/secure/bar"}, unless those resources are protected
|
||||
* by other realms.
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.jetty.util.Promise;
|
|||
/**
|
||||
* {@link Connection} represent a connection to a {@link Destination} and allow applications to send
|
||||
* requests via {@link #send(Request, Response.CompleteListener)}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Connection}s are normally pooled by {@link Destination}s, but unpooled {@link Connection}s
|
||||
* may be created by applications that want to do their own connection management via
|
||||
* {@link Destination#newConnection(Promise)} and {@link Connection#close()}.
|
||||
|
@ -34,7 +34,7 @@ public interface Connection extends Closeable
|
|||
{
|
||||
/**
|
||||
* Sends a request with an associated response listener.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Request#send(Response.CompleteListener)} will eventually call this method to send the request.
|
||||
* It is exposed to allow applications to send requests via unpooled connections.
|
||||
*
|
||||
|
|
|
@ -27,13 +27,13 @@ import org.eclipse.jetty.client.util.PathContentProvider;
|
|||
|
||||
/**
|
||||
* {@link ContentProvider} provides a source of request content.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Implementations should return an {@link Iterator} over the request content.
|
||||
* If the request content comes from a source that needs to be closed (for
|
||||
* example, an {@link InputStream}), then the iterator implementation class
|
||||
* must implement {@link Closeable} and will be closed when the request is
|
||||
* completed (either successfully or failed).
|
||||
* <p/>
|
||||
* <p>
|
||||
* Applications should rely on utility classes such as {@link ByteBufferContentProvider}
|
||||
* or {@link PathContentProvider}.
|
||||
*/
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.eclipse.jetty.util.Promise;
|
|||
/**
|
||||
* {@link Destination} represents the triple made of the {@link #getScheme}, the {@link #getHost}
|
||||
* and the {@link #getPort}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Destination} holds a pool of {@link Connection}s, but allows to create unpooled
|
||||
* connections if the application wants full control over connection management via {@link #newConnection(Promise)}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link Destination}s may be obtained via {@link HttpClient#getDestination(String, String, int)}
|
||||
*/
|
||||
public interface Destination
|
||||
|
@ -51,7 +51,7 @@ public interface Destination
|
|||
/**
|
||||
* Creates asynchronously a new, unpooled, {@link Connection} that will be returned
|
||||
* at a later time through the given {@link Promise}.
|
||||
* <p />
|
||||
* <p>
|
||||
* Use {@link FuturePromise} to wait for the connection:
|
||||
* <pre>
|
||||
* Destination destination = ...;
|
||||
|
|
|
@ -386,14 +386,14 @@ public interface Request
|
|||
|
||||
/**
|
||||
* Sends this request and returns the response.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method should be used when a simple blocking semantic is needed, and when it is known
|
||||
* that the response content can be buffered without exceeding memory constraints.
|
||||
* <p />
|
||||
* <p>
|
||||
* For example, this method is not appropriate to download big files from a server; consider using
|
||||
* {@link #send(Response.CompleteListener)} instead, passing your own {@link Response.Listener} or a utility
|
||||
* listener such as {@link InputStreamResponseListener}.
|
||||
* <p />
|
||||
* <p>
|
||||
* The method returns when the {@link Response.CompleteListener complete event} is fired.
|
||||
*
|
||||
* @return a {@link ContentResponse} for this request
|
||||
|
|
|
@ -93,7 +93,7 @@ public interface Response
|
|||
/**
|
||||
* Callback method invoked when the response line containing HTTP version,
|
||||
* HTTP status code and reason has been received and parsed.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is the best approximation to detect when the first bytes of the response arrived to the client.
|
||||
*
|
||||
* @param response the response containing the response line data
|
||||
|
@ -193,9 +193,9 @@ public interface Response
|
|||
/**
|
||||
* Callback method invoked when the request <em><b>and</b></em> the response have been processed,
|
||||
* either successfully or not.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The {@code result} parameter contains the request, the response, and eventual failures.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Requests may complete <em>after</em> response, for example in case of big uploads that are
|
||||
* discarded or read asynchronously by the server.
|
||||
* This method is always invoked <em>after</em> {@link SuccessListener#onSuccess(Response)} or
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
* Jetty Client : Implementation and Core Classes
|
||||
*
|
||||
* This package provides APIs, utility classes and an implementation of an asynchronous HTTP client.
|
||||
* <p />
|
||||
* <p>
|
||||
* The core class is {@link org.eclipse.jetty.client.api.HttpClient}, which acts as a central configuration object (for example
|
||||
* for {@link org.eclipse.jetty.client.api.HttpClient#setIdleTimeout(long) idle timeouts}, {@link org.eclipse.jetty.client.api.HttpClient#setMaxConnectionsPerDestination(int)
|
||||
* max connections per destination}, etc.) and as a factory for {@link Request} objects.
|
||||
* <p />
|
||||
* <p>
|
||||
* The HTTP protocol is based on the request/response paradigm, a unit that in this implementation is called
|
||||
* <em>exchange</em> and is represented by {@link org.eclipse.jetty.client.api.HttpExchange}.
|
||||
* An initial request may trigger a sequence of exchanges with one or more servers, called a <em>conversation</em>
|
||||
|
@ -32,15 +32,15 @@
|
|||
* upon a request for a resource URI, the server replies with a redirect (for example with the 303 status code)
|
||||
* to another URI. This conversation is made of a first exchange made of the original request and its 303 response,
|
||||
* and of a second exchange made of the request for the new URI and its 200 response.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link org.eclipse.jetty.client.api.HttpClient} holds a number of {@link org.eclipse.jetty.client.api.HttpDestination destinations}, which in turn hold a number of
|
||||
* pooled {@link org.eclipse.jetty.client.api.HttpConnection connections}.
|
||||
* <p />
|
||||
* <p>
|
||||
* When a request is sent, its exchange is associated to a connection, either taken from an idle queue or created
|
||||
* anew, and when both the request and response are completed, the exchange is disassociated from the connection.
|
||||
* Conversations may span multiple connections on different destinations, and therefore are maintained at the
|
||||
* {@link org.eclipse.jetty.client.api.HttpClient} level.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications may decide to send the request and wait for the response in a blocking way, using
|
||||
* {@link org.eclipse.jetty.client.api.Request#send()}.
|
||||
* Alternatively, application may ask to be notified of response events asynchronously, using
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.B64Code;
|
|||
|
||||
/**
|
||||
* Implementation of the HTTP "Basic" authentication defined in RFC 2617.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications should create objects of this class and add them to the
|
||||
* {@link AuthenticationStore} retrieved from the {@link HttpClient}
|
||||
* via {@link HttpClient#getAuthenticationStore()}.
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.eclipse.jetty.client.api.ContentProvider;
|
|||
|
||||
/**
|
||||
* A {@link ContentProvider} for {@link ByteBuffer}s.
|
||||
* <p />
|
||||
* <p>
|
||||
* The position and limit of the {@link ByteBuffer}s passed to the constructor are not modified,
|
||||
* and each invocation of the {@link #iterator()} method returns a {@link ByteBuffer#slice() slice}
|
||||
* of the original {@link ByteBuffer}.
|
||||
|
|
|
@ -42,11 +42,11 @@ import org.eclipse.jetty.util.Callback;
|
|||
/**
|
||||
* A {@link ContentProvider} that allows to add content after {@link Request#send(Response.CompleteListener)}
|
||||
* has been called, therefore providing the request content at a later time.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link DeferredContentProvider} can only be used in conjunction with
|
||||
* {@link Request#send(Response.CompleteListener)} (and not with its blocking counterpart {@link Request#send()})
|
||||
* because it provides content asynchronously.
|
||||
* <p />
|
||||
* <p>
|
||||
* The deferred content is provided once and then fully consumed.
|
||||
* Invocations to the {@link #iterator()} method after the first will return an "empty" iterator
|
||||
* because the stream has been consumed on the first invocation.
|
||||
|
@ -55,13 +55,13 @@ import org.eclipse.jetty.util.Callback;
|
|||
* of of {@link #iterator()} returning the iterator provided by this
|
||||
* class on the first invocation, and an iterator on the bytes copied to the other location
|
||||
* for subsequent invocations.
|
||||
* <p />
|
||||
* <p>
|
||||
* Typical usage of {@link DeferredContentProvider} is in asynchronous proxies, where HTTP headers arrive
|
||||
* separately from HTTP content chunks.
|
||||
* <p />
|
||||
* <p>
|
||||
* The deferred content must be provided through {@link #offer(ByteBuffer)}, which can be invoked multiple
|
||||
* times, and when all content has been provided it must be signaled with a call to {@link #close()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* Example usage:
|
||||
* <pre>
|
||||
* HttpClient httpClient = ...;
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.jetty.util.TypeUtil;
|
|||
|
||||
/**
|
||||
* Implementation of the HTTP "Digest" authentication defined in RFC 2617.
|
||||
* <p />
|
||||
* <p>
|
||||
* Applications should create objects of this class and add them to the
|
||||
* {@link AuthenticationStore} retrieved from the {@link HttpClient}
|
||||
* via {@link HttpClient#getAuthenticationStore()}.
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.eclipse.jetty.client.api.Result;
|
|||
* A {@link BufferingResponseListener} that is also a {@link Future}, to allow applications
|
||||
* to block (indefinitely or for a timeout) until {@link #onComplete(Result)} is called,
|
||||
* or to {@link #cancel(boolean) abort} the request/response conversation.
|
||||
* <p />
|
||||
* <p>
|
||||
* Typical usage is:
|
||||
* <pre>
|
||||
* Request request = httpClient.newRequest(...)...;
|
||||
|
|
|
@ -33,20 +33,20 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* A {@link ContentProvider} for an {@link InputStream}.
|
||||
* <p />
|
||||
* <p>
|
||||
* The input stream is read once and therefore fully consumed.
|
||||
* Invocations to the {@link #iterator()} method after the first will return an "empty" iterator
|
||||
* because the stream has been consumed on the first invocation.
|
||||
* <p />
|
||||
* <p>
|
||||
* However, it is possible for subclasses to override {@link #onRead(byte[], int, int)} to copy
|
||||
* the content read from the stream to another location (for example a file), and be able to
|
||||
* support multiple invocations of {@link #iterator()}, returning the iterator provided by this
|
||||
* class on the first invocation, and an iterator on the bytes copied to the other location
|
||||
* for subsequent invocations.
|
||||
* <p />
|
||||
* <p>
|
||||
* It is possible to specify, at the constructor, a buffer size used to read content from the
|
||||
* stream, by default 4096 bytes.
|
||||
* <p />
|
||||
* <p>
|
||||
* The {@link InputStream} passed to the constructor is by default closed when is it fully
|
||||
* consumed (or when an exception is thrown while reading it), unless otherwise specified
|
||||
* to the {@link #InputStreamContentProvider(java.io.InputStream, int, boolean) constructor}.
|
||||
|
@ -87,7 +87,7 @@ public class InputStreamContentProvider implements ContentProvider, Callback, Cl
|
|||
* Callback method invoked just after having read from the stream,
|
||||
* but before returning the iteration element (a {@link ByteBuffer}
|
||||
* to the caller.
|
||||
* <p />
|
||||
* <p>
|
||||
* Subclasses may override this method to copy the content read from
|
||||
* the stream to another location (a file, or in memory if the content
|
||||
* is known to fit).
|
||||
|
@ -154,12 +154,12 @@ public class InputStreamContentProvider implements ContentProvider, Callback, Cl
|
|||
* means that stream reading must be performed by {@link #hasNext()}, which introduces a side-effect
|
||||
* on what is supposed to be a simple query method (with respect to the Query Command Separation
|
||||
* Principle).
|
||||
* <p />
|
||||
* <p>
|
||||
* Alternatively, we could return {@code true} from {@link #hasNext()} even if we don't know that
|
||||
* we will read -1, but then when {@link #next()} reads -1 it must return an empty buffer.
|
||||
* However this is problematic, since GETs with no content indication would become GET with chunked
|
||||
* content, and not understood by servers.
|
||||
* <p />
|
||||
* <p>
|
||||
* Therefore we need to make sure that {@link #hasNext()} does not perform any side effect (so that
|
||||
* it can be called multiple times) until {@link #next()} is called.
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
/**
|
||||
* Implementation of {@link Listener} that produces an {@link InputStream}
|
||||
* that allows applications to read the response content.
|
||||
* <p />
|
||||
* <p>
|
||||
* Typical usage is:
|
||||
* <pre>
|
||||
* InputStreamResponseListener listener = new InputStreamResponseListener();
|
||||
|
@ -60,12 +60,12 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* }
|
||||
* }
|
||||
* </pre>
|
||||
* <p />
|
||||
* <p>
|
||||
* The {@link HttpClient} implementation (the producer) will feed the input stream
|
||||
* asynchronously while the application (the consumer) is reading from it.
|
||||
* Chunks of content are maintained in a queue, and it is possible to specify a
|
||||
* maximum buffer size for the bytes held in the queue, by default 16384 bytes.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the consumer is faster than the producer, then the consumer will block
|
||||
* with the typical {@link InputStream#read()} semantic.
|
||||
* If the consumer is slower than the producer, then the producer will block
|
||||
|
@ -209,7 +209,7 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
|
||||
/**
|
||||
* Waits for the given timeout for the response to be available, then returns it.
|
||||
* <p />
|
||||
* <p>
|
||||
* The wait ends as soon as all the HTTP headers have been received, without waiting for the content.
|
||||
* To wait for the whole content, see {@link #await(long, TimeUnit)}.
|
||||
*
|
||||
|
@ -233,7 +233,7 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
/**
|
||||
* Waits for the given timeout for the whole request/response cycle to be finished,
|
||||
* then returns the corresponding result.
|
||||
* <p />
|
||||
* <p>
|
||||
*
|
||||
* @param timeout the time to wait
|
||||
* @param unit the timeout unit
|
||||
|
@ -252,7 +252,7 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
|
||||
/**
|
||||
* Returns an {@link InputStream} providing the response content bytes.
|
||||
* <p />
|
||||
* <p>
|
||||
* The method may be invoked only once; subsequent invocations will return a closed {@link InputStream}.
|
||||
*
|
||||
* @return an input stream providing the response content
|
||||
|
|
|
@ -33,11 +33,11 @@ import org.eclipse.jetty.util.Callback;
|
|||
/**
|
||||
* A {@link ContentProvider} that provides content asynchronously through an {@link OutputStream}
|
||||
* similar to {@link DeferredContentProvider}.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link OutputStreamContentProvider} can only be used in conjunction with
|
||||
* {@link Request#send(Response.CompleteListener)} (and not with its blocking counterpart {@link Request#send()})
|
||||
* because it provides content asynchronously.
|
||||
* <p />
|
||||
* <p>
|
||||
* The deferred content is provided once by writing to the {@link #getOutputStream() output stream}
|
||||
* and then fully consumed.
|
||||
* Invocations to the {@link #iterator()} method after the first will return an "empty" iterator
|
||||
|
@ -45,10 +45,10 @@ import org.eclipse.jetty.util.Callback;
|
|||
* However, it is possible for subclasses to support multiple invocations of {@link #iterator()}
|
||||
* by overriding {@link #write(ByteBuffer)} and {@link #close()}, copying the bytes and making them
|
||||
* available for subsequent invocations.
|
||||
* <p />
|
||||
* <p>
|
||||
* Content must be provided by writing to the {@link #getOutputStream() output stream}, that must be
|
||||
* {@link OutputStream#close() closed} when all content has been provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* Example usage:
|
||||
* <pre>
|
||||
* HttpClient httpClient = ...;
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* A {@link ContentProvider} for files using JDK 7's {@code java.nio.file} APIs.
|
||||
* <p />
|
||||
* <p>
|
||||
* It is possible to specify, at the constructor, a buffer size used to read content from the
|
||||
* stream, by default 4096 bytes.
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.jetty.client.api.ContentProvider;
|
|||
|
||||
/**
|
||||
* A {@link ContentProvider} for strings.
|
||||
* <p />
|
||||
* <p>
|
||||
* It is possible to specify, at the constructor, an encoding used to convert
|
||||
* the string into bytes, by default UTF-8.
|
||||
*/
|
||||
|
|
|
@ -40,11 +40,11 @@ import org.eclipse.jetty.proxy.ProxyServlet;
|
|||
|
||||
/**
|
||||
* Specific implementation of {@link ProxyServlet.Transparent} for FastCGI.
|
||||
* <p />
|
||||
* <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>
|
||||
* init-param.
|
||||
* <p />
|
||||
* <p>
|
||||
* This servlet accepts two additional init-params:
|
||||
* <ul>
|
||||
* <li><code>scriptRoot</code>, mandatory, that must be set to the directory where
|
||||
|
|
|
@ -37,11 +37,11 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
/**
|
||||
* Inspired by nginx's try_files functionality.
|
||||
* <p />
|
||||
* <p>
|
||||
* This filter accepts the <code>files</code> init-param as a list of space-separated
|
||||
* file URIs. The special token <code>$path</code> represents the current request URL's
|
||||
* path (the portion after the context path).
|
||||
* <p />
|
||||
* <p>
|
||||
* Typical example of how this filter can be configured is the following:
|
||||
* <pre>
|
||||
* <filter>
|
||||
|
@ -59,7 +59,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
* failing that it will forward the request to <code>index.php?p=/path/to/resource.ext</code>.
|
||||
* The last file URI specified in the list is therefore the "fallback" to which the request
|
||||
* is forwarded to in case no previous files can be found.
|
||||
* <p />
|
||||
* <p>
|
||||
* The files are resolved using {@link ServletContext#getResource(String)} to make sure
|
||||
* that only files visible to the application are served.
|
||||
*
|
||||
|
|
|
@ -50,7 +50,7 @@ public interface ClientConnectionFactory
|
|||
/**
|
||||
* Replaces the given {@code oldConnection} with the given {@code newConnection} on the
|
||||
* {@link EndPoint} associated with {@code oldConnection}, performing connection lifecycle management.
|
||||
* <p />
|
||||
* <p>
|
||||
* The {@code oldConnection} will be closed by invoking {@link org.eclipse.jetty.io.Connection#onClose()}
|
||||
* and the {@code newConnection} will be opened by invoking {@link org.eclipse.jetty.io.Connection#onOpen(ByteBuffer)}.
|
||||
* @param oldConnection the old connection to replace
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
|||
|
||||
/**
|
||||
* An Abstract implementation of an Idle Timeout.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This implementation is optimised that timeout operations are not cancelled on
|
||||
* every operation. Rather timeout are allowed to expire and a check is then made
|
||||
* to see when the last operation took place. If the idle timeout has not expired,
|
||||
|
|
|
@ -67,7 +67,7 @@ public interface NetworkTrafficListener
|
|||
/**
|
||||
* <p>Callback method invoked when a connection to a remote client has been closed.</p>
|
||||
* <p>The {@code socket} parameter is already closed when this method is called, so it
|
||||
* cannot be queried for socket address information of the remote client.<br />
|
||||
* cannot be queried for socket address information of the remote client.<br>
|
||||
* However, the {@code socket} parameter is the same object passed to {@link #opened(Socket)},
|
||||
* so it is possible to map socket information in {@link #opened(Socket)} and retrieve it
|
||||
* in this method.
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.eclipse.jetty.util.security.Credential;
|
|||
|
||||
/**
|
||||
* A LdapLoginModule for use with JAAS setups
|
||||
* <p/>
|
||||
* <p>
|
||||
* The jvm should be started with the following parameter:
|
||||
* <br><br>
|
||||
* <code>
|
||||
|
@ -137,7 +137,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
/**
|
||||
* name of the attribute that a users password is stored under
|
||||
* <p/>
|
||||
* <p>
|
||||
* NOTE: not always accessible, see force binding login
|
||||
*/
|
||||
private String _userPasswordAttribute = "userPassword";
|
||||
|
@ -185,10 +185,10 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
/**
|
||||
* get the available information about the user
|
||||
* <p/>
|
||||
* <p>
|
||||
* for this LoginModule, the credential can be null which will result in a
|
||||
* binding ldap authentication scenario
|
||||
* <p/>
|
||||
* <p>
|
||||
* roles are also an optional concept if required
|
||||
*
|
||||
* @param username
|
||||
|
@ -244,7 +244,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
/**
|
||||
* attempts to get the users credentials from the users context
|
||||
* <p/>
|
||||
* <p>
|
||||
* NOTE: this is not an user authenticated operation
|
||||
*
|
||||
* @param username
|
||||
|
@ -307,7 +307,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
/**
|
||||
* attempts to get the users roles from the root context
|
||||
* <p/>
|
||||
* <p>
|
||||
* NOTE: this is not an user authenticated operation
|
||||
*
|
||||
* @param dirContext
|
||||
|
@ -373,7 +373,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
/**
|
||||
* since ldap uses a context bind for valid authentication checking, we override login()
|
||||
* <p/>
|
||||
* <p>
|
||||
* if credentials are not available from the users context or if we are forcing the binding check
|
||||
* then we try a binding authentication check, otherwise if we have the users encoded password then
|
||||
* we can try authentication via that mechanic
|
||||
|
|
|
@ -181,7 +181,7 @@ public class LibExtClassLoaderHelper
|
|||
* depending too much directly on a particular logging framework.
|
||||
* <p>
|
||||
* We can afford to do some implementation specific code for a logging
|
||||
* framework only in a fragment. <br/>
|
||||
* framework only in a fragment. <br>
|
||||
* Trying to configure log4j and logback in here.
|
||||
* </p>
|
||||
* <p>
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.jetty.servlet.ServletHolder;
|
|||
|
||||
/**
|
||||
* RunAs
|
||||
* <p/>
|
||||
* <p>
|
||||
* Represents a <run-as> element in web.xml, or a runAs annotation.
|
||||
*/
|
||||
public class RunAs
|
||||
|
|
|
@ -180,7 +180,7 @@ public abstract class AbstractProxyServlet extends HttpServlet
|
|||
|
||||
/**
|
||||
* Creates a {@link HttpClient} instance, configured with init parameters of this servlet.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The init parameters used to configure the {@link HttpClient} instance are:
|
||||
* <table>
|
||||
* <thead>
|
||||
|
|
|
@ -134,7 +134,7 @@ public class ProxyServlet extends AbstractProxyServlet
|
|||
* <li>proxyTo - a mandatory URI like http://host:80/context to which the request is proxied.</li>
|
||||
* <li>prefix - an optional URI prefix that is stripped from the start of the forwarded URI.</li>
|
||||
* </ul>
|
||||
* <p/>
|
||||
* <p>
|
||||
* For example, if a request is received at "/foo/bar", the 'proxyTo' parameter is "http://host:80/context"
|
||||
* and the 'prefix' parameter is "/foo", then the request would be proxied to "http://host:80/context/bar".
|
||||
*/
|
||||
|
|
|
@ -24,13 +24,13 @@ import javax.servlet.http.HttpServletRequest;
|
|||
|
||||
/**
|
||||
* Customizes requests that lack the {@code Host} header (for example, HTTP 1.0 requests).
|
||||
* <p />
|
||||
* <p>
|
||||
* In case of HTTP 1.0 requests that lack the {@code Host} header, the application may issue
|
||||
* a redirect, and the {@code Location} header is usually constructed from the {@code Host}
|
||||
* header; if the {@code Host} header is missing, the server may query the connector for its
|
||||
* IP address in order to construct the {@code Location} header, and thus leak to clients
|
||||
* internal IP addresses.
|
||||
* <p />
|
||||
* <p>
|
||||
* This {@link HttpConfiguration.Customizer} is configured with a {@code serverName} and
|
||||
* optionally a {@code serverPort}.
|
||||
* If the {@code Host} header is absent, the configured {@code serverName} will be set on
|
||||
|
|
|
@ -659,7 +659,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
|||
/**
|
||||
* If a write or similar operation to this channel fails,
|
||||
* then this method should be called.
|
||||
* <p />
|
||||
* <p>
|
||||
* The standard implementation calls {@link HttpTransport#abort(Throwable)}.
|
||||
*
|
||||
* @param failure the failure that caused the abort.
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* {@link HttpInput} provides an implementation of {@link ServletInputStream} for {@link HttpChannel}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Content may arrive in patterns such as [content(), content(), messageComplete()] so that this class
|
||||
* maintains two states: the content state that tells whether there is content to consume and the EOF
|
||||
* state that tells whether an EOF has arrived.
|
||||
|
@ -398,7 +398,7 @@ public class HttpInput extends ServletInputStream implements Runnable
|
|||
/**
|
||||
* This method should be called to signal that an EOF has been
|
||||
* detected before all the expected content arrived.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Typically this will result in an EOFException being thrown
|
||||
* from a subsequent read rather than a -1 return.
|
||||
*/
|
||||
|
|
|
@ -39,11 +39,11 @@ public interface HttpTransport
|
|||
|
||||
/**
|
||||
* Aborts this transport.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method should terminate the transport in a way that
|
||||
* can indicate an abnormal response to the client, for example
|
||||
* by abruptly close the connection.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is called when an error response needs to be sent,
|
||||
* but the response is already committed, or when a write failure
|
||||
* is detected.
|
||||
|
|
|
@ -315,7 +315,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
|||
}
|
||||
|
||||
/**
|
||||
* Compute the field _contextHandler.<br/>
|
||||
* Compute the field _contextHandler.<br>
|
||||
* In the case where the DefaultServlet is deployed on the HttpService it is likely that
|
||||
* this method needs to be overwritten to unwrap the ServletContext facade until we reach
|
||||
* the original jetty's ContextHandler.
|
||||
|
|
|
@ -74,7 +74,7 @@ import org.eclipse.jetty.util.component.LifeCycle;
|
|||
* session and security handlers, et.<pre>
|
||||
* new ServletContext("/context",Context.SESSIONS|Context.NO_SECURITY);
|
||||
* </pre>
|
||||
* <p/>
|
||||
* <p>
|
||||
* This class should have been called ServletContext, but this would have
|
||||
* cause confusion with {@link ServletContext}.
|
||||
*/
|
||||
|
|
|
@ -50,11 +50,11 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* <ul>
|
||||
* <li><b>allowedOrigins</b>, a comma separated list of origins that are
|
||||
* allowed to access the resources. Default value is <b>*</b>, meaning all
|
||||
* origins.<br />
|
||||
* origins.<br>
|
||||
* If an allowed origin contains one or more * characters (for example
|
||||
* http://*.domain.com), then "*" characters are converted to ".*", "."
|
||||
* characters are escaped to "\." and the resulting allowed origin
|
||||
* interpreted as a regular expression.<br />
|
||||
* interpreted as a regular expression.<br>
|
||||
* Allowed origins can therefore be more complex expressions such as
|
||||
* https?://*.domain.[a-z]{3} that matches http or https, multiple subdomains
|
||||
* and any 3 letter top-level domain (.com, .net, .org, etc.).</li>
|
||||
|
|
|
@ -63,7 +63,7 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
|||
|
||||
/**
|
||||
* Denial of Service filter
|
||||
* <p/>
|
||||
* <p>
|
||||
* <p>
|
||||
* This filter is useful for limiting
|
||||
* exposure to abuse from request flooding, whether malicious, or as a result of
|
||||
|
@ -82,12 +82,12 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
|||
* implemented, in order to uniquely identify authenticated users.
|
||||
* <p>
|
||||
* The following init parameters control the behavior of the filter:<dl>
|
||||
* <p/>
|
||||
* <p>
|
||||
* <dt>maxRequestsPerSec</dt>
|
||||
* <dd>the maximum number of requests from a connection per
|
||||
* second. Requests in excess of this are first delayed,
|
||||
* then throttled.</dd>
|
||||
* <p/>
|
||||
* <p>
|
||||
* <dt>delayMs</dt>
|
||||
* <dd>is the delay given to all requests over the rate limit,
|
||||
* before they are considered at all. -1 means just reject request,
|
||||
|
@ -538,12 +538,12 @@ public class DoSFilter implements Filter
|
|||
* track of this connection's request rate. If this is not the first request
|
||||
* from this connection, return the existing object with the stored stats.
|
||||
* If it is the first request, then create a new request tracker.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Assumes that each connection has an identifying characteristic, and goes
|
||||
* through them in order, taking the first that matches: user id (logged
|
||||
* in), session id, client IP address. Unidentifiable connections are lumped
|
||||
* into one.
|
||||
* <p/>
|
||||
* <p>
|
||||
* When a session expires, its rate tracker is automatically deleted.
|
||||
*
|
||||
* @param request the current request
|
||||
|
|
|
@ -46,19 +46,19 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* Quality of Service Filter.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This filter limits the number of active requests to the number set by the "maxRequests" init parameter (default 10).
|
||||
* If more requests are received, they are suspended and placed on priority queues. Priorities are determined by
|
||||
* the {@link #getPriority(ServletRequest)} method and are a value between 0 and the value given by the "maxPriority"
|
||||
* init parameter (default 10), with higher values having higher priority.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This filter is ideal to prevent wasting threads waiting for slow/limited
|
||||
* resources such as a JDBC connection pool. It avoids the situation where all of a
|
||||
* containers thread pool may be consumed blocking on such a slow resource.
|
||||
* By limiting the number of active threads, a smaller thread pool may be used as
|
||||
* the threads are not wasted waiting. Thus more memory may be available for use by
|
||||
* the active threads.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Furthermore, this filter uses a priority when resuming waiting requests. So that if
|
||||
* a container is under load, and there are many requests waiting for resources,
|
||||
* the {@link #getPriority(ServletRequest)} method is used, so that more important
|
||||
|
@ -66,12 +66,12 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* maxRequest limit slightly smaller than the containers thread pool and a high priority
|
||||
* allocated to admin users. Thus regardless of load, admin users would always be
|
||||
* able to access the web application.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The maxRequest limit is policed by a {@link Semaphore} and the filter will wait a short while attempting to acquire
|
||||
* the semaphore. This wait is controlled by the "waitMs" init parameter and allows the expense of a suspend to be
|
||||
* avoided if the semaphore is shortly available. If the semaphore cannot be obtained, the request will be suspended
|
||||
* for the default suspend period of the container or the valued set as the "suspendMs" init parameter.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the "managedAttr" init parameter is set to true, then this servlet is set as a {@link ServletContext} attribute with the
|
||||
* filter name as the attribute name. This allows context external mechanism (eg JMX via {@link ContextHandler#MANAGED_ATTRIBUTES}) to
|
||||
* manage the configuration of the filter.
|
||||
|
@ -237,7 +237,7 @@ public class QoSFilter implements Filter
|
|||
|
||||
/**
|
||||
* Computes the request priority.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The default implementation assigns the following priorities:
|
||||
* <ul>
|
||||
* <li> 2 - for an authenticated request
|
||||
|
|
|
@ -43,21 +43,21 @@ import org.springframework.core.io.UrlResource;
|
|||
|
||||
/**
|
||||
* Spring ConfigurationProcessor
|
||||
* <p/>
|
||||
* <p>
|
||||
* A {@link ConfigurationProcessor} that uses a spring XML file to emulate the {@link XmlConfiguration} format.
|
||||
* <p/>
|
||||
* <p>
|
||||
* {@link XmlConfiguration} expects a primary object that is either passed in to a call to {@link #configure(Object)}
|
||||
* or that is constructed by a call to {@link #configure()}. This processor looks for a bean definition
|
||||
* with an id, name or alias of "Main" as uses that as the primary bean.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The objects mapped by {@link XmlConfiguration#getIdMap()} are set as singletons before any configuration calls
|
||||
* and if the spring configuration file contains a definition for the singleton id, the the singleton is updated
|
||||
* with a call to {@link XmlBeanFactory#configureBean(Object, String)}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The property map obtained via {@link XmlConfiguration#getProperties()} is set as a singleton called "properties"
|
||||
* and values can be accessed by somewhat verbose
|
||||
* usage of {@link org.springframework.beans.factory.config.MethodInvokingFactoryBean}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This processor is returned by the {@link SpringConfigurationProcessorFactory} for any XML document whos first
|
||||
* element is "beans". The factory is discovered by a {@link ServiceLoader} for {@link ConfigurationProcessorFactory}.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.eclipse.jetty.xml.XmlConfiguration;
|
|||
|
||||
/**
|
||||
* Spring ConfigurationProcessor Factory
|
||||
* <p/>
|
||||
* <p>
|
||||
* Create a {@link SpringConfigurationProcessor} for XML documents with a "beans" element.
|
||||
* The factory is discovered by a {@link java.util.ServiceLoader} for {@link ConfigurationProcessorFactory}.
|
||||
*
|
||||
|
|
|
@ -336,7 +336,7 @@ public class BaseHome
|
|||
* <p>
|
||||
* Notes:
|
||||
* <ul>
|
||||
* <li>FileSystem case sensitivity is implementation specific (eg: linux is case-sensitive, windows is case-insensitive).<br/>
|
||||
* <li>FileSystem case sensitivity is implementation specific (eg: linux is case-sensitive, windows is case-insensitive).<br>
|
||||
* See {@link java.nio.file.FileSystem#getPathMatcher(String)} for more details</li>
|
||||
* <li>Pattern slashes are implementation neutral (use '/' always and you'll be fine)</li>
|
||||
* <li>Recursive searching is limited to 30 levels deep (not configurable)</li>
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* JSON Parser and Generator.
|
||||
* <p />
|
||||
* <p>
|
||||
* This class provides some static methods to convert POJOs to and from JSON
|
||||
* notation. The mapping from JSON to java is:
|
||||
*
|
||||
|
@ -68,22 +68,22 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* The interface {@link JSON.Convertible} may be implemented by classes that
|
||||
* wish to externalize and initialize specific fields to and from JSON objects.
|
||||
* Only directed acyclic graphs of objects are supported.
|
||||
* <p />
|
||||
* <p>
|
||||
* The interface {@link JSON.Generator} may be implemented by classes that know
|
||||
* how to render themselves as JSON and the {@link #toString(Object)} method
|
||||
* will use {@link JSON.Generator#addJSON(Appendable)} to generate the JSON.
|
||||
* The class {@link JSON.Literal} may be used to hold pre-generated JSON object.
|
||||
* <p />
|
||||
* <p>
|
||||
* The interface {@link JSON.Convertor} may be implemented to provide static
|
||||
* converters for objects that may be registered with
|
||||
* {@link #registerConvertor(Class, Convertor)}.
|
||||
* These converters are looked up by class, interface and super class by
|
||||
* {@link #getConvertor(Class)}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a JSON object has a "class" field, then a java class for that name is
|
||||
* loaded and the method {@link #convertTo(Class,Map)} is used to find a
|
||||
* {@link JSON.Convertor} for that class.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a JSON object has a "x-class" field then a direct lookup for a
|
||||
* {@link JSON.Convertor} for that class name is done (without loading the class).
|
||||
*/
|
||||
|
|
|
@ -28,10 +28,10 @@ public interface OutgoingFrames
|
|||
{
|
||||
/**
|
||||
* A frame, and optional callback, intended for the network layer.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note: the frame can undergo many transformations in the various
|
||||
* layers and extensions present in the implementation.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If you are implementing a mutation, you are obliged to handle
|
||||
* the incoming WriteCallback appropriately.
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* 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 />
|
||||
* <p>
|
||||
* {@link org.eclipse.jetty.websocket.client.WebSocketClient} holds a number of {@link org.eclipse.jetty.websocket.api.Session Sessions}, which in turn
|
||||
* is used to manage physical vs virtual connection handling (mux extension).
|
||||
*/
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.eclipse.jetty.websocket.common.OpCode;
|
|||
|
||||
/**
|
||||
* Per Message Deflate Compression extension for WebSocket.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Attempts to follow <a href="https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-12">draft-ietf-hybi-permessage-compression-12</a>
|
||||
*/
|
||||
public class PerMessageDeflateExtension extends CompressExtension
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
|
||||
/**
|
||||
* Support class for reading a (single) WebSocket BINARY message via a InputStream.
|
||||
* <p/>
|
||||
* <p>
|
||||
* An InputStream that can access a queue of ByteBuffer payloads, along with expected InputStream blocking behavior.
|
||||
*/
|
||||
public class MessageInputStream extends InputStream implements MessageAppender
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.nio.charset.StandardCharsets;
|
|||
|
||||
/**
|
||||
* Support class for reading a (single) WebSocket TEXT message via a Reader.
|
||||
* <p/>
|
||||
* <p>
|
||||
* In compliance to the WebSocket spec, this reader always uses the UTF8 {@link Charset}.
|
||||
*/
|
||||
public class MessageReader extends InputStreamReader implements MessageAppender
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.websocket.common.frames.TextFrame;
|
|||
|
||||
/**
|
||||
* Support for writing a single WebSocket TEXT message via a {@link Writer}
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note: Per WebSocket spec, all WebSocket TEXT messages must be encoded in UTF-8
|
||||
*/
|
||||
public class MessageWriter extends Writer
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* <p>
|
||||
* A core set of internal implementation classes for the Jetty WebSocket API.
|
||||
* <p>
|
||||
* Note: do not reference or use classes present in this package space in your code. <br />
|
||||
* Note: do not reference or use classes present in this package space in your code. <br>
|
||||
* Restrict your usage to the Jetty WebSocket API classes, the Jetty WebSocket Client API,
|
||||
* or the Jetty WebSocket Servlet API.
|
||||
*/
|
||||
|
|
|
@ -48,7 +48,7 @@ import org.junit.Test;
|
|||
|
||||
/**
|
||||
* Client side behavioral tests for permessage-deflate extension.
|
||||
* <p/>
|
||||
* <p>
|
||||
* See: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-15
|
||||
*/
|
||||
public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
||||
|
@ -58,7 +58,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.4: Using a DEFLATE Block with BFINAL Set to 1
|
||||
*/
|
||||
@Test
|
||||
|
@ -78,7 +78,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.3: Using a DEFLATE Block with No Compression
|
||||
*/
|
||||
@Test
|
||||
|
@ -97,7 +97,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.1: A message compressed using 1 compressed DEFLATE block
|
||||
*/
|
||||
@Test
|
||||
|
@ -116,7 +116,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.1: A message compressed using 1 compressed DEFLATE block (with fragmentation)
|
||||
*/
|
||||
@Test
|
||||
|
@ -139,7 +139,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.2: Sharing LZ77 Sliding Window
|
||||
*/
|
||||
@Test
|
||||
|
@ -162,7 +162,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.2: Sharing LZ77 Sliding Window
|
||||
*/
|
||||
@Test
|
||||
|
@ -186,7 +186,7 @@ public class PerMessageDeflateExtensionTest extends AbstractExtensionTest
|
|||
|
||||
/**
|
||||
* Decode payload example as seen in draft-ietf-hybi-permessage-compression-15.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Section 8.2.3.5: Two DEFLATE Blocks in 1 Message
|
||||
*/
|
||||
@Test
|
||||
|
|
|
@ -524,7 +524,7 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc
|
|||
|
||||
/**
|
||||
* Upgrade the request/response to a WebSocket Connection.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This method will not normally return, but will instead throw a UpgradeConnectionException, to exit HTTP handling and initiate WebSocket handling of the
|
||||
* connection.
|
||||
*
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ServletUpgradeRequest extends UpgradeRequest
|
|||
|
||||
/**
|
||||
* Return the underlying HttpServletRequest that existed at Upgrade time.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note: many features of the HttpServletRequest are invalid when upgraded,
|
||||
* especially ones that deal with body content, streams, readers, and responses.
|
||||
*
|
||||
|
@ -151,7 +151,7 @@ public class ServletUpgradeRequest extends UpgradeRequest
|
|||
|
||||
/**
|
||||
* Return a {@link InetSocketAddress} for the local socket.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Warning: this can cause a DNS lookup
|
||||
*
|
||||
* @return the local socket address
|
||||
|
@ -230,7 +230,7 @@ public class ServletUpgradeRequest extends UpgradeRequest
|
|||
|
||||
/**
|
||||
* Return a {@link InetSocketAddress} for the remote socket.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Warning: this can cause a DNS lookup
|
||||
*
|
||||
* @return the remote socket address
|
||||
|
@ -252,7 +252,7 @@ public class ServletUpgradeRequest extends UpgradeRequest
|
|||
|
||||
/**
|
||||
* Return the HttpSession if it exists.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note: this is equivalent to {@link HttpServletRequest#getSession(boolean)}
|
||||
* and will not create a new HttpSession.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue