- @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "This field is not Serializable but this class "
- + "implements writeReplace to delegate serialization to a Proxy class and thus instances of this class "
- + "aren't serialized. FindBugs does not recognize this.")
- private final NormalizedNode<?, ?> inputNormalizedNode;
- private final QName rpc;
-
- private ExecuteRpc(@Nullable final NormalizedNode<?, ?> inputNormalizedNode, @Nonnull final QName rpc) {
- this.rpc = Preconditions.checkNotNull(rpc, "rpc Qname should not be null");
- this.inputNormalizedNode = inputNormalizedNode;
- }
-
- public static ExecuteRpc from(@Nonnull final DOMRpcIdentifier rpc, @Nullable final NormalizedNode<?, ?> input) {
- return new ExecuteRpc(input, rpc.getType().getLastComponent());
- }
-
- @Nullable
- public NormalizedNode<?, ?> getInputNormalizedNode() {
- return inputNormalizedNode;