Package net.bluemind.node.api
Class NCUtils
java.lang.Object
net.bluemind.node.api.NCUtils
Helper methods for monitoring tasks running a remote node using
 
INodeClient- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic ExitListexec(INodeClient nc, long delay, TimeUnit unit, String... argv) static ExitListexec(INodeClient nc, String... argv) static ExitListexec(INodeClient nc, List<String> argv) Waits for a tasks to complete, returning its output.static ExitListexec(INodeClient nc, List<String> argv, long delay, TimeUnit unit) The command runs over a websocketstatic voidexecNoOut(INodeClient nc, long delay, TimeUnit unit, String... argv) static voidexecNoOut(INodeClient nc, String... argv) static voidexecNoOut(INodeClient nc, List<String> argv) Waits for a tasks to complete, don't retrieve its output.static voidexecNoOut(INodeClient nc, List<String> argv, long delay, TimeUnit unit) The commands runs over a websocketstatic voidexecOrFail(INodeClient nc, String... argv) static voidexecOrFail(INodeClient nc, List<String> argv) Waits for a tasks to complete, throws ServerFault if task failsstatic voidforget(INodeClient nc, String... argv) static voidforget(INodeClient nc, List<String> argv) Spawns a tasks.static ExitListwaitFor(INodeClient nc, TaskRef ref) Waits for a tasks to complete and returns its output 
- 
Constructor Details
- 
NCUtils
public NCUtils() 
 - 
 - 
Method Details
- 
exec
Waits for a tasks to complete, returning its output.- Parameters:
 nc-cmd-- Returns:
 - the command output
 - Throws:
 ServerFault
 - 
exec
- Throws:
 ServerFault
 - 
exec
public static ExitList exec(INodeClient nc, List<String> argv, long delay, TimeUnit unit) throws ServerFault The command runs over a websocket- Parameters:
 nc-delay-unit-cmd-- Returns:
 - Throws:
 ServerFault
 - 
exec
public static ExitList exec(INodeClient nc, long delay, TimeUnit unit, String... argv) throws ServerFault - Throws:
 ServerFault
 - 
execNoOut
Waits for a tasks to complete, don't retrieve its output.- Parameters:
 nc-cmd-- Throws:
 ServerFault
 - 
execNoOut
- Throws:
 ServerFault
 - 
execNoOut
public static void execNoOut(INodeClient nc, List<String> argv, long delay, TimeUnit unit) throws ServerFault The commands runs over a websocket- Parameters:
 nc-delay-unit-cmd-- Throws:
 ServerFault
 - 
execNoOut
public static void execNoOut(INodeClient nc, long delay, TimeUnit unit, String... argv) throws ServerFault - Throws:
 ServerFault
 - 
execOrFail
Waits for a tasks to complete, throws ServerFault if task fails- Parameters:
 nc-cmd-- Throws:
 ServerFault
 - 
execOrFail
- Throws:
 ServerFault
 - 
forget
Spawns a tasks. Use it when you don't care about the task result or completion.- Parameters:
 nc-cmd-- Throws:
 ServerFault
 - 
forget
 - 
waitFor
Waits for a tasks to complete and returns its output- Parameters:
 nc-ref-- Returns:
 - Throws:
 ServerFault
 - 
connectedToMyself
- Throws:
 ServerFault
 
 -