public final class MessageEvent extends Event implements MessageChannelEvent
count, head, next, prev
Modifier and Type | Method and Description |
---|---|
static MessageEvent |
create(MessageBusBinding binding,
MessageChannel channel,
MessageView view,
IEventAcknowledger acknowledger)
Create a new (initialized) message event.
|
static Event |
create(Properties props)
Create a new (uninitialized) message event.
|
boolean |
getAutoAck()
Get whether the message associated with this event should be auto
acknowledged upon return from the event handler.
|
MessageChannel |
getMessageChannel()
Implementation of
MessageChannelEvent.getMessageChannel() |
MessageView |
getMessageView()
Get the received message (view).
|
boolean |
isLocal()
Tests if this MessageEvent originated locally.
|
void |
setAutoAck(boolean val)
Set whether the message associated with this event should be auto
acknowledged upon return from the event handler.
|
String |
toString()
Get a string representation of a message event.
|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getOfferTs, getPollTs, getPool, getRemainingTime, getScheduledTime, getSource, getType, init, isEndOfBatch, isHandled, owners, referenceTracker, setAcknowledger, setAttachment, setDelay, setDispatchTime, setEndOfBatch, setHandled, setPool, setScheduledTime, setSource
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe
public static Event create(Properties props)
This method instantiates a new message event object. The method is for use by the event factory to instantiate new message events. The method should not be used directly by the user since the method bypasses any event pooling i.e. it creates a new message event object even if there are eligible event objects available in the event type's pool.
public static MessageEvent create(MessageBusBinding binding, MessageChannel channel, MessageView view, IEventAcknowledger acknowledger)
binding
- The binding from where this event originatedchannel
- The channel through where the message was received.view
- A view of the received message.
This method instantiates and initializes a message event. The method uses the packet factory to instantiate a new message evemt (the factory recycles objects through the event type's object pool is configured for the type) and then initializes it with the supplied parameters.
public final MessageChannel getMessageChannel()
MessageChannelEvent.getMessageChannel()
getMessageChannel
in interface MessageChannelEvent
public final MessageView getMessageView()
public final void setAutoAck(boolean val)
Setting the auto-ack attribute to true will cause the SMA runtime to automatically acknowledge a message upon successful return from the user event handler. This attribute is only applicable to guaranteed messages. The default value for this attribute is true i.e. if not explicitly specified via this attribute guaranteed messages that are successfully processed (i.e. no exception thrown by the user event handler) are automatically acknowledged by the SMA runtime.
public final boolean getAutoAck()
public final boolean isLocal()
isLocal
in interface MessageChannelEvent
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.