org.jvnet.hudson.wmi
Interface Win32Service

All Superinterfaces:
org.jinterop.dcom.core.IJIComObject, org.jinterop.dcom.impls.automation.IJIDispatch, org.kohsuke.jinterop.JIProxy, Serializable

public interface Win32Service
extends org.kohsuke.jinterop.JIProxy

Represents a Windows service. See http://msdn.microsoft.com/en-us/library/aa394418(VS.85).aspx

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class Win32Service.Implementation
           
 
Field Summary
static int E_FAIL
           
static int InteractiveProcess
           
static int Win32OwnProcess
           
static int Win32ShareProcess
           
 
Fields inherited from interface org.jinterop.dcom.impls.automation.IJIDispatch
DISPATCH_DISPID_PUTPUTREF, DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, IID
 
Method Summary
 int Create(String name, String displayName, String pathName, int serviceType, int errorControl, String startMode, boolean desktopInteract)
           
 int Create(String name, String displayName, String pathName, int serviceType, int errorControl, String startMode, boolean desktopInteract, String startName, String startPassword, String loadOrderGroup, String[] loadOrderGroupDependencies, String[] serviceDependencies)
          Creates a service.
 int Delete()
          Deletes a service.
 String getErrorMessage(int r)
          Gets the error message for the return code of the service manipulation method.
 void start()
          Starts a service.
 boolean Started()
          Service has been started.
 int StartService()
          Deprecated. This method doesn't throw a failure as an exception. Use start() instead.
 String State()
          Current state of the service.
 String Status()
          Current status of the object.
 void stop()
          Stops a service.
 int StopService()
          Deprecated. This method doesn't throw a failure as an exception. Use stop() instead.
 
Methods inherited from interface org.kohsuke.jinterop.JIProxy
cast
 
Methods inherited from interface org.jinterop.dcom.impls.automation.IJIDispatch
callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodA, callMethodA, callMethodA, callMethodA, callMethodA, callMethodA, callMethodA, get, get, get, get, getIDsOfNames, getIDsOfNames, getLastExcepInfo, getTypeInfo, getTypeInfoCount, put, put, put, put, putRef, putRef, putRef, putRef
 
Methods inherited from interface org.jinterop.dcom.core.IJIComObject
addRef, call, call, getAssociatedSession, getInstanceLevelSocketTimeout, getInterfaceIdentifier, getIpid, getUnreferencedHandler, internal_getConnectionInfo, internal_getInterfacePointer, internal_removeConnectionInfo, internal_setConnectionInfo, internal_setDeffered, isDispatchSupported, isLocalReference, queryInterface, registerUnreferencedHandler, release, setInstanceLevelSocketTimeout, unregisterUnreferencedHandler
 

Field Detail

Win32OwnProcess

static final int Win32OwnProcess
See Also:
Constant Field Values

Win32ShareProcess

static final int Win32ShareProcess
See Also:
Constant Field Values

InteractiveProcess

static final int InteractiveProcess
See Also:
Constant Field Values

E_FAIL

static final int E_FAIL
See Also:
Constant Field Values
Method Detail

Status

String Status()
              throws org.jinterop.dcom.common.JIException
Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states.

The values are:

Throws:
org.jinterop.dcom.common.JIException

State

String State()
             throws org.jinterop.dcom.common.JIException
Current state of the service. Possible values are:

Throws:
org.jinterop.dcom.common.JIException

Started

boolean Started()
                throws org.jinterop.dcom.common.JIException
Service has been started.

Throws:
org.jinterop.dcom.common.JIException

Create

int Create(String name,
           String displayName,
           String pathName,
           int serviceType,
           int errorControl,
           String startMode,
           boolean desktopInteract,
           String startName,
           String startPassword,
           String loadOrderGroup,
           String[] loadOrderGroupDependencies,
           String[] serviceDependencies)
           throws org.jinterop.dcom.common.JIException
Creates a service. See http://msdn.microsoft.com/en-us/library/aa389390(VS.85).aspx

Throws:
org.jinterop.dcom.common.JIException

Create

int Create(String name,
           String displayName,
           String pathName,
           int serviceType,
           int errorControl,
           String startMode,
           boolean desktopInteract)
           throws org.jinterop.dcom.common.JIException
Throws:
org.jinterop.dcom.common.JIException

getErrorMessage

String getErrorMessage(int r)
Gets the error message for the return code of the service manipulation method.


Delete

int Delete()
           throws org.jinterop.dcom.common.JIException
Deletes a service.

Throws:
org.jinterop.dcom.common.JIException

StartService

int StartService()
                 throws org.jinterop.dcom.common.JIException
Deprecated. This method doesn't throw a failure as an exception. Use start() instead.

Throws:
org.jinterop.dcom.common.JIException

start

void start()
           throws org.jinterop.dcom.common.JIException
Starts a service.

Throws:
org.jinterop.dcom.common.JIException

StopService

int StopService()
                throws org.jinterop.dcom.common.JIException
Deprecated. This method doesn't throw a failure as an exception. Use stop() instead.

Throws:
org.jinterop.dcom.common.JIException

stop

void stop()
          throws org.jinterop.dcom.common.JIException
Stops a service.

Throws:
org.jinterop.dcom.common.JIException


Copyright © 2004-2011. All Rights Reserved.