public static interface ShellCommandUtil.InteractiveHandler
Classes should implement this interface if there is a need to supply responses to queries from the executed command (interactively, via stdin).
Modifier and Type | Method and Description |
---|---|
boolean |
done()
Indicates whether this
ShellCommandUtil.InteractiveHandler expects more queries (true
or not (false ) |
String |
getResponse(String query)
Given a query, returns the relative response to send to the shell command (via stdin)
|
void |
start()
Starts or resets this handler.
|
boolean done()
ShellCommandUtil.InteractiveHandler
expects more queries (true
or not (false
)String getResponse(String query)
query
- a string containing the query that needs a responsevoid start()
It is expected that the caller calls this before using handler.
Copyright © 2022 Apache Software Foundation. All rights reserved.