public class ServerInterpreter extends ServerInterpreter
This class implements the GCspy server. The server runs as a separate pthread and communicates with GCspy clients. It handles commands from the client and passes data to it. Mostly it forwards calls to the C gcspy library.
DEBUG, initialised, MAX_LEN, MAX_SPACES, server, spaces| Constructor and Description |
|---|
ServerInterpreter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(int num,
String name)
Add an event to the ServerInterpreter.
|
int |
computeHeaderSize()
Discover the smallest header size for objects.
|
void |
init(String name,
int port,
boolean verbose)
Create a new ServerInterpreter singleton.
|
boolean |
isConnected(int event)
Are we connected to a GCspy client?
|
void |
serverSafepoint(int event)
Indicate that we are at a server safe point (e.g. the end of a GC).
|
void |
setGeneralInfo(String info)
Set the general info for the ServerInterpreter.
|
void |
startCompensationTimer()
Start compensation timer so that time spent gathering data is
not confused with the time spent in the application and the VM.
|
void |
startServer(boolean wait)
Start the server, running its main loop in a pthread.
|
void |
stopCompensationTimer()
Stop compensation timer so that time spent gathering data is
not confused with the time spent in the application and the VM.r
|
addSpace, getServerAddresspublic ServerInterpreter()
public void init(String name, int port, boolean verbose)
ServerInterpreterinit in class ServerInterpretername - The name of the serverport - The number of the port on which to communicateverbose - Whether the server is to run verboselypublic void addEvent(int num, String name)
ServerInterpreteraddEvent in class ServerInterpreternum - the event numbername - the event namepublic void setGeneralInfo(String info)
ServerInterpretersetGeneralInfo in class ServerInterpreterinfo - the informationpublic void startServer(boolean wait)
ServerInterpreterstartServer in class ServerInterpreterwait - Whether to wait for the client to connectpublic boolean isConnected(int event)
ServerInterpreterisConnected in class ServerInterpreterevent - The current eventtrue if we are connectedpublic void startCompensationTimer()
ServerInterpreterstartCompensationTimer in class ServerInterpreterpublic void stopCompensationTimer()
ServerInterpreterstopCompensationTimer in class ServerInterpreterpublic void serverSafepoint(int event)
ServerInterpreterserverSafepoint in class ServerInterpreterevent - The current eventpublic int computeHeaderSize()
ServerInterpretercomputeHeaderSize in class ServerInterpreter