Record Class ServerHandlerConfig

java.lang.Object
java.lang.Record
org.apache.tika.server.core.resource.ServerHandlerConfig

public record ServerHandlerConfig(BasicContentHandlerFactory.HANDLER_TYPE type, ParseMode parseMode, int writeLimit, int maxEmbeddedCount, boolean throwOnWriteLimitReached) extends Record
Server-internal configuration for request handlers. This holds configuration parsed from HTTP headers for a single request for the BasicContentHandlerFactory kinds of elements.

Note: Embedded resource limits are now configured via EmbeddedLimits in ParseContext, not through this config.

  • Constructor Details

    • ServerHandlerConfig

      public ServerHandlerConfig(BasicContentHandlerFactory.HANDLER_TYPE type, ParseMode parseMode, int writeLimit, int maxEmbeddedCount, boolean throwOnWriteLimitReached)
      Creates an instance of a ServerHandlerConfig record class.
      Parameters:
      type - the value for the type record component
      parseMode - the value for the parseMode record component
      writeLimit - the value for the writeLimit record component
      maxEmbeddedCount - the value for the maxEmbeddedCount record component
      throwOnWriteLimitReached - the value for the throwOnWriteLimitReached record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • parseMode

      public ParseMode parseMode()
      Returns the value of the parseMode record component.
      Returns:
      the value of the parseMode record component
    • writeLimit

      public int writeLimit()
      Returns the value of the writeLimit record component.
      Returns:
      the value of the writeLimit record component
    • maxEmbeddedCount

      public int maxEmbeddedCount()
      Returns the value of the maxEmbeddedCount record component.
      Returns:
      the value of the maxEmbeddedCount record component
    • throwOnWriteLimitReached

      public boolean throwOnWriteLimitReached()
      Returns the value of the throwOnWriteLimitReached record component.
      Returns:
      the value of the throwOnWriteLimitReached record component