public class MvcConfig
extends org.osgl.http.HttpConfig
| Modifier and Type | Field and Description |
|---|---|
static String |
ALARM_BIG_CONTENT_ENCOUNTERED |
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_GONE |
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_TOO_MANY_REQUESTS |
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.Lang.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.Lang.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.Lang.Func0<org.osgl.http.H.Format> |
jsonMediaTypeProvider() |
static void |
jsonMediaTypeProvider(org.osgl.Lang.Func0<org.osgl.http.H.Format> provider) |
static void |
jsonSerializer(org.osgl.Lang.Func2<Writer,Object,?> serializer) |
static org.osgl.Lang.Visitor<Writer> |
jsonSerializer(Object v) |
static boolean |
localizedErrorMsg() |
static org.osgl.Lang.Function<String,String> |
messageTranslater() |
static void |
messageTranslater(org.osgl.Lang.Function<String,String> translater) |
static void |
registerAlarmListener(String alarmType,
org.osgl.Lang.Func0 listener) |
static boolean |
renderJsonOutputCharset() |
static void |
renderJsonOutputCharset(boolean b) |
static void |
secret(String secret) |
static void |
sessionExpire(int ttl)
Set session expire in seconds
|
static void |
triggerAlarm(String alarmType) |
allowExtensiveRemoteAddrResolving, contextPath, contextPath, defaultLocale, defaultLocale, domain, domain, isCookieHttpOnly, isCookieSecure, isXForwardedAllowed, isXForwardedAllowed, nonSecurePort, nonSecurePort, port, secure, secure, securePort, securePort, sessionCache, setCookieHttpOnly, setCookieSecure, setCurrentStateStore, setExtensiveRemoteAddrResolving, setSessionCache, setXForwardedAllowedpublic static final String ALARM_BIG_CONTENT_ENCOUNTERED
public 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_GONE
public static final String MSG_ID_TOO_MANY_REQUESTS
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)
Set the cookie prefix for session and flash cookie
prefix - the prefix to prepend to session/flash cookie namepublic static void sessionExpire(int ttl)
Set session expire in seconds
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.Lang.Func0<org.osgl.http.H.Format> provider)
public static org.osgl.Lang.Func0<org.osgl.http.H.Format> jsonMediaTypeProvider()
public static void beforeCommitResultHandler(org.osgl.Lang.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.Lang.Func3<Result,org.osgl.http.H.Request<?>,org.osgl.http.H.Response<?>,?> afterCommitResultHandler)
public static void registerAlarmListener(String alarmType, org.osgl.Lang.Func0 listener)
public static void triggerAlarm(String alarmType)
public static void applyAfterCommitResultHandler(Result result, org.osgl.http.H.Request<?> req, org.osgl.http.H.Response<?> resp)
public static void messageTranslater(org.osgl.Lang.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)
Returns default error message id from http status
status - the http statuspublic static String errorMessage(int code)
Returns default error message id from http status code
code - the http status codeCopyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.