Enum Class JerseyPublisher.PublisherStrategy

java.lang.Object
java.lang.Enum<JerseyPublisher.PublisherStrategy>
org.glassfish.jersey.internal.util.JerseyPublisher.PublisherStrategy
All Implemented Interfaces:
Serializable, Comparable<JerseyPublisher.PublisherStrategy>, java.lang.constant.Constable
Enclosing class:
JerseyPublisher<T>

public static enum JerseyPublisher.PublisherStrategy extends Enum<JerseyPublisher.PublisherStrategy>
  • Enum Constant Details

    • BLOCKING

      public static final JerseyPublisher.PublisherStrategy BLOCKING
      Blocking publisher strategy - tries to deliver to all subscribers regardless the cost. The thread is blocked uninterruptibly while resources for any subscriber are unavailable. This strategy comes with a risk of thread exhaustion, that will lead to publisher being completely blocked by slow or incorrectly implemented subscribers.
    • BEST_EFFORT

      public static final JerseyPublisher.PublisherStrategy BEST_EFFORT
      Best effort publisher strategy - tries to deliver to all subscribers if possible without blocking the processing. If the buffer is full, publisher invokes onError() and cancels subscription on a subscriber, that is not capable of read the messages at a speed sufficient to unblock the processing.
  • Method Details

    • values

      public static JerseyPublisher.PublisherStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JerseyPublisher.PublisherStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null