public final class NCUtils
extends java.lang.Object
INodeClient| Constructor and Description | 
|---|
NCUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
connectedToMyself(INodeClient nc)  | 
static ExitList | 
exec(INodeClient nc,
    java.lang.String cmd)
Waits for a tasks to complete, returning its output. 
 | 
static ExitList | 
exec(INodeClient nc,
    java.lang.String cmd,
    long delay,
    java.util.concurrent.TimeUnit unit)
The command runs over a websocket 
 | 
static void | 
execNoOut(INodeClient nc,
         java.lang.String cmd)
Waits for a tasks to complete, don't retrieve its output. 
 | 
static void | 
execNoOut(INodeClient nc,
         java.lang.String cmd,
         long delay,
         java.util.concurrent.TimeUnit unit)
The commands runs over a websocket 
 | 
static void | 
execOrFail(INodeClient nc,
          java.lang.String cmd)
Waits for a tasks to complete, throws ServerFault if task fails 
 | 
static void | 
forget(INodeClient nc,
      java.lang.String cmd)
Spawns a tasks. 
 | 
static ExitList | 
waitFor(INodeClient nc,
       TaskRef ref)
Waits for a tasks to complete and returns its output 
 | 
public static ExitList exec(INodeClient nc, java.lang.String cmd) throws ServerFault
nc - cmd - ServerFaultpublic static ExitList exec(INodeClient nc, java.lang.String cmd, long delay, java.util.concurrent.TimeUnit unit) throws ServerFault
nc - cmd - delay - unit - ServerFaultpublic static void execNoOut(INodeClient nc, java.lang.String cmd) throws ServerFault
nc - cmd - ServerFaultpublic static void execNoOut(INodeClient nc, java.lang.String cmd, long delay, java.util.concurrent.TimeUnit unit) throws ServerFault
nc - cmd - delay - unit - ServerFaultpublic static void execOrFail(INodeClient nc, java.lang.String cmd) throws ServerFault
nc - cmd - ServerFaultpublic static void forget(INodeClient nc, java.lang.String cmd)
nc - cmd - ServerFaultpublic static ExitList waitFor(INodeClient nc, TaskRef ref) throws ServerFault
nc - ref - ServerFaultpublic static boolean connectedToMyself(INodeClient nc) throws ServerFault
ServerFaultCopyright © 2021. All Rights Reserved.