The Service Class of the com.ms.service package is a base class for creating Microsoft® Windows NT® system services in Java.
public abstract class Service { // Fields public static final int ACCEPT_PAUSE_CONTINUE; public static final int ACCEPT_SHUTDOWN; public static final int ACCEPT_STOP; public static final int CONTINUE_PENDING; protected static boolean disableassassin; public PrintStream err; protected static final int ERROR_SERVICE_SPECIFIC_ERROR; protected static final int NO_ERROR; public PrintStream out; public static final int PAUSE_PENDING; public static final int PAUSED; public static final int RUNNING; public static final int START_PENDING; public static final int STOP_PENDING; public static final int STOPPED; // Constructors protected Service(); // Methods public synchronized boolean canPause(); public synchronized boolean canShutdown(); public synchronized boolean canStop(); protected synchronized void CheckPoint(); protected synchronized void CheckPoint(int waithint); protected static void disableAllAssassins(); protected void disableAssassin(); protected static void enableAllAssassins(); protected void enableAssassin(); protected void getAssassinTimeout(long ms); public synchronized int getCheckPoint(); public synchronized int getControlsAccepted(); public synchronized int getCurrentState(); public synchronized final ServiceStatus getServiceStatus(); public final ServiceStatus getServiceStatusDirect(); public synchronized int getWaitHint(); protected boolean handleContinue(); protected boolean handleInterrogate(); protected boolean handlePause(); protected boolean handleShutdown(); protected boolean handleStop(); protected boolean handleUnrecognizedEvent(int event); protected boolean isAssassinActive(); protected static void preventAssassins(); protected void setAssassinTimeout( long ms ); public static boolean setAutoDumpErr( boolean autodump ); public static boolean setAutoDumpOut( boolean autodump ); protected synchronized void setContinuing( int waithint ); protected synchronized void setPaused( ); protected synchronized void setPausing( int waithint ); protected synchronized void setRunning( int controls ); protected synchronized void setRunning( ); public boolean setServiceAutoDumpErr(boolean autodump); public boolean setServiceAutoDumpOut(boolean autodump); protected synchronized final boolean setServiceStatus( ServiceStatus newstatus); protected final boolean setServiceStatusDirect( ServiceStatus newstatus); protected synchronized void setStopped(); protected synchronized void setStopping(int waithint); protected void StopServiceEventHandler(int waithint); }
CAUTION By default, the service assassin is turned on for services. It must be turned off by using the disableAssassin method. For more information, see the enableAssassin method.