Add @Since 5.0 and package-info for reactive classes
This commit is contained in:
@@ -23,6 +23,7 @@ import org.springframework.util.Assert;
|
||||
* additional attributes expected in the "Set-Cookie" response header.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>
|
||||
*/
|
||||
public class HttpCookie {
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.core.io.buffer.DataBuffer;
|
||||
* on the client-side.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ReactiveHttpInputMessage extends HttpMessage {
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.core.io.buffer.FlushingDataBuffer;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ReactiveHttpOutputMessage extends HttpMessage {
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* static method.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @see <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>
|
||||
*/
|
||||
public final class ResponseCookie extends HttpCookie {
|
||||
|
||||
@@ -25,6 +25,7 @@ import reactor.core.publisher.Mono;
|
||||
* file transfers.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see <a href="https://en.wikipedia.org/wiki/Zero-copy">Zero-copy</a>
|
||||
*/
|
||||
public interface ZeroCopyHttpOutputMessage extends ReactiveHttpOutputMessage {
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public abstract class AbstractClientHttpRequest implements ClientHttpRequest {
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.http.HttpMethod;
|
||||
* to send the actual {@link ClientHttpRequest} and receive the {@link ClientHttpResponse}
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ClientHttpConnector {
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ClientHttpRequest extends ReactiveHttpOutputMessage {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* Represents a reactive client-side HTTP response.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ClientHttpResponse extends ReactiveHttpInputMessage {
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import reactor.core.publisher.Mono;
|
||||
* Reactor-Netty implementation of {@link ClientHttpConnector}
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ReactorClientHttpConnector implements ClientHttpConnector {
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.http.HttpMethod;
|
||||
* {@link ClientHttpRequest} implementation for the Reactor-Netty HTTP client
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @see reactor.io.netty.http.HttpClient
|
||||
*/
|
||||
public class ReactorClientHttpRequest extends AbstractClientHttpRequest {
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* {@link ClientHttpResponse} implementation for the Reactor-Netty HTTP client
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @see reactor.io.netty.http.HttpClient
|
||||
*/
|
||||
public class ReactorClientHttpResponse implements ClientHttpResponse {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Core package of the reactive client HTTP support.
|
||||
* Provides {@link org.springframework.http.client.reactive.ClientHttpRequest}
|
||||
* and {@link org.springframework.http.client.reactive.ClientHttpResponse}
|
||||
* interfaces and their implementations
|
||||
* Abstractions for reactive HTTP client support including
|
||||
* {@link org.springframework.http.client.reactive.ClientHttpRequest} and
|
||||
* {@link org.springframework.http.client.reactive.ClientHttpResponse} as well as a
|
||||
* {@link org.springframework.http.client.reactive.ClientHttpConnector}.
|
||||
*/
|
||||
package org.springframework.http.client.reactive;
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.http.codec.SseEventEncoder;
|
||||
* {@code SseEmitter} type. It allows to send Server-Sent Events in a reactive way.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
* @see SseEventEncoder
|
||||
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.util.MimeType;
|
||||
* An encoder for {@link SseEvent}s that also supports any other kind of {@link Object}
|
||||
* (in that case, the object will be the data of the {@link SseEvent}).
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
public class SseEventEncoder extends AbstractEncoder<Object> {
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.MimeType;
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
*
|
||||
* @since 5.0
|
||||
* @see JacksonJsonEncoder
|
||||
*/
|
||||
public class JacksonJsonDecoder extends AbstractDecoder<Object> {
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.util.MimeType;
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see JacksonJsonDecoder
|
||||
*/
|
||||
public class JacksonJsonEncoder extends AbstractEncoder<Object> {
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.springframework.util.MimeType;
|
||||
* Based on <a href="https://github.com/netty/netty/blob/master/codec/src/main/java/io/netty/handler/codec/json/JsonObjectDecoder.java">Netty JsonObjectDecoder</a>
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
class JsonObjectDecoder extends AbstractDecoder<DataBuffer> {
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* JSON encoder and decoder support.
|
||||
*/
|
||||
package org.springframework.http.codec.json;
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* {@link org.springframework.core.codec.Encoder} and
|
||||
* {@link org.springframework.core.codec.Decoder} implementations for web use.
|
||||
*/
|
||||
package org.springframework.http.codec;
|
||||
@@ -48,6 +48,7 @@ import org.springframework.util.xml.StaxUtils;
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see Jaxb2Encoder
|
||||
*/
|
||||
public class Jaxb2Decoder extends AbstractDecoder<Object> {
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.util.MimeTypeUtils;
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see Jaxb2Decoder
|
||||
*/
|
||||
public class Jaxb2Encoder extends AbstractSingleValueEncoder<Object> {
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
final class JaxbContextContainer {
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ import org.springframework.util.MimeTypeUtils;
|
||||
* decoders who are.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public class XmlEventDecoder extends AbstractDecoder<XMLEvent> {
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* XML encoder and decoder support.
|
||||
*/
|
||||
package org.springframework.http.codec.xml;
|
||||
@@ -40,6 +40,7 @@ import org.springframework.http.ReactiveHttpOutputMessage;
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class CodecHttpMessageConverter<T> implements HttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.http.ReactiveHttpOutputMessage;
|
||||
* Strategy interface that specifies a converter that can convert from and to HTTP
|
||||
* requests and responses.
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface HttpMessageConverter<T> {
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.util.ResourceUtils;
|
||||
* {@link Resource Resources} and supports byte range requests.
|
||||
**
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ResourceHttpMessageConverter extends CodecHttpMessageConverter<Resource> {
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* {@link org.springframework.http.converter.reactive.HttpMessageConverter}
|
||||
* and implementations for use with reactive
|
||||
* {@link org.springframework.core.codec.Encoder} and
|
||||
* {@link org.springframework.core.codec.Decoder} implementations.
|
||||
*/
|
||||
package org.springframework.http.converter.reactive;
|
||||
@@ -38,6 +38,7 @@ import org.springframework.core.io.buffer.DataBuffer;
|
||||
* and Undertow support.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see ServletServerHttpRequest
|
||||
* @see UndertowHttpHandlerAdapter
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
|
||||
* event-listener APIs and Reactive Streams. Specifically, base class for the Servlet 3.1
|
||||
* and Undertow support.
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
* @see ServletServerHttpRequest
|
||||
* @see UndertowHttpHandlerAdapter
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.util.StringUtils;
|
||||
* Common base class for {@link ServerHttpRequest} implementations.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
public abstract class AbstractServerHttpResponse implements ServerHttpResponse {
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ChannelSendOperator<T> extends MonoSource<T, Void> {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import reactor.core.publisher.Mono;
|
||||
* Contract for handling HTTP requests in a non-blocking way.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface HttpHandler {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ReactorHttpHandlerAdapter
|
||||
implements ChannelHandler<ByteBuf, ByteBuf, HttpChannel> {
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* Adapt {@link ServerHttpRequest} to the Reactor Net {@link HttpChannel}.
|
||||
*
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ReactorServerHttpRequest extends AbstractServerHttpRequest {
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Stephane Maldini
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ReactorServerHttpResponse extends AbstractServerHttpResponse
|
||||
implements ZeroCopyHttpOutputMessage {
|
||||
|
||||
@@ -29,6 +29,7 @@ import reactor.core.util.BackpressureUtils;
|
||||
/**
|
||||
* Publisher returned from {@link ServerHttpResponse#writeWith(Publisher)}.
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
class ResponseBodyWriteResultPublisher implements Publisher<Void> {
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class RxNettyHttpHandlerAdapter implements RequestHandler<ByteBuf, ByteBuf> {
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
*/
|
||||
public class RxNettyServerHttpRequest extends AbstractServerHttpRequest {
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Stephane Maldini
|
||||
* @since 5.0
|
||||
*/
|
||||
public class RxNettyServerHttpResponse extends AbstractServerHttpResponse {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* Represents a reactive server-side HTTP request
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ServerHttpRequest extends HttpRequest, ReactiveHttpInputMessage {
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ServerHttpResponse extends ReactiveHttpOutputMessage {
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@WebServlet(asyncSupported = true)
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* Adapt {@link ServerHttpRequest} to the Servlet {@link HttpServletRequest}.
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Adapt {@link ServerHttpResponse} to the Servlet {@link HttpServletResponse}.
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ServletServerHttpResponse extends AbstractServerHttpResponse {
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.util.Assert;
|
||||
* @author Marek Hawrylczak
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public class UndertowHttpHandlerAdapter implements io.undertow.server.HttpHandler {
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.springframework.util.MultiValueMap;
|
||||
*
|
||||
* @author Marek Hawrylczak
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class UndertowServerHttpRequest extends AbstractServerHttpRequest {
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.springframework.util.Assert;
|
||||
* @author Marek Hawrylczak
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
*/
|
||||
public class UndertowServerHttpResponse extends AbstractServerHttpResponse
|
||||
implements ZeroCopyHttpOutputMessage {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
/**
|
||||
* Core package of the reactive server-side HTTP support.
|
||||
* Abstractions for reactive HTTP server support including a
|
||||
* {@link org.springframework.http.server.reactive.ServerHttpRequest} and
|
||||
* {@link org.springframework.http.server.reactive.ServerHttpResponse} along with an
|
||||
* {@link org.springframework.http.server.reactive.HttpHandler} for processing.
|
||||
*
|
||||
* <p>Also provides implementations adapting to different runtimes
|
||||
* including Servlet 3.1 containers, Netty + Reactor IO or RxNetty, and Undertow.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.util.MultiValueMap;
|
||||
* {@code Publisher<DataBuffer>} to be written to the actual HTTP client request.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ClientWebRequest {
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package org.springframework.web.client.reactive;
|
||||
* Build {@link ClientWebRequest}s
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ClientWebRequestBuilder {
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.http.HttpMethod;
|
||||
* Static factory methods for {@link DefaultClientWebRequestBuilder ClientWebRequestBuilders}
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public abstract class ClientWebRequestBuilders {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ package org.springframework.web.client.reactive;
|
||||
*
|
||||
* @author Rob Winch
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @see DefaultClientWebRequestBuilder#apply(ClientWebRequestPostProcessor)
|
||||
*/
|
||||
public interface ClientWebRequestPostProcessor {
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.web.util.UriTemplateHandler;
|
||||
* <p>See static factory methods in {@link ClientWebRequestBuilders}
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @see ClientWebRequestBuilders
|
||||
*/
|
||||
public class DefaultClientWebRequestBuilder implements ClientWebRequestBuilder {
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.http.converter.reactive.HttpMessageConverter;
|
||||
* <p>See static factory methods in {@link ResponseExtractors}.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ResponseExtractor<T> {
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import reactor.core.publisher.Mono;
|
||||
* {@link Mono} API.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ResponseExtractors {
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ import reactor.core.publisher.Mono;
|
||||
* </ul>
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @see ClientWebRequestBuilders
|
||||
* @see ResponseExtractors
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
* it encounters client-side errors.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class WebClientException extends NestedRuntimeException {
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.http.HttpStatus;
|
||||
* {@link WebClient} request.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebResponseActions {
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Provides a reactive {@link org.springframework.web.client.reactive.WebClient}
|
||||
* that builds on top of the
|
||||
* {@link org.springframework.http.client.reactive reactive HTTP adapter} layer.
|
||||
*/
|
||||
package org.springframework.web.client.reactive;
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Support classes for the reactive WebClient.
|
||||
*/
|
||||
package org.springframework.web.client.reactive.support;
|
||||
@@ -25,6 +25,7 @@ import org.springframework.http.MediaType;
|
||||
* Exception for errors that fit response status 415 (unsupported media type).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MediaTypeNotSupportedStatusException extends ResponseStatusException {
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.util.Assert;
|
||||
* Exception for errors that fit response status 405 (method not allowed).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MethodNotAllowedException extends ResponseStatusException {
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.http.MediaType;
|
||||
* Exception for errors that fit response status 405 (not acceptable).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class NotAcceptableStatusException extends ResponseStatusException {
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.util.Assert;
|
||||
* Base class for exceptions associated with specific HTTP response status codes.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ResponseStatusException extends NestedRuntimeException {
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.http.HttpStatus;
|
||||
* an optional {@link MethodParameter} if related to the error).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerErrorException extends ResponseStatusException {
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
* related properties and features such as request attributes.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ServerWebExchange {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.http.HttpStatus;
|
||||
* an optional {@link MethodParameter} if related to the error).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerWebInputException extends ResponseStatusException {
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.http.MediaType;
|
||||
* Exception for errors that fit response status 416 (unsupported media type).
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class UnsupportedMediaTypeStatusException extends ResponseStatusException {
|
||||
|
||||
@@ -21,6 +21,7 @@ import reactor.core.publisher.Mono;
|
||||
* Contract for handling exceptions during web server exchange processing.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebExceptionHandler {
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import reactor.core.publisher.Mono;
|
||||
* as security, timeouts, and others.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebFilter {
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import reactor.core.publisher.Mono;
|
||||
* Contract to allow a {@link WebFilter} to delegate to the next in the chain.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebFilterChain {
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
||||
* also optionally configuring one or more filters and/or exception handlers.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebHandler {
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import reactor.core.publisher.Mono;
|
||||
* A session may also be created explicitly via {@link #start()}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebSession {
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.web.server.session.WebSessionManager;
|
||||
* Default implementation of {@link ServerWebExchange}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class DefaultServerWebExchange implements ServerWebExchange {
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.web.server.session.WebSessionManager;
|
||||
* then invokes the target {@code WebHandler}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class HttpWebHandlerAdapter extends WebHandlerDecorator implements HttpHandler {
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.springframework.web.server.session.WebSessionManager;
|
||||
* </pre>
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class WebHttpHandlerBuilder {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Implementation support to adapt
|
||||
* {@link org.springframework.web.server Spring web server} to the underlying
|
||||
* {@link org.springframework.http.server.reactive HTTP server} layer.
|
||||
* Implementations to adapt to the underlying
|
||||
* {@link org.springframework.http.client.reactive reactive HTTP adapter}
|
||||
* and {@link org.springframework.http.server.reactive.HttpHandler}.
|
||||
*/
|
||||
package org.springframework.web.server.adapter;
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* exception handling with one or more {@link WebExceptionHandler} instances.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class ExceptionHandlingWebHandler extends WebHandlerDecorator {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* to the target {@link WebHandler}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class FilteringWebHandler extends WebHandlerDecorator {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* {@link WebHandler} that decorates and delegates to another.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class WebHandlerDecorator implements WebHandler {
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* Provides WebHandler implementations.
|
||||
* Provides common WebHandler implementations and a
|
||||
* {@link org.springframework.web.server.handler.WebHandlerDecorator}.
|
||||
*/
|
||||
package org.springframework.web.server.handler;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/**
|
||||
* Foundational Spring web server support.
|
||||
* Core interfaces and classes for Spring's generic, reactive web support.
|
||||
* Builds on top of
|
||||
* {@link org.springframework.http.client.reactive reactive HTTP adapter} layer
|
||||
* providing additional constructs such as WebHandler, WebFilter, WebSession
|
||||
* among others.
|
||||
*/
|
||||
package org.springframework.web.server;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.web.server.WebSession;
|
||||
* for example by implementations of {@link WebSessionManager}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ConfigurableWebSession extends WebSession {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* Cookie-based {@link WebSessionIdResolver}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class CookieWebSessionIdResolver implements WebSessionIdResolver {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class DefaultWebSession implements ConfigurableWebSession, Serializable {
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.web.server.WebSession;
|
||||
* session id resolution strategy and simple in-memory session persistence.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class DefaultWebSessionManager implements WebSessionManager {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.web.server.WebSession;
|
||||
* Simple Map-based storage for {@link WebSession} instances.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class InMemoryWebSessionStore implements WebSessionStore {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* client through the response.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @see CookieWebSessionIdResolver
|
||||
*/
|
||||
public interface WebSessionIdResolver {
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.web.server.WebSession;
|
||||
* underlying concerns related to the management of web sessions.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @see WebSessionIdResolver
|
||||
* @see WebSessionStore
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.server.WebSession;
|
||||
* Strategy for {@link WebSession} persistence.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface WebSessionStore {
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* Web session support.
|
||||
* Auxiliary interfaces and implementation classes for
|
||||
* {@link org.springframework.web.server.WebSession} support.
|
||||
*/
|
||||
package org.springframework.web.server.session;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* A helper class to obtain the lookup path for path matching purposes.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
*/
|
||||
public class HttpRequestPathHelper {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user