T
- デコードされた出力ストリーム内のオブジェクトの型 public class DecoderHttpMessageReader<T> extends java.lang.Object implements HttpMessageReader<T>
Decoder
に委譲する HttpMessageReader
。 また、リクエストやコントローラーメソッドのパラメーターアノテーションなど、サーバー側で利用可能な追加情報からデコードヒントを事前に解決する HttpMessageReader
。
コンストラクターと説明 |
---|
DecoderHttpMessageReader(Decoder<T> decoder) 指定された Decoder をラップするインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
boolean | canRead(ResolvableType elementType, MediaType mediaType) 指定されたオブジェクト型がこのリーダーでサポートされているかどうか。 |
protected MediaType | getContentType(HttpMessage inputMessage) "Content-Type" ヘッダーに基づいて HTTP メッセージの Content-Type を決定するか、デフォルトで MediaType.APPLICATION_OCTET_STREAM に設定します。 |
Decoder<T> | getDecoder() このリーダーの Decoder を返します。 |
java.util.List<MediaType> | getReadableMediaTypes() このリーダーがサポートする MediaType を返します。 |
protected java.util.Map<java.lang.String,java.lang.Object> | getReadHints(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response) たとえば、サーバーリクエストまたはコントローラーメソッドパラメーターからのアノテーションに基づいて、デコードの追加のヒントを取得します。 |
reactor.core.publisher.Flux<T> | read(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints) 入力メッセージから読み取り、オブジェクトのストリームにエンコードします。 |
reactor.core.publisher.Flux<T> | read(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response, java.util.Map<java.lang.String,java.lang.Object> hints) 追加のコンテキストが利用可能な、 HttpMessageReader.read(ResolvableType, ReactiveHttpInputMessage, Map) のサーバー側のみの代替。 |
reactor.core.publisher.Mono<T> | readMono(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints) 入力メッセージから読み取り、単一のオブジェクトにエンコードします。 |
reactor.core.publisher.Mono<T> | readMono(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response, java.util.Map<java.lang.String,java.lang.Object> hints) 追加のコンテキストを使用できる、 HttpMessageReader.readMono(ResolvableType, ReactiveHttpInputMessage, Map) のサーバー側のみの代替。 |
public java.util.List<MediaType> getReadableMediaTypes()
HttpMessageReader
MediaType
を返します。HttpMessageReader<T>
の getReadableMediaTypes
public boolean canRead(ResolvableType elementType, @Nullable MediaType mediaType)
HttpMessageReader
HttpMessageReader<T>
の canRead
elementType
- チェックするオブジェクトの型 mediaType
- 読み取り用のメディア型 (おそらく null
)true
、そうでない場合は false
public reactor.core.publisher.Flux<T> read(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
HttpMessageReader<T>
の read
elementType
- HttpMessageReader.canRead(ResolvableType, MediaType)
を介して事前にチェックされている必要があるストリーム内のオブジェクトの型 message
- 読み取るメッセージ hints
- 入力の読み取りおよびデコード方法に関する追加情報 public reactor.core.publisher.Mono<T> readMono(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
HttpMessageReader<T>
の readMono
elementType
- HttpMessageReader.canRead(ResolvableType, MediaType)
を介して事前にチェックされている必要があるストリーム内のオブジェクトの型 message
- 読み取るメッセージ hints
- 入力の読み取りおよびデコード方法に関する追加情報 @Nullable protected MediaType getContentType(HttpMessage inputMessage)
MediaType.APPLICATION_OCTET_STREAM
に設定します。inputMessage
- HTTP メッセージ null
。public reactor.core.publisher.Flux<T> read(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
HttpMessageReader.read(ResolvableType, ReactiveHttpInputMessage, Map)
のサーバー側のみの代替。HttpMessageReader<T>
の read
actualType
- ターゲットメソッドパラメーターの実際の型。アノテーション付きコントローラーの場合、MethodParameter
には ResolvableType.getSource()
を介してアクセスできます。elementType
- 出力ストリーム内のオブジェクトの型 request
- 現在のリクエスト response
- 現在のレスポンス hints
- 本文の読み方に関する追加情報 public reactor.core.publisher.Mono<T> readMono(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
HttpMessageReader.readMono(ResolvableType, ReactiveHttpInputMessage, Map)
のサーバー側のみの代替。HttpMessageReader<T>
の readMono
actualType
- ターゲットメソッドパラメーターの実際の型。アノテーション付きコントローラーの場合、MethodParameter
には ResolvableType.getSource()
を介してアクセスできます。elementType
- 出力ストリーム内のオブジェクトの型 request
- 現在のリクエスト response
- 現在のレスポンス hints
- 本文の読み方に関する追加情報 protected java.util.Map<java.lang.String,java.lang.Object> getReadHints(ResolvableType actualType, ResolvableType elementType, ServerHttpRequest request, ServerHttpResponse response)
HttpMessageDecoder
のインスタンスである場合はデコーダーに委譲します。