public class ServerUtil extends Object
| Constructor and Description |
|---|
ServerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
decodeJson(String s) |
static org.webswing.model.s2c.AppFrameMsgOut |
decodePlaybackProto(byte[] message) |
static Object |
decodeProto(byte[] message) |
static String |
encode2Json(org.webswing.model.MsgOut m) |
static byte[] |
encode2Proto(org.webswing.model.MsgOut m) |
static String |
getClientBrowser(WebSocketConnection r) |
static String |
getClientIp(WebSocketConnection r) |
static String |
getClientOs(WebSocketConnection r) |
static String |
getContextPath(javax.servlet.ServletContext ctx) |
static String |
getCustomArgs(javax.servlet.http.HttpServletRequest r) |
static int |
getDebugPort(javax.servlet.http.HttpServletRequest r) |
static URL |
getFileResource(String resource,
File folder) |
static URL |
getWebResource(String resource,
javax.servlet.ServletContext servletContext,
File webFolder) |
static boolean |
isFileLocked(File file) |
static boolean |
isRecording(javax.servlet.http.HttpServletRequest r) |
static String |
resolveInstanceIdForMode(WebSocketConnection r,
org.webswing.model.c2s.ConnectionHandshakeMsgIn h,
org.webswing.server.common.model.SwingConfig conf) |
static void |
sendHttpRedirect(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String relativeUrl) |
public static String encode2Json(org.webswing.model.MsgOut m)
public static byte[] encode2Proto(org.webswing.model.MsgOut m)
public static Object decodeProto(byte[] message)
public static org.webswing.model.s2c.AppFrameMsgOut decodePlaybackProto(byte[] message)
public static String getClientIp(WebSocketConnection r)
public static String getClientOs(WebSocketConnection r)
public static String getClientBrowser(WebSocketConnection r)
public static String resolveInstanceIdForMode(WebSocketConnection r, org.webswing.model.c2s.ConnectionHandshakeMsgIn h, org.webswing.server.common.model.SwingConfig conf)
public static boolean isRecording(javax.servlet.http.HttpServletRequest r)
public static String getCustomArgs(javax.servlet.http.HttpServletRequest r)
public static int getDebugPort(javax.servlet.http.HttpServletRequest r)
public static URL getWebResource(String resource, javax.servlet.ServletContext servletContext, File webFolder)
public static boolean isFileLocked(File file)
public static String getContextPath(javax.servlet.ServletContext ctx)
public static void sendHttpRedirect(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
String relativeUrl)
throws IOException
IOExceptionCopyright © 2017. All rights reserved.