public class DefaultOperationRequestBuilder extends Object implements OperationRequestBuilder
Constructor and Description |
---|
DefaultOperationRequestBuilder() |
DefaultOperationRequestBuilder(OperationRequestAddress prefix) |
Modifier and Type | Method and Description |
---|---|
void |
addNode(String type,
String name)
The address is specified as a path to the target node.
|
void |
addNodeName(String name)
This method assumes there is a non-empty prefix which ends on a node type.
|
void |
addNodeType(String type)
This method is supposed to be invoked from applying the prefix with ends on a node type.
|
void |
addProperty(String name,
String value)
Adds an argument.
|
org.jboss.dmr.ModelNode |
buildRequest()
Makes sure that the operation name and the address have been set and returns a ModelNode
representing the operation request.
|
OperationRequestAddress |
getAddress() |
org.jboss.dmr.ModelNode |
getModelNode() |
void |
setOperationName(String name)
Sets the name operation to be invoked.
|
public DefaultOperationRequestBuilder()
public DefaultOperationRequestBuilder(OperationRequestAddress prefix)
public OperationRequestAddress getAddress()
public org.jboss.dmr.ModelNode buildRequest() throws OperationFormatException
buildRequest
in interface OperationRequestBuilder
OperationFormatException
public void setOperationName(String name)
OperationRequestBuilder
setOperationName
in interface OperationRequestBuilder
name
- the name of the operation to invoke.public void addNode(String type, String name)
OperationRequestBuilder
addNode
in interface OperationRequestBuilder
type
- the type of the nodename
- the name of the nodepublic void addNodeType(String type)
OperationRequestBuilder
addNodeType
in interface OperationRequestBuilder
type
- the type of the node.public void addNodeName(String name)
OperationRequestBuilder
addNodeName
in interface OperationRequestBuilder
name
- the name of the node for the type specified by the prefix.public void addProperty(String name, String value)
OperationRequestBuilder
addProperty
in interface OperationRequestBuilder
name
- the name of the argumentvalue
- the value of the argumentpublic org.jboss.dmr.ModelNode getModelNode()
Copyright © 2023 JBoss by Red Hat. All rights reserved.