public class SentinelUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
contentType |
private static String |
PATH_SPLIT |
| 构造器和说明 |
|---|
SentinelUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
blockRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static String |
buildResource(javax.servlet.http.HttpServletRequest request) |
private static String |
getResourcePath(javax.servlet.http.HttpServletRequest request) |
private static int |
indexOfSlash(char[] chars,
int beginIndex,
boolean slash) |
private static String |
normalizeAbsolutePath(String path,
boolean removeTrailingSlash) |
private static String |
normalizePath(String path,
boolean forceAbsolute,
boolean forceRelative,
boolean removeTrailingSlash) |
static void |
writeDefaultBlockedJson(javax.servlet.http.HttpServletResponse resp,
Map map) |
static void |
writeDefaultBlockedPage(javax.servlet.http.HttpServletResponse resp) |
private static final String PATH_SPLIT
protected static final String contentType
public SentinelUtil()
public static String buildResource(javax.servlet.http.HttpServletRequest request)
private static String getResourcePath(javax.servlet.http.HttpServletRequest request)
private static String normalizeAbsolutePath(String path, boolean removeTrailingSlash) throws IllegalStateException
private static String normalizePath(String path, boolean forceAbsolute, boolean forceRelative, boolean removeTrailingSlash) throws IllegalStateException
private static int indexOfSlash(char[] chars, int beginIndex, boolean slash)
public static void writeDefaultBlockedJson(javax.servlet.http.HttpServletResponse resp, Map map) throws IOException
IOExceptionpublic static void writeDefaultBlockedPage(javax.servlet.http.HttpServletResponse resp) throws IOException
IOExceptionpublic static void blockRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Copyright © 2024. All rights reserved.