@ConfigurationProperties(value="multipart") public static class HttpServerConfiguration.MultipartConfiguration extends java.lang.Object implements Toggleable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_DISK
The default disk value.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static long |
DEFAULT_MAX_FILE_SIZE
The default max file size.
|
static boolean |
DEFAULT_MIXED
The default mixed value.
|
static long |
DEFAULT_THRESHOLD
The default threshold value.
|
Constructor and Description |
---|
MultipartConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.io.File> |
getLocation() |
long |
getMaxFileSize() |
long |
getThreshold() |
boolean |
isDisk() |
boolean |
isEnabled() |
boolean |
isMixed() |
void |
setDisk(boolean disk)
Sets whether to buffer data to disk or not.
|
void |
setEnabled(boolean enabled)
Sets whether multipart processing is enabled.
|
void |
setLocation(java.io.File location)
Sets the location to store files.
|
void |
setMaxFileSize(long maxFileSize)
Sets the max file size.
|
void |
setMixed(boolean mixed)
Sets whether to buffer data to disk if the size is greater than the
threshold.
|
void |
setThreshold(long threshold)
Sets the amount of data that should be received that will trigger
the data to be stored to disk.
|
public static final boolean DEFAULT_ENABLED
public static final long DEFAULT_MAX_FILE_SIZE
public static final boolean DEFAULT_DISK
public static final boolean DEFAULT_MIXED
public static final long DEFAULT_THRESHOLD
public java.util.Optional<java.io.File> getLocation()
public long getMaxFileSize()
public boolean isEnabled()
isEnabled
in interface Toggleable
public boolean isDisk()
public boolean isMixed()
public long getThreshold()
public void setLocation(java.io.File location)
location
- The locationpublic void setMaxFileSize(@ReadableBytes long maxFileSize)
maxFileSize
- The max file sizepublic void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic void setDisk(boolean disk)
disk
- True if data should be written to diskpublic void setMixed(boolean mixed)
mixed
- True if data should be written to disk after a threshold.public void setThreshold(@ReadableBytes long threshold)
threshold
- The threshold