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 Summary
ConstructorsConstructorDescriptionServerHandlerConfig(BasicContentHandlerFactory.HANDLER_TYPE type, ParseMode parseMode, int writeLimit, int maxEmbeddedCount, boolean throwOnWriteLimitReached) Creates an instance of aServerHandlerConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxEmbeddedCountrecord component.Returns the value of theparseModerecord component.booleanReturns the value of thethrowOnWriteLimitReachedrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intReturns the value of thewriteLimitrecord component.
-
Constructor Details
-
ServerHandlerConfig
public ServerHandlerConfig(BasicContentHandlerFactory.HANDLER_TYPE type, ParseMode parseMode, int writeLimit, int maxEmbeddedCount, boolean throwOnWriteLimitReached) Creates an instance of aServerHandlerConfigrecord class.- Parameters:
type- the value for thetyperecord componentparseMode- the value for theparseModerecord componentwriteLimit- the value for thewriteLimitrecord componentmaxEmbeddedCount- the value for themaxEmbeddedCountrecord componentthrowOnWriteLimitReached- the value for thethrowOnWriteLimitReachedrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
parseMode
Returns the value of theparseModerecord component.- Returns:
- the value of the
parseModerecord component
-
writeLimit
public int writeLimit()Returns the value of thewriteLimitrecord component.- Returns:
- the value of the
writeLimitrecord component
-
maxEmbeddedCount
public int maxEmbeddedCount()Returns the value of themaxEmbeddedCountrecord component.- Returns:
- the value of the
maxEmbeddedCountrecord component
-
throwOnWriteLimitReached
public boolean throwOnWriteLimitReached()Returns the value of thethrowOnWriteLimitReachedrecord component.- Returns:
- the value of the
throwOnWriteLimitReachedrecord component
-