public class SvcctlPipeFile extends IPCPipeFile
Pipe file connected to a remote service manager DCE/RPC service that can be used to retrieve information about remote NT services, start and stop services, and perform other service requests.
| Constructor and Description |
|---|
SvcctlPipeFile(IPCSession sess,
DCEPacket pkt,
int handle,
java.lang.String name,
int maxTx,
int maxRx)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
ClosePipe()
Close the pipe
|
void |
closeService(ServiceHandle handle)
Close a remote service
|
protected void |
closeServiceManager(ServiceManagerHandle handle)
Close the remote service manager
|
void |
controlService(ServiceHandle handle,
int ctrl)
Service control
|
ServiceHandle |
createService(java.lang.String serviceName,
java.lang.String displayName,
int svcType,
int startType,
int errCtrl,
java.lang.String binPath)
Create a new service with no dependencies and using the default LocalSystem account
|
ServiceHandle |
createService(java.lang.String serviceName,
java.lang.String displayName,
int svcType,
int startType,
int errCtrl,
java.lang.String binPath,
java.lang.String loadGrp,
StringList depend,
java.lang.String account,
byte[] password)
Create a new service
|
void |
deleteService(ServiceHandle handle)
Delete a remote service
|
protected ServiceManagerHandle |
getManagerHandle()
Return the service manager handle
|
ServiceConfigInfo |
getServiceConfiguration(ServiceHandle handle)
Return the remote service configuration details
|
ServiceStatusList |
getServiceList(int typ,
int state)
Return the service status list for services matching the specified type and state on the
remote server.
|
ServiceStatusExList |
getServiceListEx(int typ,
int state)
Return the service status list for services matching the specified type and state on the
remote server.
|
ServiceStatusInfo |
getServiceStatus(ServiceHandle handle)
Return the service status for the specified service
|
ServiceHandle |
openService(java.lang.String serviceName)
Open a service on the remote server
|
ServiceHandle |
openService(java.lang.String serviceName,
int accessMode)
Open a service on the remote server
|
protected ServiceManagerHandle |
openServiceControlManager()
Open the service control manager on the remote server
|
protected ServiceManagerHandle |
openServiceControlManager(int accessMode)
Open the service control manager on the remote server
|
void |
pauseService(ServiceHandle handle)
Pause a service
|
void |
resumeService(ServiceHandle handle)
Resume a service
|
int |
setServiceConfiguration(ServiceHandle handle,
ServiceConfigInfo config)
Set the remote service configuration details
|
void |
startService(ServiceHandle handle)
Start a service
|
void |
stopService(ServiceHandle handle)
Stop a service
|
checkStatus, doDCERequest, doDCERequest, getBuffer, getCallId, getHandle, getMaximumReceiveSize, getMaximumTransmitSize, getNextCallId, getPacket, getPipeName, getRxBuffer, getSession, isClosed, setMaximumReceiveSize, setMaximumTransmitSize, toStringpublic SvcctlPipeFile(IPCSession sess, DCEPacket pkt, int handle, java.lang.String name, int maxTx, int maxRx) throws java.io.IOException, SMBException
sess - SMBIPCSessionpkt - DCEPackethandle - intname - StringmaxTx - intmaxRx - intjava.io.IOExceptionSMBExceptionprotected final ServiceManagerHandle openServiceControlManager() throws java.io.IOException, SMBException
java.io.IOExceptionSMBExceptionprotected final ServiceManagerHandle openServiceControlManager(int accessMode) throws java.io.IOException, SMBException
accessMode - intjava.io.IOExceptionSMBExceptionpublic final ServiceHandle createService(java.lang.String serviceName, java.lang.String displayName, int svcType, int startType, int errCtrl, java.lang.String binPath) throws java.io.IOException, SMBException
serviceName - StringdisplayName - StringsvcType - From NTService.Type...startType - From NTService.Start...errCtrl - From NTService.Error...binPath - Stringjava.io.IOExceptionSMBExceptionpublic final ServiceHandle createService(java.lang.String serviceName, java.lang.String displayName, int svcType, int startType, int errCtrl, java.lang.String binPath, java.lang.String loadGrp, StringList depend, java.lang.String account, byte[] password) throws java.io.IOException, SMBException
serviceName - StringdisplayName - StringsvcType - From NTService.Type...startType - From NTService.Start...errCtrl - From NTService.Error...binPath - StringloadGrp - Stringdepend - StringListaccount - Stringpassword - byte[]java.io.IOExceptionSMBExceptionpublic final void deleteService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - java.io.IOExceptionSMBExceptionpublic final ServiceHandle openService(java.lang.String serviceName) throws java.io.IOException, SMBException
serviceName - Stringjava.io.IOExceptionSMBExceptionpublic final ServiceHandle openService(java.lang.String serviceName, int accessMode) throws java.io.IOException, SMBException
serviceName - StringaccessMode - intjava.io.IOExceptionSMBExceptionpublic final ServiceConfigInfo getServiceConfiguration(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final int setServiceConfiguration(ServiceHandle handle, ServiceConfigInfo config) throws java.io.IOException, SMBException, DCEBufferException
handle - ServiceHandleconfig - ServiceConfigInfojava.io.IOExceptionSMBExceptionDCEBufferExceptionpublic final ServiceStatusList getServiceList(int typ, int state) throws java.io.IOException, SMBException
typ - intstate - intjava.io.IOExceptionSMBExceptionpublic final ServiceStatusInfo getServiceStatus(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final void startService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final void stopService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final void pauseService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final void resumeService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionpublic final void controlService(ServiceHandle handle, int ctrl) throws java.io.IOException, SMBException
handle - ServiceHandlectrl - intjava.io.IOExceptionSMBExceptionpublic final void closeService(ServiceHandle handle) throws java.io.IOException, SMBException
handle - ServiceHandlejava.io.IOExceptionSMBExceptionprotected final void closeServiceManager(ServiceManagerHandle handle) throws java.io.IOException, SMBException
handle - ServiceManagerHandlejava.io.IOExceptionSMBExceptionprotected final ServiceManagerHandle getManagerHandle()
public void ClosePipe()
throws java.io.IOException,
SMBException
ClosePipe in class IPCPipeFilejava.io.IOExceptionSMBExceptionpublic final ServiceStatusExList getServiceListEx(int typ, int state) throws java.io.IOException, SMBException
typ - intstate - intjava.io.IOExceptionSMBExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.