Package rife.config

Class RifeConfig.EngineConfig

java.lang.Object
rife.config.RifeConfig.EngineConfig
Enclosing class:
RifeConfig

public class RifeConfig.EngineConfig extends Object
  • Field Details

    • DEFAULT_CONTINUATION_DURATION

      public static final long DEFAULT_CONTINUATION_DURATION
      The default duration is 20 minutes.
      Since:
      1.0
      See Also:
    • DEFAULT_CONTINUATION_PURGE_FREQUENCY

      public static final int DEFAULT_CONTINUATION_PURGE_FREQUENCY
      The default frequency is every 20 times out of the scale, with the default scale of 1000 this means, 1/50th of the time.
      Since:
      1.0
      See Also:
    • DEFAULT_CONTINUATION_PURGE_SCALE

      public static final int DEFAULT_CONTINUATION_PURGE_SCALE
      The default purge scale is 1000.
      Since:
      1.0
      See Also:
    • DEFAULT_DEFAULT_CONTENT_TYPE

      public static final String DEFAULT_DEFAULT_CONTENT_TYPE
      See Also:
    • DEFAULT_PRETTY_ENGINE_EXCEPTIONS

      public static final boolean DEFAULT_PRETTY_ENGINE_EXCEPTIONS
      See Also:
    • DEFAULT_LOG_ENGINE_EXCEPTIONS

      public static final boolean DEFAULT_LOG_ENGINE_EXCEPTIONS
      See Also:
    • DEFAULT_FILE_UPLOAD_PATH

      public static final String DEFAULT_FILE_UPLOAD_PATH
    • DEFAULT_FILE_UPLOAD_RIFE_FOLDER

      public static final String DEFAULT_FILE_UPLOAD_RIFE_FOLDER
      See Also:
    • DEFAULT_FILE_UPLOAD_SIZE_LIMIT

      public static final long DEFAULT_FILE_UPLOAD_SIZE_LIMIT
      See Also:
    • DEFAULT_FILE_UPLOAD_SIZE_CHECK

      public static final boolean DEFAULT_FILE_UPLOAD_SIZE_CHECK
      See Also:
    • DEFAULT_FILE_UPLOAD_SIZE_EXCEPTION

      public static final boolean DEFAULT_FILE_UPLOAD_SIZE_EXCEPTION
      See Also:
    • DEFAULT_GLOBAL_NO_CACHE_HEADERS

      public static final boolean DEFAULT_GLOBAL_NO_CACHE_HEADERS
      See Also:
    • DEFAULT_CSRF_PARAMETER_NAME

      public static final String DEFAULT_CSRF_PARAMETER_NAME
      See Also:
    • DEFAULT_CSRF_HEADER_NAME

      public static final String DEFAULT_CSRF_HEADER_NAME
      See Also:
    • DEFAULT_GZIP_COMPRESSION

      public static final boolean DEFAULT_GZIP_COMPRESSION
      See Also:
    • DEFAULT_GZIP_COMPRESSION_TYPES

      public static final Collection<String> DEFAULT_GZIP_COMPRESSION_TYPES
    • DEFAULT_PROXY_ROOT_URL

      public static final String DEFAULT_PROXY_ROOT_URL
    • DEFAULT_WEBAPP_CONTEXT_PATH

      public static final String DEFAULT_WEBAPP_CONTEXT_PATH
    • DEFAULT_PASS_THROUGH_SUFFIXES

      public static final Set<String> DEFAULT_PASS_THROUGH_SUFFIXES
    • DEFAULT_REQUEST_ENCODING

      public static final Charset DEFAULT_REQUEST_ENCODING
    • DEFAULT_RESPONSE_ENCODING

      public static final Charset DEFAULT_RESPONSE_ENCODING
  • Constructor Details

    • EngineConfig

      public EngineConfig()
  • Method Details

    • getDefaultContentType

      public String getDefaultContentType()
    • setDefaultContentType

      public RifeConfig.EngineConfig setDefaultContentType(String type)
    • getCsrfCookieName

      public String getCsrfCookieName()
      Retrieves the name of the cookie that holds the CSRF token.

      This defaults to DEFAULT_CSRF_COOKIE_NAME.

      Returns:
      the name of the CSRF token cookie
      Since:
      1.10
      See Also:
    • setCsrfCookieName

      public RifeConfig.EngineConfig setCsrfCookieName(String name)
    • getCsrfParameterName

      public String getCsrfParameterName()
      Retrieves the name of the request parameter that submits the CSRF token.

      This defaults to DEFAULT_CSRF_PARAMETER_NAME.

      Returns:
      the name of the CSRF token parameter
      Since:
      1.10
      See Also:
    • setCsrfParameterName

      public RifeConfig.EngineConfig setCsrfParameterName(String name)
    • getCsrfHeaderName

      public String getCsrfHeaderName()
      Retrieves the name of the request header that submits the CSRF token.

      This defaults to DEFAULT_CSRF_HEADER_NAME.

      Returns:
      the name of the CSRF token header
      Since:
      1.10
      See Also:
    • setCsrfHeaderName

      public RifeConfig.EngineConfig setCsrfHeaderName(String name)
    • getSecret

      public String getSecret()
      Retrieves the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.

      There's no secret by default, which means that nothing will be signed.

      Returns:
      the secret; or

      null when no secret has been set

      Since:
      1.11.0
      See Also:
    • setSecret

      public RifeConfig.EngineConfig setSecret(String secret)
      Sets the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.

      The secret has to be at least 32 bytes long, and you should keep it out of your sources, for instance by reading it from an environment variable. All the instances of your application have to use the same secret, and it has to stay the same when your application restarts, otherwise the pages that your users had open while logged in can't submit their forms anymore.

      Parameters:
      secret - the secret; or null to sign nothing
      Returns:
      this engine configuration
      Since:
      1.11.0
      See Also:
    • getPrettyEngineExceptions

      public boolean getPrettyEngineExceptions()
    • setPrettyEngineExceptions

      public RifeConfig.EngineConfig setPrettyEngineExceptions(boolean flag)
    • getLogEngineExceptions

      public boolean getLogEngineExceptions()
    • setLogEngineExceptions

      public RifeConfig.EngineConfig setLogEngineExceptions(boolean flag)
    • getFileUploadPath

      public String getFileUploadPath()
    • setFileUploadPath

      public RifeConfig.EngineConfig setFileUploadPath(String path)
    • getFileUploadSizeLimit

      public long getFileUploadSizeLimit()
    • setFileUploadSizeLimit

      public RifeConfig.EngineConfig setFileUploadSizeLimit(long limit)
    • getFileUploadSizeCheck

      public boolean getFileUploadSizeCheck()
    • setFileUploadSizeCheck

      public RifeConfig.EngineConfig setFileUploadSizeCheck(boolean flag)
    • getFileUploadSizeException

      public boolean getFileUploadSizeException()
    • setFileUploadSizeException

      public RifeConfig.EngineConfig setFileUploadSizeException(boolean flag)
    • getContinuationDuration

      public long getContinuationDuration()
    • setContinuationDuration

      public RifeConfig.EngineConfig setContinuationDuration(long duration)
    • getContinuationPurgeFrequency

      public int getContinuationPurgeFrequency()
    • setContinuationPurgeFrequency

      public RifeConfig.EngineConfig setContinuationPurgeFrequency(int frequency)
    • getContinuationPurgeScale

      public int getContinuationPurgeScale()
    • setContinuationPurgeScale

      public RifeConfig.EngineConfig setContinuationPurgeScale(int scale)
    • getGlobalNoCacheHeaders

      public boolean getGlobalNoCacheHeaders()
    • setGlobalNoCacheHeaders

      public RifeConfig.EngineConfig setGlobalNoCacheHeaders(boolean flag)
    • getGzipCompression

      public boolean getGzipCompression()
    • setGzipCompression

      public RifeConfig.EngineConfig setGzipCompression(boolean flag)
    • getGzipCompressionTypes

      public Collection<String> getGzipCompressionTypes()
    • setGzipCompressionTypes

      public RifeConfig.EngineConfig setGzipCompressionTypes(Collection<String> types)
    • getProxyRootUrl

      public String getProxyRootUrl()
    • setProxyRootUrl

      public RifeConfig.EngineConfig setProxyRootUrl(String url)
    • getWebappContextPath

      public String getWebappContextPath()
    • setWebappContextPath

      public RifeConfig.EngineConfig setWebappContextPath(String path)
    • getPassThroughSuffixes

      public Set<String> getPassThroughSuffixes()
    • setPassThroughSuffixes

      public RifeConfig.EngineConfig setPassThroughSuffixes(Set<String> suffixes)
    • getRequestEncoding

      public Charset getRequestEncoding()
    • setRequestEncoding

      public RifeConfig.EngineConfig setRequestEncoding(Charset encoding)
    • getResponseEncoding

      public Charset getResponseEncoding()
    • setResponseEncoding

      public RifeConfig.EngineConfig setResponseEncoding(Charset encoding)