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
- ServerFault
public static ExitList exec(INodeClient nc, java.lang.String cmd, long delay, java.util.concurrent.TimeUnit unit) throws ServerFault
nc
- cmd
- delay
- unit
- ServerFault
public static void execNoOut(INodeClient nc, java.lang.String cmd) throws ServerFault
nc
- cmd
- ServerFault
public static void execNoOut(INodeClient nc, java.lang.String cmd, long delay, java.util.concurrent.TimeUnit unit) throws ServerFault
nc
- cmd
- delay
- unit
- ServerFault
public static void execOrFail(INodeClient nc, java.lang.String cmd) throws ServerFault
nc
- cmd
- ServerFault
public static void forget(INodeClient nc, java.lang.String cmd)
nc
- cmd
- ServerFault
public static ExitList waitFor(INodeClient nc, TaskRef ref) throws ServerFault
nc
- ref
- ServerFault
public static boolean connectedToMyself(INodeClient nc) throws ServerFault
ServerFault
Copyright © 2021. All Rights Reserved.