Class SessionConfiguration

java.lang.Object
io.micronaut.session.SessionConfiguration
Direct Known Subclasses:
HttpSessionConfiguration

@ConfigurationProperties("micronaut.session") public class SessionConfiguration extends Object

Base configuration properties for session handling.

Since:
1.0
Author:
Graeme Rocher
  • Field Details

    • DEFAULT_MAXINACTIVEINTERVAL_MINUTES

      public static final int DEFAULT_MAXINACTIVEINTERVAL_MINUTES
      The default max inactive interval in minutes.
      See Also:
  • Constructor Details

    • SessionConfiguration

      public SessionConfiguration()
  • Method Details

    • getMaxActiveSessions

      public OptionalInt getMaxActiveSessions()
      Returns:
      The maximum number of active sessions
    • setMaxActiveSessions

      public void setMaxActiveSessions(Integer maxActiveSessions)
      Sets the maximum number of active sessions.
      Parameters:
      maxActiveSessions - The max active sessions
    • getMaxInactiveInterval

      public Duration getMaxInactiveInterval()
      Returns:
      The maximum inactive interval
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(Duration maxInactiveInterval)
      Set the maximum inactive interval. Default value (30 minutes).
      Parameters:
      maxInactiveInterval - The max inactive interval
    • isPromptExpiration

      public boolean isPromptExpiration()
      Returns:
      if prompt expiration is enabled.
    • setPromptExpiration

      public void setPromptExpiration(boolean promptExpiration)
      Set if prompt expiration is enabled.
      Parameters:
      promptExpiration - if prompt expiration is enabled / disabled
    • getExecutorService

      public Optional<ScheduledExecutorService> getExecutorService()
      Returns:
      The injected executor service
    • setExecutorService

      @Inject public void setExecutorService(@Nullable @Named("scheduled") @Nullable io.micronaut.context.BeanProvider<ExecutorService> executorService)
      Set the executor service.
      Parameters:
      executorService - The executorService