public class Service extends Win32
Modifier and Type | Field and Description |
---|---|
static int |
SERVICE_CONTINUE_PENDING |
static int |
SERVICE_PAUSE_PENDING |
static int |
SERVICE_PAUSED |
static int |
SERVICE_RUNNING |
static int |
SERVICE_START_PENDING |
static int |
SERVICE_STOP_PENDING |
static int |
SERVICE_STOPPED |
Constructor and Description |
---|
Service(java.lang.String serviceName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static Service |
create(ServiceConfig config) |
void |
delete() |
protected void |
finalize() |
ServiceConfig |
getConfig() |
static java.util.List |
getServiceConfigs(Sigar sigar,
java.lang.String exe) |
static java.util.List |
getServiceConfigs(java.lang.String exe)
Deprecated.
|
static java.util.List |
getServiceNames() |
static java.util.List |
getServiceNames(Sigar sigar,
java.lang.String ptql) |
int |
getStatus() |
java.lang.String |
getStatusString() |
void |
list(java.io.PrintStream out) |
static void |
main(java.lang.String[] args) |
void |
pause() |
void |
pause(long timeout) |
void |
resume() |
void |
setDescription(java.lang.String description) |
void |
start() |
void |
start(long timeout) |
int |
status()
Deprecated.
|
void |
stop() |
void |
stop(long timeout) |
void |
stopAndWait(long timeout)
Deprecated.
|
findExecutable, findScriptExecutable, getFileVersion
public static final int SERVICE_STOPPED
public static final int SERVICE_START_PENDING
public static final int SERVICE_STOP_PENDING
public static final int SERVICE_RUNNING
public static final int SERVICE_CONTINUE_PENDING
public static final int SERVICE_PAUSE_PENDING
public static final int SERVICE_PAUSED
public Service(java.lang.String serviceName) throws Win32Exception
Win32Exception
public static java.util.List getServiceNames(Sigar sigar, java.lang.String ptql) throws Win32Exception
Win32Exception
public static java.util.List getServiceNames() throws Win32Exception
Win32Exception
public static java.util.List getServiceConfigs(Sigar sigar, java.lang.String exe) throws Win32Exception
Win32Exception
public static java.util.List getServiceConfigs(java.lang.String exe) throws Win32Exception
Win32Exception
protected void finalize()
finalize
in class java.lang.Object
public void close()
public static Service create(ServiceConfig config) throws Win32Exception
Win32Exception
public void delete() throws Win32Exception
Win32Exception
public void setDescription(java.lang.String description)
public int status()
getStatus()
public int getStatus()
public java.lang.String getStatusString()
public void stop() throws Win32Exception
Win32Exception
public void stopAndWait(long timeout) throws Win32Exception
Win32Exception
public void stop(long timeout) throws Win32Exception
Win32Exception
public void start() throws Win32Exception
Win32Exception
public void start(long timeout) throws Win32Exception
Win32Exception
public void pause() throws Win32Exception
Win32Exception
public void pause(long timeout) throws Win32Exception
Win32Exception
public void resume() throws Win32Exception
Win32Exception
public ServiceConfig getConfig() throws Win32Exception
Win32Exception
public void list(java.io.PrintStream out) throws Win32Exception
Win32Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright ? 2004-2011 Hyperic. All Rights Reserved.