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, toString
public SvcctlPipeFile(IPCSession sess, DCEPacket pkt, int handle, String name, int maxTx, int maxRx) throws IOException, SMBException
sess
- SMBIPCSessionpkt
- DCEPackethandle
- intname
- StringmaxTx
- intmaxRx
- intIOException
SMBException
protected final ServiceManagerHandle openServiceControlManager() throws IOException, SMBException
IOException
SMBException
protected final ServiceManagerHandle openServiceControlManager(int accessMode) throws IOException, SMBException
accessMode
- intIOException
SMBException
public 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
- StringIOException
SMBException
public 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[]IOException
SMBException
public final void deleteService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final ServiceHandle openService(String serviceName) throws IOException, SMBException
serviceName
- StringIOException
SMBException
public final ServiceHandle openService(String serviceName, int accessMode) throws IOException, SMBException
serviceName
- StringaccessMode
- intIOException
SMBException
public final ServiceConfigInfo getServiceConfiguration(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final int setServiceConfiguration(ServiceHandle handle, ServiceConfigInfo config) throws IOException, SMBException, DCEBufferException
handle
- ServiceHandleconfig
- ServiceConfigInfoIOException
SMBException
DCEBufferException
public final ServiceStatusList getServiceList(int typ, int state) throws IOException, SMBException
typ
- intstate
- intIOException
SMBException
public final ServiceStatusInfo getServiceStatus(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final void startService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final void stopService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final void pauseService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final void resumeService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
public final void controlService(ServiceHandle handle, int ctrl) throws IOException, SMBException
handle
- ServiceHandlectrl
- intIOException
SMBException
public final void closeService(ServiceHandle handle) throws IOException, SMBException
handle
- ServiceHandleIOException
SMBException
protected final void closeServiceManager(ServiceManagerHandle handle) throws IOException, SMBException
handle
- ServiceManagerHandleIOException
SMBException
protected final ServiceManagerHandle getManagerHandle()
public void ClosePipe() throws IOException, SMBException
ClosePipe
in class IPCPipeFile
IOException
SMBException
public final ServiceStatusExList getServiceListEx(int typ, int state) throws IOException, SMBException
typ
- intstate
- intIOException
SMBException
Copyright © 2005–2017 Alfresco Software. All rights reserved.