public class ServerUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
CLOSE |
static int |
CLOSE_WAIT_TIME |
static int |
CONNECT_TIMEOUT |
static java.lang.String |
INNER_EXE |
static java.lang.String |
IP |
static java.lang.String |
LIVE |
static int |
READ_TIMEOUT |
static java.lang.String |
SERVER_INJECT_SUCCESS |
static java.lang.String |
SERVER_READY |
static int |
SERVER_TIMEOUT |
static java.lang.String |
SYS_DEFAULT |
构造器和说明 |
---|
ServerUtils() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
checkServer(java.lang.String host,
int port) |
static void |
cleanServerLog() |
static void |
close(java.lang.String host,
int port,
java.lang.String log) |
static java.io.File |
createLogFile(java.lang.String logFolder,
java.lang.String logFileName)
删除包含logName的日志文件
|
static java.util.List<java.lang.Integer> |
getPORT() |
static java.lang.String |
getResParam(java.lang.String res,
java.lang.String key) |
static void |
initEnv(java.lang.String env,
java.lang.String lib,
java.lang.String[][] libFiles,
java.lang.String format,
java.util.List<java.lang.String> injectJS) |
static boolean |
isServerInjectSuccess(java.lang.String res) |
static boolean |
isServerReady(java.lang.String res) |
static java.lang.String |
sendMessage(java.lang.String host,
int port,
java.lang.String message,
int connectTimeout,
int readTimeout)
发送信息
|
static void |
writeServerInfo(java.lang.String info,
java.lang.String log)
追加方式写日志信息
|
public static final java.lang.String IP
public static final java.lang.String INNER_EXE
public static final java.lang.String SYS_DEFAULT
public static final int SERVER_TIMEOUT
public static final java.lang.String CLOSE
public static final java.lang.String LIVE
public static final java.lang.String SERVER_READY
public static final java.lang.String SERVER_INJECT_SUCCESS
public static int READ_TIMEOUT
public static int CONNECT_TIMEOUT
public static int CLOSE_WAIT_TIME
public static java.util.List<java.lang.Integer> getPORT()
public static void initEnv(java.lang.String env, java.lang.String lib, java.lang.String[][] libFiles, java.lang.String format, java.util.List<java.lang.String> injectJS)
public static boolean isServerReady(java.lang.String res)
public static boolean isServerInjectSuccess(java.lang.String res)
public static void cleanServerLog()
public static java.io.File createLogFile(java.lang.String logFolder, java.lang.String logFileName) throws java.io.IOException
logFolder
- java.io.IOException
public static void writeServerInfo(java.lang.String info, java.lang.String log)
info
- log
- public static java.lang.String sendMessage(java.lang.String host, int port, java.lang.String message, int connectTimeout, int readTimeout) throws java.io.IOException
message
- 发送的信息java.io.IOException
public static void close(java.lang.String host, int port, java.lang.String log)
public static boolean checkServer(java.lang.String host, int port)
public static java.lang.String getResParam(java.lang.String res, java.lang.String key) throws JSONException
JSONException