Class ProcessingInstructionHelper

java.lang.Object
org.axonframework.axonserver.connector.util.ProcessingInstructionHelper

public abstract class ProcessingInstructionHelper extends Object
Utility class contain helper methods to extract information from ProcessingInstructions.
Since:
4.0
Author:
Marc Gathier
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    axonServerSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
    Retrieve whether Axon Server supports streaming from the given processingInstructions, by searching for the value of ProcessingKey.SERVER_SUPPORTS_STREAMING.
    static boolean
    clientSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
    Retrieve whether Client (query issuer) supports streaming from the given processingInstructions, by searching for the value of ProcessingKey.CLIENT_SUPPORTS_STREAMING.
    static long
    numberOfResults(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
    Retrieve the desired 'number of results' as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.NR_OF_RESULTS.
    static long
    priority(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
    Retrieve the priority as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.PRIORITY.
    static long
    timeout(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
    Retrieve the desired 'number of results' as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.NR_OF_RESULTS.

    Methods inherited from class java.lang.Object

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

    • priority

      public static long priority(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
      Retrieve the priority as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.PRIORITY.
      Parameters:
      processingInstructions - a List of ProcessingInstructions to retrieve the ProcessingKey.PRIORITY from
      Returns:
      a long specifying the priority of a given operation
    • numberOfResults

      public static long numberOfResults(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
      Retrieve the desired 'number of results' as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.NR_OF_RESULTS.
      Parameters:
      processingInstructions - a List of ProcessingInstructions to retrieve the ProcessingKey.NR_OF_RESULTS from
      Returns:
      a long specifying the desired 'number of results' for a given operation
    • axonServerSupportsQueryStreaming

      public static boolean axonServerSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
      Retrieve whether Axon Server supports streaming from the given processingInstructions, by searching for the value of ProcessingKey.SERVER_SUPPORTS_STREAMING.
      Parameters:
      processingInstructions - a List of ProcessingInstructions to retrieve the ProcessingKey.SERVER_SUPPORTS_STREAMING from
      Returns:
      true if Axon Server supports streaming, false otherwise
    • clientSupportsQueryStreaming

      public static boolean clientSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
      Retrieve whether Client (query issuer) supports streaming from the given processingInstructions, by searching for the value of ProcessingKey.CLIENT_SUPPORTS_STREAMING.
      Parameters:
      processingInstructions - a List of ProcessingInstructions to retrieve the ProcessingKey.CLIENT_SUPPORTS_STREAMING from
      Returns:
      true if Client supports streaming, false otherwise
    • timeout

      public static long timeout(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions)
      Retrieve the desired 'number of results' as a long from the given processingInstructions, by searching for the ProcessingInstruction who's key equals the ProcessingKey.NR_OF_RESULTS.
      Parameters:
      processingInstructions - a List of ProcessingInstructions to retrieve the ProcessingKey.NR_OF_RESULTS from
      Returns:
      a long specifying the desired 'number of results' for a given operation