Microsoft SDK for Java

Service Class Methods

The Service Class contains the following methods:

canPause indicates whether the service can be paused.
canShutdown indicates whether the service should be notified when the system shuts down.
canStop indicates whether the service can be stopped.
CheckPoint increments the current checkpoint value.
disableAllAssassins disables the assassins for each service in the process.
disableAssassin disables the service assassin.
enableAllAssassins restores the assassins for each service in the process to their normal state.
enableAssassin enables the assassin.
getAssassinTimeout obtains the default time for which the assassin will wait for any state change before terminating a service.
getCheckPoint determines the service checkpoint.
getControlsAccepted indicates the control codes that the service will accept and process.
getCurrentState determines the service state.
getServiceStatus determines the service status.
getServiceStatusDirect determines the service status.
getWaitHint specifies the number of milliseconds the service is likely to remain in the current pending state.
handleContinue handles the continue request.
handleInterrogate handles the interrogate request.
handlePause handles the pause request.
handleShutdown handles the shutdown request.
handleStop handles the stop request.
handleUnrecognizedEvent handles an unrecognized event code from the service control manager.
isAssassinActive indicates whether the assassin is currently active.
preventAssassins prevents assassins from being created.
setAssassinTimeout sets the time for which the assassin will wait for any state change before terminating a service.
setAutoDumpErr determines whether each line written to system.err is automatically written to the event log or whether the service will manually flush the stream to log events.
setAutoDumpOut determines whether each line written to system.out is automatically written to the event log or whether the service will manually flush the stream to log events.
setContinuing sets the service to CONTINUE_PENDING.
setPaused sets the service to the PAUSED state.
setPausing sets the service to PAUSE_PENDING and sets the wait hint to waithint.
setRunning sets the service to RUNNING and sets the ControlsAccepted field in the ServiceStatus object to a specified value indicating the control capabilities of the service.
setServiceAutoDumpErr determines whether each line written to err is automatically written to the event log or whether the service will manually flush the stream to log events.
setServiceAutoDumpOut determines whether each line written to out is automatically written to the event log or whether the service will manually flush the stream to log events.
setServiceStatus changes the value of the service, based on a ServiceStatus object.
setServiceStatusDirect changes the value of the service, based on a ServiceStatus object.
setStopped sets the service to STOPPED.
setStopping sets the service to STOP_PENDING and the wait hint to waithint.
StopServiceEventHandler internally stops the service.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.