Package org.apache.uima.aae.message
Class UimaMessageValidator
java.lang.Object
org.apache.uima.aae.message.UimaMessageValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeIntToString(String aTypeToDecode, int aValueToDecode) static booleanisProcessRequest(UimaMessage aMessage) static booleanisRequest(UimaMessage aMessage) static booleanisStaleMessage(UimaMessage aMessage, boolean isStopped, String endpointName, boolean entryExists) static booleanisValidMessage(UimaMessage aMessage, AnalysisEngineController controller) Validates contents of the message.static booleanvalidCommand(UimaMessage aMessage, String endpointName) Validate command contained in the header of the JMS Messagestatic booleanvalidMessageType(UimaMessage aMessage, String endpointName) Validate message type contained in the JMS header.static booleanvalidPayload(UimaMessage aMessage, String endpointName) Validates payload in the JMS Message.
-
Constructor Details
-
UimaMessageValidator
public UimaMessageValidator()
-
-
Method Details
-
validMessageType
Validate message type contained in the JMS header.- Parameters:
aMessage- - jms message retrieved from queueproperties- - map containing message properties- Returns:
- Throws:
Exception
-
isRequest
- Throws:
Exception
-
isProcessRequest
- Throws:
Exception
-
validCommand
Validate command contained in the header of the JMS Message- Parameters:
aMessage- - JMS Message receivedproperties- - Map containing header properties- Returns:
- - true if the command received is a valid one, false otherwise
- Throws:
Exception
-
validPayload
Validates payload in the JMS Message.- Parameters:
aMessage- - JMS Message receivedproperties- - 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
-