类 PartGenerator

java.lang.Object
reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
cn.taketoday.http.codec.multipart.PartGenerator
所有已实现的接口:
org.reactivestreams.Subscriber<MultipartParser.Token>, org.reactivestreams.Subscription, reactor.core.CoreSubscriber<MultipartParser.Token>, reactor.core.Disposable

final class PartGenerator extends reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
Subscribes to a token stream (i.e. the result of MultipartParser.parse(Flux, byte[], int, Charset), and produces a flux of Part objects.
从以下版本开始:
4.0
作者:
Arjen Poutsma
  • 字段详细资料

    • log

      private static final cn.taketoday.logging.Logger log
    • sink

      private final reactor.core.publisher.MonoSink<Part> sink
    • requestOutstanding

      private final AtomicBoolean requestOutstanding
    • state

      private final AtomicReference<PartGenerator.State> state
    • streaming

      private final boolean streaming
    • maxInMemorySize

      private final int maxInMemorySize
    • maxDiskUsagePerPart

      private final long maxDiskUsagePerPart
    • fileStorageDirectory

      private final reactor.core.publisher.Mono<Path> fileStorageDirectory
    • blockingOperationScheduler

      private final reactor.core.scheduler.Scheduler blockingOperationScheduler
  • 构造器详细资料

    • PartGenerator

      private PartGenerator(reactor.core.publisher.MonoSink<Part> sink, int maxInMemorySize, long maxDiskUsagePerPart, boolean streaming, reactor.core.publisher.Mono<Path> fileStorageDirectory, reactor.core.scheduler.Scheduler blockingOperationScheduler)
  • 方法详细资料

    • createPart

      public static reactor.core.publisher.Mono<Part> createPart(reactor.core.publisher.Flux<MultipartParser.Token> tokens, int maxInMemorySize, long maxDiskUsagePerPart, boolean streaming, reactor.core.publisher.Mono<Path> fileStorageDirectory, reactor.core.scheduler.Scheduler blockingOperationScheduler)
      Creates parts from a given stream of tokens.
    • currentContext

      public reactor.util.context.Context currentContext()
    • hookOnSubscribe

      protected void hookOnSubscribe(org.reactivestreams.Subscription subscription)
      覆盖:
      hookOnSubscribe 在类中 reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
    • hookOnNext

      protected void hookOnNext(MultipartParser.Token token)
      覆盖:
      hookOnNext 在类中 reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
    • newPart

      private void newPart(PartGenerator.State currentState, HttpHeaders headers)
    • hookOnComplete

      protected void hookOnComplete()
      覆盖:
      hookOnComplete 在类中 reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
    • hookOnError

      protected void hookOnError(Throwable throwable)
      覆盖:
      hookOnError 在类中 reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
    • dispose

      public void dispose()
      指定者:
      dispose 在接口中 reactor.core.Disposable
      覆盖:
      dispose 在类中 reactor.core.publisher.BaseSubscriber<MultipartParser.Token>
    • changeState

      boolean changeState(PartGenerator.State oldState, PartGenerator.State newState)
    • changeStateInternal

      private void changeStateInternal(PartGenerator.State newState)
    • emitPart

      void emitPart(Part part)
    • emitError

      void emitError(Throwable t)
    • requestToken

      void requestToken()