java.lang.Object
org.eclipse.milo.opcua.sdk.client.methods.UaMethod

public class UaMethod extends Object
A callable method belonging to an ObjectNode.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UaMethod(OpcUaClient client, UaObjectNode objectNode, UaMethodNode methodNode, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] inputArguments, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] outputArguments)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]
    call(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs)
    Call this method, passing the values in inputs for the input arguments.
    CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]>
    callAsync(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs)
    Call this method, passing the values in inputs for the input arguments.
    org.eclipse.milo.opcua.stack.core.types.structured.Argument[]
    Get the input arguments for this method.
    Get the UaMethodNode for this method.
    Get the UaObjectNode this method belongs to.
    org.eclipse.milo.opcua.stack.core.types.structured.Argument[]
    Get the output arguments for this method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UaMethod

      public UaMethod(OpcUaClient client, UaObjectNode objectNode, UaMethodNode methodNode, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] inputArguments, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] outputArguments)
  • Method Details

    • getObjectNode

      public UaObjectNode getObjectNode()
      Get the UaObjectNode this method belongs to.
      Returns:
      the UaObjectNode this method belongs to.
    • getMethodNode

      public UaMethodNode getMethodNode()
      Get the UaMethodNode for this method.
      Returns:
      the UaMethodNode for this method.
    • getInputArguments

      public org.eclipse.milo.opcua.stack.core.types.structured.Argument[] getInputArguments()
      Get the input arguments for this method.

      The array will be empty if there are no inputs.

      Returns:
      the input arguments for this method.
    • getOutputArguments

      public org.eclipse.milo.opcua.stack.core.types.structured.Argument[] getOutputArguments()
      Get the output arguments for this method.

      The array will be empty if there are no outputs.

      Returns:
      the output arguments for this method.
    • call

      public org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] call(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) throws UaMethodException, org.eclipse.milo.opcua.stack.core.UaException
      Call this method, passing the values in inputs for the input arguments.
      Parameters:
      inputs - an array of Variants containing the input values.
      Returns:
      an array of Variants containing the output values.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.
      UaMethodException - if the operation-level result was not good.
    • callAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]> callAsync(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs)
      Call this method, passing the values in inputs for the input arguments.

      This method completes asynchronously.

      Parameters:
      inputs - an array of Variants containing the input values.
      Returns:
      a CompletableFuture that completes successfully with the output values or completes exceptionally if an operation- or service-level error occurs.