Class UimaMessageValidator

java.lang.Object
org.apache.uima.aae.message.UimaMessageValidator

public class UimaMessageValidator extends Object
  • Constructor Details

    • UimaMessageValidator

      public UimaMessageValidator()
  • Method Details

    • validMessageType

      public static boolean validMessageType(UimaMessage aMessage, String endpointName) throws Exception
      Validate message type contained in the JMS header.
      Parameters:
      aMessage - - jms message retrieved from queue
      properties - - map containing message properties
      Returns:
      Throws:
      Exception
    • isRequest

      public static boolean isRequest(UimaMessage aMessage) throws Exception
      Throws:
      Exception
    • isProcessRequest

      public static boolean isProcessRequest(UimaMessage aMessage) throws Exception
      Throws:
      Exception
    • validCommand

      public static boolean validCommand(UimaMessage aMessage, String endpointName) throws Exception
      Validate command contained in the header of the JMS Message
      Parameters:
      aMessage - - JMS Message received
      properties - - Map containing header properties
      Returns:
      - true if the command received is a valid one, false otherwise
      Throws:
      Exception
    • validPayload

      public static boolean validPayload(UimaMessage aMessage, String endpointName) throws Exception
      Validates payload in the JMS Message.
      Parameters:
      aMessage - - JMS Message received
      properties - - Map containing header properties
      Returns:
      - true if the payload is valid, false otherwise
      Throws:
      Exception
    • isStaleMessage

      public static boolean isStaleMessage(UimaMessage aMessage, boolean isStopped, String endpointName, boolean entryExists)
    • isValidMessage

      public static boolean isValidMessage(UimaMessage aMessage, AnalysisEngineController controller) throws Exception
      Validates contents of the message. It checks if command, payload and message types contain valid data.
      Parameters:
      aMessage - - JMS Message to validate
      Returns:
      - true if message is valid, false otherwise
      Throws:
      Exception
    • decodeIntToString

      public static String decodeIntToString(String aTypeToDecode, int aValueToDecode)