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,
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(String serviceName,
String displayName,
int svcType,
int startType,
int errCtrl,
String binPath)
Create a new service with no dependencies and using the default LocalSystem account
|
ServiceHandle |
createService(String serviceName,
String displayName,
int svcType,
int startType,
int errCtrl,
String binPath,
String loadGrp,
StringList depend,
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(String serviceName)
Open a service on the remote server
|
ServiceHandle |
openService(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, String name, int maxTx, int maxRx) throws IOException, SMBException
sess - SMBIPCSessionpkt - DCEPackethandle - intname - StringmaxTx - intmaxRx - intIOExceptionSMBExceptionprotected final ServiceManagerHandle openServiceControlManager() throws IOException, SMBException
IOExceptionSMBExceptionprotected final ServiceManagerHandle openServiceControlManager(int accessMode) throws IOException, SMBException
accessMode - intIOExceptionSMBExceptionpublic final ServiceHandle createService(String serviceName, String displayName, int svcType, int startType, int errCtrl, String binPath) throws IOException, SMBException
serviceName - StringdisplayName - StringsvcType - From NTService.Type...startType - From NTService.Start...errCtrl - From NTService.Error...binPath - StringIOExceptionSMBExceptionpublic final ServiceHandle createService(String serviceName, String displayName, int svcType, int startType, int errCtrl, String binPath, String loadGrp, StringList depend, String account, byte[] password) throws IOException, SMBException
serviceName - StringdisplayName - StringsvcType - From NTService.Type...startType - From NTService.Start...errCtrl - From NTService.Error...binPath - StringloadGrp - Stringdepend - StringListaccount - Stringpassword - byte[]IOExceptionSMBExceptionpublic final void deleteService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final ServiceHandle openService(String serviceName) throws IOException, SMBException
serviceName - StringIOExceptionSMBExceptionpublic final ServiceHandle openService(String serviceName, int accessMode) throws IOException, SMBException
serviceName - StringaccessMode - intIOExceptionSMBExceptionpublic final ServiceConfigInfo getServiceConfiguration(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final int setServiceConfiguration(ServiceHandle handle, ServiceConfigInfo config) throws IOException, SMBException, DCEBufferException
handle - ServiceHandleconfig - ServiceConfigInfoIOExceptionSMBExceptionDCEBufferExceptionpublic final ServiceStatusList getServiceList(int typ, int state) throws IOException, SMBException
typ - intstate - intIOExceptionSMBExceptionpublic final ServiceStatusInfo getServiceStatus(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final void startService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final void stopService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final void pauseService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final void resumeService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionpublic final void controlService(ServiceHandle handle, int ctrl) throws IOException, SMBException
handle - ServiceHandlectrl - intIOExceptionSMBExceptionpublic final void closeService(ServiceHandle handle) throws IOException, SMBException
handle - ServiceHandleIOExceptionSMBExceptionprotected final void closeServiceManager(ServiceManagerHandle handle) throws IOException, SMBException
handle - ServiceManagerHandleIOExceptionSMBExceptionprotected final ServiceManagerHandle getManagerHandle()
public void ClosePipe()
throws IOException,
SMBException
ClosePipe in class IPCPipeFileIOExceptionSMBExceptionpublic final ServiceStatusExList getServiceListEx(int typ, int state) throws IOException, SMBException
typ - intstate - intIOExceptionSMBExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.