public class MvcConfig
extends org.osgl.http.HttpConfig
| Modifier and Type | Field and Description |
|---|---|
static String |
DEF_COOKIE_PREFIX |
static String |
MSG_ID_ACCEPTED |
static String |
MSG_ID_BAD_REQUEST |
static String |
MSG_ID_CLIENT_ERROR |
static String |
MSG_ID_CONFLICT |
static String |
MSG_ID_CREATED |
static String |
MSG_ID_FORBIDDEN |
static String |
MSG_ID_METHOD_NOT_ALLOWED |
static String |
MSG_ID_NOT_ACCEPTABLE |
static String |
MSG_ID_NOT_FOUND |
static String |
MSG_ID_NOT_IMPLEMENTED |
static String |
MSG_ID_PAYMENT_REQUIRED |
static String |
MSG_ID_PROXY_AUTHENTICATION_REQUIRED |
static String |
MSG_ID_REQUREST_TIMEOUT |
static String |
MSG_ID_SERVER_ERROR |
static String |
MSG_ID_UNAUTHORIZED |
static String |
MSG_ID_UNKNOWN_STATUS |
| Constructor and Description |
|---|
MvcConfig() |
| Modifier and Type | Method and Description |
|---|---|
static void |
afterCommitResultHandler(org.osgl.Osgl.Func3<Result,org.osgl.http.H.Request<?>,org.osgl.http.H.Response<?>,?> afterCommitResultHandler) |
static void |
applyAfterCommitResultHandler(Result result,
org.osgl.http.H.Request<?> req,
org.osgl.http.H.Response<?> resp) |
static void |
applyBeforeCommitResultHandler(Result result,
org.osgl.http.H.Request req,
org.osgl.http.H.Response resp) |
static void |
beforeCommitResultHandler(org.osgl.Osgl.Func3<Result,org.osgl.http.H.Request<?>,org.osgl.http.H.Response<?>,?> beforeCommitResultHandler) |
static void |
cookiePrefix(String prefix)
Set the cookie prefix for session and flash cookie
|
static void |
enableLocalizedErrorMsg() |
static String |
errorMessage(org.osgl.http.H.Status status)
Returns default error message id from http status
|
static String |
errorMessage(int code)
Returns default error message id from http status code
|
static ErrorPageRenderer |
errorPageRenderer() |
static void |
errorPageRenderer(ErrorPageRenderer renderer) |
static org.osgl.Osgl.Func0<org.osgl.http.H.Format> |
jsonMediaTypeProvider() |
static void |
jsonMediaTypeProvider(org.osgl.Osgl.Func0<org.osgl.http.H.Format> provider) |
static org.osgl.Osgl.Function<Object,String> |
jsonSerializer() |
static void |
jsonSerializer(org.osgl.Osgl.Function<Object,String> serializer) |
static boolean |
localizedErrorMsg() |
static org.osgl.Osgl.Function<String,String> |
messageTranslater() |
static void |
messageTranslater(org.osgl.Osgl.Function<String,String> translater) |
static boolean |
renderJsonOutputCharset() |
static void |
renderJsonOutputCharset(boolean b) |
static void |
secret(String secret) |
static void |
sessionExpire(int ttl)
Set session expire in seconds
|
allowExtensiveRemoteAddrResolving, contextPath, contextPath, defaultLocale, defaultLocale, domain, domain, isCookieHttpOnly, isCookieSecure, isXForwardedAllowed, isXForwardedAllowed, nonSecurePort, nonSecurePort, port, secure, secure, securePort, securePort, sessionCache, setCookieHttpOnly, setCookieSecure, setExtensiveRemoteAddrResolving, setSessionCache, setXForwardedAllowedpublic static final String MSG_ID_CREATED
public static final String MSG_ID_ACCEPTED
public static final String MSG_ID_CLIENT_ERROR
public static final String MSG_ID_BAD_REQUEST
public static final String MSG_ID_UNAUTHORIZED
public static final String MSG_ID_PAYMENT_REQUIRED
public static final String MSG_ID_FORBIDDEN
public static final String MSG_ID_NOT_FOUND
public static final String MSG_ID_METHOD_NOT_ALLOWED
public static final String MSG_ID_NOT_ACCEPTABLE
public static final String MSG_ID_PROXY_AUTHENTICATION_REQUIRED
public static final String MSG_ID_REQUREST_TIMEOUT
public static final String MSG_ID_CONFLICT
public static final String MSG_ID_UNKNOWN_STATUS
public static final String MSG_ID_SERVER_ERROR
public static final String MSG_ID_NOT_IMPLEMENTED
public static final String DEF_COOKIE_PREFIX
public static void cookiePrefix(String prefix)
prefix - the prefix to prepend to session/flash cookie namepublic static void sessionExpire(int ttl)
ttl - the session expire in secondspublic static void secret(String secret)
public static void renderJsonOutputCharset(boolean b)
public static boolean renderJsonOutputCharset()
public static void jsonMediaTypeProvider(org.osgl.Osgl.Func0<org.osgl.http.H.Format> provider)
public static org.osgl.Osgl.Func0<org.osgl.http.H.Format> jsonMediaTypeProvider()
public static void beforeCommitResultHandler(org.osgl.Osgl.Func3<Result,org.osgl.http.H.Request<?>,org.osgl.http.H.Response<?>,?> beforeCommitResultHandler)
public static void applyBeforeCommitResultHandler(Result result, org.osgl.http.H.Request req, org.osgl.http.H.Response resp)
public static void afterCommitResultHandler(org.osgl.Osgl.Func3<Result,org.osgl.http.H.Request<?>,org.osgl.http.H.Response<?>,?> afterCommitResultHandler)
public static void applyAfterCommitResultHandler(Result result, org.osgl.http.H.Request<?> req, org.osgl.http.H.Response<?> resp)
public static void messageTranslater(org.osgl.Osgl.Function<String,String> translater)
public static void errorPageRenderer(ErrorPageRenderer renderer)
public static ErrorPageRenderer errorPageRenderer()
public static void enableLocalizedErrorMsg()
public static boolean localizedErrorMsg()
public static String errorMessage(org.osgl.http.H.Status status)
status - the http statuspublic static String errorMessage(int code)
code - the http status codeCopyright © 2017. All Rights Reserved.