public class MessageErrorHandler
extends java.lang.Object
Constructor and Description |
---|
MessageErrorHandler(java.lang.String queue)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
canProcess(java.util.Map<java.lang.String,java.lang.String> properties)
Select status and deleteflag to process message
|
void |
emailError(java.lang.Exception t,
java.lang.String uniqueId)
Email the incoming error having error file name info in the email.
|
boolean |
emailToBeSent(java.util.Map<java.lang.String,java.lang.String> msgProperties)
Check if email needs to go out or it's already been sent depending upon
if error record exists for a given queue or not
|
JMSData |
getCorrectedFile(JMSData data)
Return the appropriate data for the given incoming data.
|
JMSData |
getErrorMsgForSeqQueue(java.lang.String queueName) |
JMSData |
getJMSData(java.util.Map<java.lang.String,java.lang.String> msgProperties)
Take in incoming file name and return back it's relevant JMS Data object
for further processing.
|
boolean |
handleError(java.lang.Exception t,
java.util.Map<java.lang.String,java.lang.String> msgProperties)
Do whatever is needed to handle the error occure while processing the
message.
|
void |
initializeEmailInfo()
Initialize the email information for a given queue.
|
void |
setMaxTryCount(int newMaxTryCount)
Called on refresh of MaxQueueCache to reset try count
|
void |
success(JMSData data)
Perform necessary actions upon successful processing of the message.
|
public MessageErrorHandler(java.lang.String queue)
queue
- Name of the queue that is the handler is associate withpublic void initializeEmailInfo()
public JMSData getErrorMsgForSeqQueue(java.lang.String queueName) throws MXException
MXException
public int canProcess(java.util.Map<java.lang.String,java.lang.String> properties) throws MXException
proprties
- map of all message propertiesMXException
- MAXIMO exceptionpublic boolean handleError(java.lang.Exception t, java.util.Map<java.lang.String,java.lang.String> msgProperties)
t
- exceptionproperties
- map of all message propertiespublic JMSData getCorrectedFile(JMSData data)
data
- data from the queuepublic void success(JMSData data)
data
- data from the queuepublic JMSData getJMSData(java.util.Map<java.lang.String,java.lang.String> msgProperties) throws MXException
properties
- map of all message propertiesfilename
- name of the fileMXException
- MAXIMO exceptionpublic void emailError(java.lang.Exception t, java.lang.String uniqueId)
t
- exception from the processingerrorFileName
- error file namepublic boolean emailToBeSent(java.util.Map<java.lang.String,java.lang.String> msgProperties) throws MXException, java.rmi.RemoteException
msgProperties
- map of all message propertiesjava.rmi.RemoteException
- Remote exceptionMXException
public void setMaxTryCount(int newMaxTryCount)
newMaxTryCount
- new try count configured for the queue