public final class AHCHttpNodeClient extends java.lang.Object implements INodeClient
| Constructor and Description | 
|---|
AHCHttpNodeClient(HostPortClient cli)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
asyncExecute(ExecRequest req,
            ProcessHandler ph)  | 
void | 
deleteFile(java.lang.String path)
Delete a file 
 | 
TaskRef | 
executeCommand(ExecRequest tsk)
Runs a command. 
 | 
TaskRef | 
executeCommand(java.lang.String cmd)
Starts a command in backend and returns a ref to track its progress. 
 | 
TaskRef | 
executeCommandNoOut(java.lang.String cmd)
Starts a command in backend and returns a ref to track its progress No
 output, receive "Done" when command finish. 
 | 
java.util.List<ExecDescriptor> | 
getActiveExecutions(ActiveExecQuery query)
Returns a list of running process matching the given query object. 
 | 
TaskStatus | 
getExecutionStatus(TaskRef task)
Tracks the progress of a task 
 | 
void | 
interrupt(ExecDescriptor runningTask)  | 
java.util.List<FileDescription> | 
listFiles(java.lang.String path)
List files from path. 
 | 
java.util.List<FileDescription> | 
listFiles(java.lang.String path,
         java.lang.String extensionPattern)
List files from path matching extension. 
 | 
java.io.InputStream | 
openStream(java.lang.String path)
Opens a stream to a (maybe) remote file. 
 | 
void | 
ping()
Checks we can connect to a node. 
 | 
byte[] | 
read(java.lang.String path)
Fetches a file content into ram. 
 | 
void | 
writeFile(java.lang.String path,
         java.io.InputStream content)
(Over)writes the file at path with content. 
 | 
public AHCHttpNodeClient(HostPortClient cli)
public void ping()
          throws ServerFault
INodeClientping in interface INodeClientServerFault - if the connection does not workpublic byte[] read(java.lang.String path)
            throws ServerFault
INodeClientread in interface INodeClientServerFaultpublic java.io.InputStream openStream(java.lang.String path)
                               throws ServerFault
INodeClientopenStream in interface INodeClientServerFaultpublic void writeFile(java.lang.String path,
                      java.io.InputStream content)
               throws ServerFault
INodeClientwriteFile in interface INodeClientServerFaultpublic void deleteFile(java.lang.String path)
                throws ServerFault
INodeClientdeleteFile in interface INodeClientServerFaultpublic TaskRef executeCommand(java.lang.String cmd) throws ServerFault
INodeClientexecuteCommand in interface INodeClientServerFaultpublic TaskRef executeCommand(ExecRequest tsk) throws ServerFault
INodeClientExecRequest.group and
 ExecRequest.name can be used to provide a stable name to tasksexecuteCommand in interface INodeClientServerFaultpublic TaskRef executeCommandNoOut(java.lang.String cmd) throws ServerFault
INodeClientexecuteCommandNoOut in interface INodeClientServerFaultpublic TaskStatus getExecutionStatus(TaskRef task) throws ServerFault
INodeClientgetExecutionStatus in interface INodeClientServerFaultpublic java.util.List<FileDescription> listFiles(java.lang.String path, java.lang.String extensionPattern) throws ServerFault
INodeClientlistFiles in interface INodeClientServerFaultpublic java.util.List<FileDescription> listFiles(java.lang.String path) throws ServerFault
INodeClientlistFiles in interface INodeClientServerFaultpublic java.util.List<ExecDescriptor> getActiveExecutions(ActiveExecQuery query)
INodeClientActiveExecQuery.group and ActiveExecQuery.name might be
 null for wider matches.getActiveExecutions in interface INodeClientpublic void interrupt(ExecDescriptor runningTask)
interrupt in interface INodeClientpublic void asyncExecute(ExecRequest req, ProcessHandler ph)
asyncExecute in interface INodeClientCopyright © 2021. All Rights Reserved.