T
- 要素型 public abstract class AbstractDecoder<T> extends ObjectSE implements Decoder<T>
Decoder
実装の抽象基本クラス。修飾子 | コンストラクターと説明 |
---|---|
protected | AbstractDecoder(MimeType... supportedMimeTypes) |
修飾子と型 | メソッドと説明 |
---|---|
boolean | canDecode(ResolvableType elementType, MimeType mimeType) デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。 |
reactor.core.publisher.Mono<T> | decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer 入力ストリームを T の Mono にデコードします。 |
ListSE<MimeType> | getDecodableMimeTypes() このデコーダーでサポートされている MIME 型のリストを返します。 |
Log | getLogger() 現在設定されているロガーを返します。 |
void | setLogger(Log logger) クラス名に基づいたロガーよりも使用する代替ロガーを設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
decode, decode, getDecodableMimeTypes
protected Log logger
protected AbstractDecoder(MimeType... supportedMimeTypes)
public void setLogger(Log logger)
logger
- 使用するロガー public Log getLogger()
public ListSE<MimeType> getDecodableMimeTypes()
Decoder
canDecode(elementType, null)
を介して保護する必要があります。このリストでは、特定の要素型でのみサポートされている MIME 型を除外することもできます。または、Decoder.getDecodableMimeTypes(ResolvableType)
を使用してより正確なリストを作成します。Decoder<T>
の getDecodableMimeTypes
public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
Decoder
public reactor.core.publisher.Mono<T> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
Decoder
DataBuffer
入力ストリームを T
の Mono にデコードします。Decoder<T>
の decodeToMono
inputStream
- デコードする DataBuffer
入力ストリーム elementType
- 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
メソッドに渡されている必要があり、true
を返している必要があります。mimeType
- 入力ストリームに関連付けられた MIME 型 (オプション)hints
- デコード方法に関する追加情報