public class W32Service extends Object
Modifier and Type | Field and Description |
---|---|
(package private) Winsvc.SC_HANDLE |
_handle |
Constructor and Description |
---|
W32Service(Winsvc.SC_HANDLE handle)
Win32 Service
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close service.
|
void |
continueService()
Continue service.
|
Winsvc.SERVICE_FAILURE_ACTIONS |
getFailureActions()
Get the failure actions of the specified service.
|
boolean |
getFailureActionsFlag()
Get the failure actions flag of the specified service.
|
Winsvc.SC_HANDLE |
getHandle()
Gets the service handle.
|
void |
pauseService()
Pause service.
|
Winsvc.SERVICE_STATUS_PROCESS |
queryStatus()
Retrieves the current status of the specified service based on the specified information level.
|
void |
setFailureActions(List<Winsvc.SC_ACTION> actions,
int resetPeriod,
String rebootMsg,
String command)
Set the failure actions of the specified service.
|
void |
setFailureActionsFlag(boolean flagValue)
Set the failure action flag of the specified service.
|
void |
startService() |
void |
stopService()
Stop service.
|
void |
waitForNonPendingState()
Wait for the state to change to something other than a pending state.
|
Winsvc.SC_HANDLE _handle
public W32Service(Winsvc.SC_HANDLE handle)
handle
- A handle to the service. This handle is returned by the CreateService or OpenService
function, and it must have the SERVICE_QUERY_STATUS access right.public void close()
public void setFailureActions(List<Winsvc.SC_ACTION> actions, int resetPeriod, String rebootMsg, String command)
public Winsvc.SERVICE_FAILURE_ACTIONS getFailureActions()
public void setFailureActionsFlag(boolean flagValue)
public boolean getFailureActionsFlag()
public Winsvc.SERVICE_STATUS_PROCESS queryStatus()
public void startService()
public void stopService()
public void continueService()
public void pauseService()
public void waitForNonPendingState()
public Winsvc.SC_HANDLE getHandle()