com.neeve.sma.event
Class UnhandledMessageEvent

java.lang.Object
  extended by com.neeve.util.UtlListElement
      extended by com.neeve.event.Event
          extended by com.neeve.sma.event.UnhandledMessageEvent
All Implemented Interfaces:
com.neeve.event.IEvent, com.neeve.util.UtlPool.Item<com.neeve.event.Event>, com.neeve.util.UtlReferenceTracker.HasReferenceTracker

public final class UnhandledMessageEvent
extends com.neeve.event.Event

Event notifying that a received message was unhandled

Threading:
This class is safe for concurrent access by multiple threads.

Field Summary
 
Fields inherited from class com.neeve.util.UtlListElement
count, head, next, prev
 
Method Summary
static UnhandledMessageEvent create(MessageBusBinding binding, MessageMetadata messageMetadata, String messageKey, Object unwrappedMessage, Throwable reason)
          Create a new (initialized) unhandled message event.
static com.neeve.event.Event create(Properties props)
          Create a new (uninitialized) unhandled message event.
 String getMessageKey()
          Get the unhandled message's key
 MessageMetadata getMessageMetadata()
          Get the unhandled message's metadata
 Throwable getReason()
          Get a Throwable object describing the reason why the message was unhandled
 Object getUnwrappedMessage()
          Get the unwrapped (un-deserialized) message
 String toString()
          Get a string representation of a message event
 
Methods inherited from class com.neeve.event.Event
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getPool, getRemainingTime, getScheduledTime, getSource, getType, init, isEndOfBatch, isHandled, owners, referenceTracker, setAcknowledger, setAttachment, setDelay, setDispatchTime, setEndOfBatch, setHandled, setPool, setScheduledTime
 
Methods inherited from class com.neeve.util.UtlListElement
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static com.neeve.event.Event create(Properties props)
Create a new (uninitialized) unhandled message event.

This method instantiates a new unhandled message event object. The method is for use by the event factory to instantiate new reconnected events. The method should not be used directly by the user since the method bypasses any event pooling i.e. it creates a new reconnected event object even if there are eligible event objects available in the event type's pool.


create

public static UnhandledMessageEvent create(MessageBusBinding binding,
                                           MessageMetadata messageMetadata,
                                           String messageKey,
                                           Object unwrappedMessage,
                                           Throwable reason)
Create a new (initialized) unhandled message event.

Parameters:
binding - The binding from where the event originated
messageMetadata - The received message's metadata
messageKey - The received message's key (may be null)
unwrappedMessage - The unwrapped (un-deserialized) message
reason - The reason why the message was unhandled

This method instantiates and initializes a unhandled message event. The method uses the packet factory to instantiate a new reconnected event (the factory recycles objects through the event type's object pool is configured for the type) and then initializes it with the supplied parameters.


getMessageMetadata

public final MessageMetadata getMessageMetadata()
Get the unhandled message's metadata


getMessageKey

public final String getMessageKey()
Get the unhandled message's key


getUnwrappedMessage

public final Object getUnwrappedMessage()
Get the unwrapped (un-deserialized) message


getReason

public final Throwable getReason()
Get a Throwable object describing the reason why the message was unhandled


toString

public final String toString()
Get a string representation of a message event

Overrides:
toString in class com.neeve.event.Event


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.