Package org.netxms.client
Class MessageHandler
java.lang.Object
org.netxms.client.MessageHandler
Message handler interface
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected longintfinal booleanGet completion flagbooleanCheck if handler is expired.abstract booleanProcess message.protected final voidSet handler to complete state.protected voidSet handler as expired (also sets completion flag)protected voidsetLastMessageTimestamp(long lastMessageTimestamp) voidsetMessageWaitTimeout(int messageWaitTimeout) final voidWait for handler completion
- 
Constructor Details- 
MessageHandlerpublic MessageHandler()
 
- 
- 
Method Details- 
setCompleteprotected final void setComplete()Set handler to complete state. This will signal all waiters and remove subscription.
- 
isCompletepublic final boolean isComplete()Get completion flag- Returns:
- returns if message is complete
 
- 
waitForCompletionpublic final void waitForCompletion()Wait for handler completion
- 
getLastMessageTimestampprotected long getLastMessageTimestamp()- Returns:
- the lastMessageTimestamp
 
- 
setLastMessageTimestampprotected void setLastMessageTimestamp(long lastMessageTimestamp) - Parameters:
- lastMessageTimestamp- the lastMessageTimestamp to set
 
- 
isExpiredpublic boolean isExpired()Check if handler is expired.- Returns:
- true if handler is expired
 
- 
setExpiredprotected void setExpired()Set handler as expired (also sets completion flag)
- 
getMessageWaitTimeoutpublic int getMessageWaitTimeout()- Returns:
- the messageWaitTimeout
 
- 
setMessageWaitTimeoutpublic void setMessageWaitTimeout(int messageWaitTimeout) - Parameters:
- messageWaitTimeout- the messageWaitTimeout to set
 
- 
processMessageProcess message. If handler returns true message will not be placed into waiting queue.- Parameters:
- msg- NXCP message to process
- Returns:
- true if message is processed
 
 
-