Package dev.voidframework.web.http
Class Context
java.lang.Object
dev.voidframework.web.http.Context
An http request context.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionContext(HttpRequest httpRequest, Session session, FlashMessages flashMessages, Locale locale) Build a new instance. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves context attributes.Retrieves the flash messages.Retrieves the locale.Retrieves the request.Retrieves the session.voidSets the locale.
-
Constructor Details
-
Context
public Context(HttpRequest httpRequest, Session session, FlashMessages flashMessages, Locale locale) Build a new instance.- Parameters:
httpRequest- The HTTP requestsession- The current sessionflashMessages- The current flash messagelocale- The current locale- Since:
- 1.0.0
-
-
Method Details
-
getAttributes
Retrieves context attributes.- Returns:
- The attributes
- Since:
- 1.0.0
-
getRequest
Retrieves the request.- Returns:
- The current request
- Since:
- 1.0.0
-
getSession
Retrieves the session.- Returns:
- The current session
- Since:
- 1.0.0
-
getFlashMessages
Retrieves the flash messages.- Returns:
- The flash messages
- Since:
- 1.0.0
-
getLocale
Retrieves the locale.- Returns:
- The current locale
- Since:
- 1.0.0
-
setLocal
Sets the locale.- Parameters:
locale- The locale to use- Since:
- 1.0.0
-