Class ServerUtil


  • public class ServerUtil
    extends Object
    • Constructor Detail

      • ServerUtil

        public ServerUtil()
    • Method Detail

      • encode2Json

        public static String encode2Json​(org.webswing.model.MsgOut m)
      • encode2Proto

        public static byte[] encode2Proto​(org.webswing.model.MsgOut m)
      • decodeJson

        public static Object decodeJson​(String s)
      • decodeProto

        public static Object decodeProto​(byte[] message)
      • decodePlaybackProto

        public static org.webswing.model.s2c.AppFrameMsgOut decodePlaybackProto​(byte[] message)
      • getClientIp

        public static String getClientIp​(javax.servlet.http.HttpServletRequest r)
      • resolveOwnerIdForSessionMode

        public static String resolveOwnerIdForSessionMode​(WebSocketConnection r,
                                                          org.webswing.model.c2s.ConnectionHandshakeMsgIn h,
                                                          org.webswing.server.common.model.SwingConfig conf)
      • generateInstanceId

        public static String generateInstanceId​(WebSocketConnection r,
                                                org.webswing.model.c2s.ConnectionHandshakeMsgIn h,
                                                String appPath)
      • isRecording

        public static boolean isRecording​(javax.servlet.http.HttpServletRequest r)
      • getCustomArgs

        public static String getCustomArgs​(javax.servlet.http.HttpServletRequest r)
      • getDebugPort

        public static int getDebugPort​(javax.servlet.http.HttpServletRequest r)
      • getFileResource

        public static URL getFileResource​(String resource,
                                          File folder)
      • getWebResource

        public static URL getWebResource​(String resource,
                                         javax.servlet.ServletContext servletContext,
                                         File webFolder)
      • isFileLocked

        public static boolean isFileLocked​(File file)
      • getContextPath

        public static String getContextPath​(javax.servlet.ServletContext ctx)
      • sendHttpRedirect

        public static void sendHttpRedirect​(javax.servlet.http.HttpServletRequest req,
                                            javax.servlet.http.HttpServletResponse resp,
                                            String relativeUrl)
                                     throws IOException
        Throws:
        IOException