public class CallAS7 extends JdrCommand
Command to call the AS 7 management system and store the output in a file.
This class' methods are meant to be chained together to describe a management call. For example:
new CallAS7("my_file").resource("foo", "bar").operation("read-resource")
will return a configured CallAS7 instance that will, when executed call read-resource
on the /foo=bar/
resource, and store the output in a file called my_file.json
.
Constructor and Description |
---|
CallAS7(String name)
constructs an instance and sets the resulting file name
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
executes the command
JdrPlugin implementations do not need to call this method. |
CallAS7 |
operation(String operation)
sets the operation to call
|
CallAS7 |
param(String key,
String val)
adds a key/value parameter pair to the call
|
CallAS7 |
resource(String... parts)
appends resource parts to the resource to call
|
setEnvironment
public CallAS7(String name)
name
- of the file to write results topublic CallAS7 operation(String operation)
operation
- to call, defaults to read-resource
public CallAS7 param(String key, String val)
key
- val
- public CallAS7 resource(String... parts)
.resource("foo", "bar", "baz", "boo")
parts
- to callpublic void execute() throws Exception
JdrCommand
JdrPlugin
implementations do not need to call this method.execute
in class JdrCommand
Exception
Copyright © 2018 JBoss by Red Hat. All rights reserved.