com.ptc.wvs.server.cadagent
Class Monitor
java.lang.Object
com.ptc.wvs.server.cadagent.Monitor
- public class Monitor
- extends Object
Method Summary |
void |
addWorker(Worker w)
|
private void |
clearReply(int type)
|
String |
getLogInfo(Worker w,
String statusText)
|
private Monitor.MonitorMsg |
getReply(int type)
|
Socket |
getSocket()
|
int |
getStartAttempts()
|
static int |
intValue(Monitor.MonitorMsg msg)
|
boolean |
isBusy()
|
boolean |
isConnected()
|
static boolean |
isReply(Monitor.MonitorMsg msg)
|
static long |
longValue(Monitor.MonitorMsg msg)
|
void |
messageLoop()
|
private static Monitor.MonitorMsg |
readFromMonitor(DataInputStream dis)
|
static Monitor.MonitorMsg |
readFromMonitor(Socket socket)
|
static boolean |
replyToMonitor(Socket socket,
boolean success)
|
static void |
replyToTestMonitor(Socket socket,
boolean success)
|
static void |
sendToMonitor(Socket socket,
int flagbyte,
int tagbyte)
|
private static void |
sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
boolean useByteData,
byte[] byteData,
int intData)
|
static void |
sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
byte[] data)
|
static void |
sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
int i)
|
static void |
sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
String s)
|
void |
setBusy(boolean b)
|
void |
setConnected(boolean c)
|
void |
setSocket(Socket s)
|
void |
shutdown()
|
String |
startWorker(Worker w,
String startArgs)
|
static String |
stringValue(Monitor.MonitorMsg msg)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SELFCONTB
private static final int SELFCONTB
- See Also:
- Constant Field Values
REPLYB
private static final int REPLYB
- See Also:
- Constant Field Values
COMPRESSB
private static final int COMPRESSB
- See Also:
- Constant Field Values
ZEROB
private static final int ZEROB
- See Also:
- Constant Field Values
END
private static final int END
- See Also:
- Constant Field Values
CONTINUE
private static final int CONTINUE
- See Also:
- Constant Field Values
OLD_PROTO
private static final int OLD_PROTO
- See Also:
- Constant Field Values
INIT
private static final int INIT
- See Also:
- Constant Field Values
START
private static final int START
- See Also:
- Constant Field Values
RETCODE
private static final int RETCODE
- See Also:
- Constant Field Values
DESCRIPTION
private static final int DESCRIPTION
- See Also:
- Constant Field Values
HOSTNAME
private static final int HOSTNAME
- See Also:
- Constant Field Values
PORTNUM
private static final int PORTNUM
- See Also:
- Constant Field Values
BUILDVER
private static final int BUILDVER
- See Also:
- Constant Field Values
CLIENTTYPE
private static final int CLIENTTYPE
- See Also:
- Constant Field Values
GETWLOG
private static final int GETWLOG
- See Also:
- Constant Field Values
GETMLOG
private static final int GETMLOG
- See Also:
- Constant Field Values
GETHLOG
private static final int GETHLOG
- See Also:
- Constant Field Values
LISTWLOG
private static final int LISTWLOG
- See Also:
- Constant Field Values
LISTMLOG
private static final int LISTMLOG
- See Also:
- Constant Field Values
LISTHLOG
private static final int LISTHLOG
- See Also:
- Constant Field Values
WORKERID
private static final int WORKERID
- See Also:
- Constant Field Values
WORKERARG
private static final int WORKERARG
- See Also:
- Constant Field Values
LOGDATA
private static final int LOGDATA
- See Also:
- Constant Field Values
LOGINFO
private static final int LOGINFO
- See Also:
- Constant Field Values
LOGNO
private static final int LOGNO
- See Also:
- Constant Field Values
SEQNO
private static final int SEQNO
- See Also:
- Constant Field Values
SIZE
private static final int SIZE
- See Also:
- Constant Field Values
CTIME
private static final int CTIME
- See Also:
- Constant Field Values
MTIME
private static final int MTIME
- See Also:
- Constant Field Values
connected
private boolean connected
busy
private boolean busy
startAttempts
private int startAttempts
workers
private Vector workers
socket
private Socket socket
gotReply
private boolean gotReply
replyType
private int replyType
monitorMsg
private Monitor.MonitorMsg monitorMsg
Monitor
public Monitor()
setConnected
public void setConnected(boolean c)
isConnected
public boolean isConnected()
getStartAttempts
public int getStartAttempts()
addWorker
public void addWorker(Worker w)
setBusy
public void setBusy(boolean b)
isBusy
public boolean isBusy()
setSocket
public void setSocket(Socket s)
getSocket
public Socket getSocket()
getLogInfo
public String getLogInfo(Worker w,
String statusText)
startWorker
public String startWorker(Worker w,
String startArgs)
clearReply
private void clearReply(int type)
getReply
private Monitor.MonitorMsg getReply(int type)
messageLoop
public void messageLoop()
throws IOException
- Throws:
IOException
shutdown
public void shutdown()
readFromMonitor
public static Monitor.MonitorMsg readFromMonitor(Socket socket)
throws IOException
- Throws:
IOException
readFromMonitor
private static Monitor.MonitorMsg readFromMonitor(DataInputStream dis)
throws IOException
- Throws:
IOException
isReply
public static boolean isReply(Monitor.MonitorMsg msg)
intValue
public static int intValue(Monitor.MonitorMsg msg)
throws IOException
- Throws:
IOException
longValue
public static long longValue(Monitor.MonitorMsg msg)
throws IOException
- Throws:
IOException
stringValue
public static String stringValue(Monitor.MonitorMsg msg)
throws IOException
- Throws:
IOException
replyToMonitor
public static boolean replyToMonitor(Socket socket,
boolean success)
replyToTestMonitor
public static void replyToTestMonitor(Socket socket,
boolean success)
sendToMonitor
public static void sendToMonitor(Socket socket,
int flagbyte,
int tagbyte)
throws IOException
- Throws:
IOException
sendToMonitor
public static void sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
int i)
throws IOException
- Throws:
IOException
sendToMonitor
public static void sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
String s)
throws IOException
- Throws:
IOException
sendToMonitor
public static void sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
byte[] data)
throws IOException
- Throws:
IOException
sendToMonitor
private static void sendToMonitor(Socket socket,
int flagbyte,
int tagbyte,
boolean useByteData,
byte[] byteData,
int intData)
throws IOException
- Throws:
IOException