类 SynchronossPartHttpMessageReader
- java.lang.Object
- org.springframework.http.codec.LoggingCodecSupport
- org.springframework.http.codec.multipart.SynchronossPartHttpMessageReader
- 所有已实现的接口:
HttpMessageReader<Part>
public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implements HttpMessageReader<Part>
HttpMessageReader
for parsing"multipart/form-data"
requests to a stream ofPart
's using the Synchronoss NIO Multipart library.This reader can be provided to
MultipartHttpMessageReader
in order to aggregate all parts into a Map.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze, Rossen Stoyanchev, Arjen Poutsma, Brian Clozel
- 另请参阅:
- Synchronoss NIO Multipart,
MultipartHttpMessageReader
字段概要
从类继承的字段 org.springframework.http.codec.LoggingCodecSupport
logger
构造器概要
构造器 构造器 说明 SynchronossPartHttpMessageReader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
canRead(ResolvableType elementType, MediaType mediaType)
Whether the given object type is supported by this reader.long
getMaxDiskUsagePerPart()
Get theconfigured
maximum disk usage.int
getMaxInMemorySize()
Get theconfigured
maximum in-memory size.int
getMaxParts()
Return theconfigured
limit on the number of parts.List<MediaType>
getReadableMediaTypes()
Return theMediaType
's that this reader supports.reactor.core.publisher.Flux<Part>
read(ResolvableType elementType, ReactiveHttpInputMessage message, Map<String,Object> hints)
Read from the input message and encode to a stream of objects.reactor.core.publisher.Mono<Part>
readMono(ResolvableType elementType, ReactiveHttpInputMessage message, Map<String,Object> hints)
Read from the input message and encode to a single object.void
setMaxDiskUsagePerPart(long maxDiskUsagePerPart)
Configure the maximum amount of disk space allowed for file parts.void
setMaxInMemorySize(int byteCount)
Configure the maximum amount of memory that is allowed to use per part.void
setMaxParts(int maxParts)
Specify the maximum number of parts allowed in a given multipart request.从类继承的方法 org.springframework.http.codec.LoggingCodecSupport
isEnableLoggingRequestDetails, setEnableLoggingRequestDetails
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.http.codec.HttpMessageReader
read, readMono
构造器详细资料
SynchronossPartHttpMessageReader
public SynchronossPartHttpMessageReader()
方法详细资料
setMaxInMemorySize
public void setMaxInMemorySize(int byteCount)
Configure the maximum amount of memory that is allowed to use per part. When the limit is exceeded:- file parts are written to a temporary file.
- non-file parts are rejected with
DataBufferLimitException
.
By default this is set to 256K.
- 参数:
byteCount
- the in-memory limit in bytes; if set to -1 this limit is not enforced, and all parts may be written to disk and are limited only by themaxDiskUsagePerPart
property.- 从以下版本开始:
- 5.1.11
getMaxInMemorySize
public int getMaxInMemorySize()
Get theconfigured
maximum in-memory size.- 从以下版本开始:
- 5.1.11
setMaxDiskUsagePerPart
public void setMaxDiskUsagePerPart(long maxDiskUsagePerPart)
Configure the maximum amount of disk space allowed for file parts.By default this is set to -1.
- 参数:
maxDiskUsagePerPart
- the disk limit in bytes, or -1 for unlimited- 从以下版本开始:
- 5.1.11
getMaxDiskUsagePerPart
public long getMaxDiskUsagePerPart()
Get theconfigured
maximum disk usage.- 从以下版本开始:
- 5.1.11
setMaxParts
public void setMaxParts(int maxParts)
Specify the maximum number of parts allowed in a given multipart request.- 从以下版本开始:
- 5.1.11
getMaxParts
public int getMaxParts()
Return theconfigured
limit on the number of parts.- 从以下版本开始:
- 5.1.11
getReadableMediaTypes
public List<MediaType> getReadableMediaTypes()
从接口复制的说明:HttpMessageReader
Return theMediaType
's that this reader supports.- 指定者:
getReadableMediaTypes
在接口中HttpMessageReader<Part>
canRead
public boolean canRead(ResolvableType elementType, @Nullable MediaType mediaType)
从接口复制的说明:HttpMessageReader
Whether the given object type is supported by this reader.- 指定者:
canRead
在接口中HttpMessageReader<Part>
- 参数:
elementType
- the type of object to checkmediaType
- the media type for the read (possiblynull
)- 返回:
true
if readable,false
otherwise
read
public reactor.core.publisher.Flux<Part> read(ResolvableType elementType, ReactiveHttpInputMessage message, Map<String,Object> hints)
从接口复制的说明:HttpMessageReader
Read from the input message and encode to a stream of objects.- 指定者:
read
在接口中HttpMessageReader<Part>
- 参数:
elementType
- the type of objects in the stream which must have been previously checked viaHttpMessageReader.canRead(ResolvableType, MediaType)
message
- the message to read fromhints
- additional information about how to read and decode the input- 返回:
- the decoded stream of elements
readMono
public reactor.core.publisher.Mono<Part> readMono(ResolvableType elementType, ReactiveHttpInputMessage message, Map<String,Object> hints)
从接口复制的说明:HttpMessageReader
Read from the input message and encode to a single object.- 指定者:
readMono
在接口中HttpMessageReader<Part>
- 参数:
elementType
- the type of objects in the stream which must have been previously checked viaHttpMessageReader.canRead(ResolvableType, MediaType)
message
- the message to read fromhints
- additional information about how to read and decode the input- 返回:
- the decoded object