类 PartGenerator.State
java.lang.Object
cn.taketoday.http.codec.multipart.PartGenerator.State
- 直接已知子类:
PartGenerator.CreateFileState,PartGenerator.DisposedState,PartGenerator.FormFieldState,PartGenerator.IdleFileState,PartGenerator.InitialState,PartGenerator.InMemoryState,PartGenerator.StreamingState,PartGenerator.WritingFileState
- 封闭类:
- PartGenerator
Represents the internal state of the
PartGenerator for
creating a single Part.
PartGenerator.State instances are stateful, and created when a new
MultipartParser.HeadersToken is accepted (see
PartGenerator.newPart(State, HttpHeaders).
The following rules determine which state the creator will have:
- If the part is a form field,
the creator will be in the
PartGenerator.FormFieldState. - If PartGenerator.streaming is enabled, the creator will be in the
PartGenerator.StreamingState. - Otherwise, the creator will initially be in the
PartGenerator.InMemoryState, but will switch over toPartGenerator.CreateFileStatewhen the part byte count exceedsPartGenerator.maxInMemorySize, then toPartGenerator.WritingFileState(to write the memory contents), and finallyPartGenerator.IdleFileState, which switches back toPartGenerator.WritingFileStatewhen more body data comes in.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) abstract voidapplyBody(cn.taketoday.core.io.buffer.DataBuffer dataBuffer) Invoked when aMultipartParser.BodyTokenis received.(专用程序包) voiddispose()Cleans up any state.(专用程序包) voidInvoked when an error has been received.(专用程序包) voidInvoked when all tokens for the part have been received.
-
构造器详细资料
-
State
private State()
-
-
方法详细资料
-
applyBody
abstract void applyBody(cn.taketoday.core.io.buffer.DataBuffer dataBuffer) Invoked when aMultipartParser.BodyTokenis received. -
onComplete
void onComplete()Invoked when all tokens for the part have been received. -
error
Invoked when an error has been received. -
dispose
void dispose()Cleans up any state.
-