public abstract class JVMService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Thread |
appThread |
static int |
CONTROLS_PARAMCHANGE |
static int |
CONTROLS_PAUSABLE |
static int |
CONTROLS_SHUTDOWN |
static int |
CONTROLS_STOPPABLE |
static int |
ERR_OUT |
static int |
STD_OUT |
static java.lang.String |
version |
static int |
WAIT_HINT |
Constructor and Description |
---|
JVMService()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
errOut(java.lang.String name,
int line,
java.lang.String message)
Print out an error message.
|
static void |
errOut(java.lang.String name,
java.lang.String message)
Print out an error message.
|
static java.lang.String |
getCallingClassName() |
static int |
getLogLevel()
Get the log level.
|
static java.lang.String |
getLogType()
Get the type of logging.
|
java.lang.String |
getVersion() |
int |
getWaitHint()
Get the time in milliseconds in that is needed for application to stop.
|
void |
init(java.lang.String[] param)
Set the application parameters.
|
abstract void |
pause()
Pause the application thread.
|
static void |
requestStopService(int code)
Send the native code that application wants to stop.
|
abstract void |
resume()
Resume the application thread.
|
static void |
sendServiceRunning()
Send the native code that application is running.
|
static void |
setControlsAccepted(int controls)
Tells the native code which Controls are accepted by the java service.
|
abstract void |
setEnvironment(java.lang.String key,
java.lang.String value)
Set an environment varibale.
|
abstract void |
start()
Start the application thread.
|
static void |
stdOut(java.lang.String name,
int line,
java.lang.String message)
Print out an log message.
|
static void |
stdOut(java.lang.String name,
java.lang.String message)
Print out an log message.
|
abstract void |
stop()
Stop the application thread.
|
public static final int STD_OUT
public static final int ERR_OUT
public static final int WAIT_HINT
public static final int CONTROLS_STOPPABLE
public static final int CONTROLS_PAUSABLE
public static final int CONTROLS_SHUTDOWN
public static final int CONTROLS_PARAMCHANGE
public static final java.lang.String version
protected java.lang.Thread appThread
public java.lang.String getVersion()
public static void setControlsAccepted(int controls)
controls
- the accepted controls.CONTROLS_PARAMCHANGE
,
CONTROLS_PAUSABLE
,
CONTROLS_SHUTDOWN
,
CONTROLS_STOPPABLE
public static void errOut(java.lang.String name, java.lang.String message)
name
- Name of the class.message
- The messagepublic static void errOut(java.lang.String name, int line, java.lang.String message)
name
- Name of the class.line
- The line number.message
- The messagepublic static void stdOut(java.lang.String name, java.lang.String message)
name
- Name of the class.message
- The messagepublic static void stdOut(java.lang.String name, int line, java.lang.String message)
name
- Name of the class.line
- The line number.message
- The messagepublic static java.lang.String getLogType()
public static void requestStopService(int code)
public static void sendServiceRunning()
public abstract void start()
public abstract void stop()
public abstract void pause()
public abstract void resume()
public abstract void setEnvironment(java.lang.String key, java.lang.String value)
public static int getLogLevel()
public void init(java.lang.String[] param)
param
- The array containing the parameter strings.public int getWaitHint()
public static java.lang.String getCallingClassName()