|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linkedin.glu.agent.rest.common.AgentRestUtils
class AgentRestUtils
Field Summary | |
---|---|
static java.lang.String |
MODULE
|
static Logger |
log
|
Method Summary | |
---|---|
static java.lang.Object
|
demultiplexExecStream(java.io.InputStream execStream, java.io.OutputStream stdout, java.io.OutputStream stderr)
Demultiplexes the exec stream as generated by
org.linkedin.glu.agent.api.Shell#exec(Map) when |
static java.lang.Throwable
|
rebuildAgentException(RestException restException)
This method will try to rebuild the full stack trace based on the rest exception recursively. |
static AgentException
|
throwAgentException(Status status, RestException restException)
This method will try to rebuild the full stack trace based on the rest exception recursively. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final java.lang.String MODULE
public static final Logger log
Method Detail |
---|
static java.lang.Object demultiplexExecStream(java.io.InputStream execStream, java.io.OutputStream stdout, java.io.OutputStream stderr)
args.res
is
stream
. The following is equivalent:
OutputStream myStdout = ...
OutputStream myStderr = ...
exec(command: xxx, stdout: myStdout, stderr: myStderr, res: exitValue)
is 100% equivalent to:
demultiplexExecStream(exec(command: xxx, res: stream), myStdout, myStderr)args.failOnError
was set to true
execStream
- the stream as generated by org.linkedin.glu.agent.api.Shell#exec(Map)stdout
- the stream to write the output (optional, can be null
)stderr
- the stream to write the error (optional, can be null
)
static java.lang.Throwable rebuildAgentException(RestException restException)
static AgentException throwAgentException(Status status, RestException restException)
Groovy Documentation