|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.sma.MessageViewImpl
com.neeve.sma.RawMessageViewImpl
public final class RawMessageViewImpl
Implements the raw message view.
| Field Summary |
|---|
| Fields inherited from class com.neeve.util.UtlListElement |
|---|
count, head, next, prev |
| Fields inherited from interface com.neeve.sma.MessageView |
|---|
ENCODING_TYPE_CUSTOM, ENCODING_TYPE_JSON, ENCODING_TYPE_PROTOBUF, ENCODING_TYPE_XBUF, NEXT_FREE_ENCODING_TYPE |
| Method Summary | |
|---|---|
RawMessageViewImpl |
copy()
Creates a shallow copy of the object. |
RawMessageViewImpl |
deserializeFromByteArray(byte[] array)
Implementation of MessageView.deserializeFromByteArray(byte[]) |
RawMessageViewImpl |
deserializeFromByteBuffer(ByteBuffer buffer)
Implementation of MessageView.deserializeFromByteBuffer(java.nio.ByteBuffer) |
RawMessageViewImpl |
deserializeFromJson(String json)
Implementation of MessageView.deserializeFromJson(java.lang.String) |
RawMessageViewImpl |
deserializeFromPacket(PktPacket packet)
Implementation of MessageView.deserializeFromPacket(com.neeve.pkt.PktPacket) |
int |
dispose()
Default implementation of MessageView.dispose()
This is the default implementation of the dispose method. |
long |
getAppSendBeginTs()
Get's the time at which the application considers send for a message to start. |
long |
getAppSendDoneTs()
Get's the time at which the application considers send for a message to be complete. |
long |
getCreateTs()
Get a message's create timestamp. |
long |
getEnqueueTs()
Get a message's enqueue timestamp in milliseconds |
long |
getEnqueueTsMicros()
Get a message's enqueue timestamp This timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue. |
String |
getMessageBus()
Implementation of MessageView.getMessageBus() |
XString |
getMessageBusAsRaw()
Implementation of MessageView.getMessageBusAsRaw() |
String |
getMessageChannel()
Implementation of MessageView.getMessageChannel() |
XString |
getMessageChannelAsRaw()
Implementation of MessageView.getMessageChannelAsRaw() |
int |
getMessageFlow()
Implementation of MessageView.getMessageFlow() |
String |
getMessageKey()
Implementation of MessageView.getMessageKey() |
XString |
getMessageKeyAsRaw()
Implementation of MessageView.getMessageKeyAsRaw() |
int |
getMessageSender()
Implementation of MessageView.getMessageSender() |
long |
getMessageSequenceNumber()
Implementation of MessageView.getMessageSequenceNumber() |
long |
getOriginTs()
Get a message's origin timestamp. |
long |
getOutTs()
Get a message's out timestamp. |
long |
getOutTsMicros()
Get a message's out timestamp in microseconds since the epoch. |
UtlPool<RawMessageViewImpl> |
getPool()
Get a pool item's pool. |
long |
getPostDeserializeTs()
Get a message's post-deserialize timestamp. |
long |
getPostProcessingTs()
Deprecated. |
long |
getPostProcessingTsMicros()
Get a message's post-processing timestamp. |
long |
getPostSerializeTs()
Get a message's post-serialize timestamp. |
long |
getPostWireSendTs()
Get a message's post-wire timestamp. |
long |
getPostWireTs()
Get a message's post-wire timestamp. |
long |
getPreDeserializeTs()
Get a message's pre-deserialize timestamp. |
long |
getPreProcessingTs()
Get a message's pre-processing timestamp. |
long |
getPreProcessingTsMicros()
Get a message's pre-processing timestamp in microseconds. |
long |
getPreSerializeTs()
Get a message's pre-serialize timestamp. |
long |
getPreWireTs()
Get a message's pre-wire timestamp. |
long |
getReceiveTs()
Get a message's receive timestamp. |
long |
getSendStartTs()
Get a message's send timestamp. |
long |
getSendTs()
Get a message's send timestamp. |
RawMessageViewImpl |
init()
Initialize an item. |
boolean |
isPossibleDuplicate()
Implementation of MessageView.isPossibleDuplicate() |
byte[] |
serializeToByteArray()
Implementation of MessageView.serializeToByteArray() |
ByteBuffer |
serializeToByteBuffer()
Implementation of MessageView.serializeToByteBuffer() |
com.neeve.io.IOBuffer |
serializeToIOBuffer(boolean useNative)
Serializes the MessageView to an IOBuffer. |
String |
serializeToJson()
Implementation of MessageView.serializeToJson() |
PktPacket |
serializeToPacket()
Implementation of MessageView.serializeToPacket() |
MessageView |
setAppSendBeginTs(long ts)
Time at which the application considers send for a message to start. |
MessageView |
setAppSendDoneTs(long ts)
Set's the time at which the application considers send for a message to be complete. |
MessageView |
setCreateTs(long ts)
Set a message's create timestamp. |
MessageView |
setEnqueueTsMicros(long ts)
Sets a message's enqueue timestamp This timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue. |
MessageView |
setMessageBus(String name)
Implementation of MessageView.setMessageBus(java.lang.String) |
MessageView |
setMessageBusAsRaw(XString bus)
Implementation of MessageView.setMessageBusAsRaw(com.neeve.lang.XString) |
MessageView |
setMessageChannel(String name)
Implementation of MessageView.setMessageChannel(java.lang.String) |
MessageView |
setMessageChannelAsRaw(XString channel)
Implementation of MessageView.setMessageChannelAsRaw(com.neeve.lang.XString) |
MessageView |
setMessageFlow(int flow)
Implementation of MessageView.setMessageFlow(int) |
MessageView |
setMessageKey(String key)
Implementation of MessageView.setMessageKey(java.lang.String) |
MessageView |
setMessageKeyAsRaw(XString key)
Implementation of MessageView.setMessageKey(java.lang.String) |
MessageView |
setMessageSender(int sender)
Implementation of MessageView.setMessageSender(int) |
MessageView |
setMessageSequenceNumber(long sno)
Implementation of MessageView.setMessageSequenceNumber(long) |
MessageView |
setOriginTs(long ts)
Set a message's origin timestamp. |
MessageView |
setOutTs(long ts)
Deprecated. |
MessageView |
setOutTsMicros(long ts)
Set a message's out timestamp in microseconds since the epoch. |
RawMessageViewImpl |
setPool(UtlPool<RawMessageViewImpl> pool)
Set a pool item's pool. |
MessageView |
setPossibleDuplicate()
Implementation of MessageView.setPossibleDuplicate() |
MessageView |
setPostDeserializeTs(long ts)
Set a message's post-deserialize timestamp. |
MessageView |
setPostProcessingTs(long ts)
Deprecated. |
MessageView |
setPostProcessingTsMicros(long ts)
Set a message's post-processing timestamp. |
MessageView |
setPostSerializeTs(long ts)
Set a message's post-serialize timestamp. |
RawMessageViewImpl |
setPostWireSendTs(long ts)
Set a message's post-wire send timestamp. |
MessageView |
setPostWireTs(long ts)
Set a message's post-wire timestamp. |
MessageView |
setPreDeserializeTs(long ts)
Set a message's pre-deserialize timestamp. |
MessageView |
setPreProcessingTs(long ts)
Deprecated. |
MessageView |
setPreProcessingTsMicros(long ts)
Set a message's pre-processing timestamp in microseconds. |
MessageView |
setPreSerializeTs(long ts)
Set a message's pre-serialize timestamp. |
MessageView |
setPreWireTs(long ts)
Set a message's pre-wire timestamp. |
MessageView |
setReceiveTs(long ts)
Set a message's receive timestamp. |
MessageView |
setSendStartTs(long ts)
Set a message's send timestamp. |
MessageView |
setSendTs(long ts)
Set a message's send timestamp. |
void |
sync()
Implementation of MessageView.sync() |
| Methods inherited from class com.neeve.sma.MessageViewImpl |
|---|
acquire, getMessage, getMessageEncodingType, getOwnershipCount, getTag, getType, getVfid, referenceTracker, setTag, toString |
| 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 |
| Methods inherited from interface com.neeve.sma.MessageView |
|---|
acquire, getMessage, getMessageEncodingType, getOwnershipCount, getTag, getType, getVfid, setTag |
| Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker |
|---|
referenceTracker |
| Method Detail |
|---|
public final RawMessageViewImpl init()
UtlPool.ItemThis method is invoked by an item pool very time an item is put into the pool. The method should wipe the contents of the item so as to present a fresh instance of the item to the caller when retrieved from the pool.
init in interface UtlPool.Item<RawMessageViewImpl>public final RawMessageViewImpl setPool(UtlPool<RawMessageViewImpl> pool)
UtlPool.ItemThis method is invoked by an item pool at the time an item is added to the pool. The intent is to record the item's source pool in the item so it can be disposed back into the pool when the user is done working with it.
setPool in interface UtlPool.Item<RawMessageViewImpl>public final UtlPool<RawMessageViewImpl> getPool()
UtlPool.Item
This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool
getPool in interface UtlPool.Item<RawMessageViewImpl>UtlPool.Item.setPool(com.neeve.util.UtlPool) public int dispose()
MessageViewImplMessageView.dispose()
This is the default implementation of the dispose method. The implementation just decrements the ownership count. Implementations that implement view object pooling or other such functionality should override this method but invoke this method to decrement the object reference count.
dispose in interface MessageViewdispose in class MessageViewImplpublic final MessageView setMessageBus(String name)
MessageView.setMessageBus(java.lang.String)
setMessageBus in interface MessageViewname - The message bus name to set.
public final String getMessageBus()
MessageView.getMessageBus()
getMessageBus in interface MessageViewpublic final MessageView setMessageBusAsRaw(XString bus)
MessageView.setMessageBusAsRaw(com.neeve.lang.XString)
setMessageBusAsRaw in interface MessageViewbus - The message bus to set.
public final XString getMessageBusAsRaw()
MessageView.getMessageBusAsRaw()
getMessageBusAsRaw in interface MessageViewpublic final MessageView setMessageChannel(String name)
MessageView.setMessageChannel(java.lang.String)
setMessageChannel in interface MessageViewname - The message channel name to set.
public final String getMessageChannel()
MessageView.getMessageChannel()
getMessageChannel in interface MessageViewpublic final MessageView setMessageChannelAsRaw(XString channel)
MessageView.setMessageChannelAsRaw(com.neeve.lang.XString)
setMessageChannelAsRaw in interface MessageViewchannel - The message channel to set.
public final XString getMessageChannelAsRaw()
MessageView.getMessageChannelAsRaw()
getMessageChannelAsRaw in interface MessageViewpublic final MessageView setMessageKey(String key)
MessageView.setMessageKey(java.lang.String)
setMessageKey in interface MessageViewkey - The message key to set.
public final String getMessageKey()
MessageView.getMessageKey()
getMessageKey in interface MessageViewpublic final MessageView setMessageKeyAsRaw(XString key)
MessageView.setMessageKey(java.lang.String)
setMessageKeyAsRaw in interface MessageViewkey - The message key to set.
public final XString getMessageKeyAsRaw()
MessageView.getMessageKeyAsRaw()
getMessageKeyAsRaw in interface MessageViewpublic final MessageView setMessageSender(int sender)
MessageView.setMessageSender(int)
setMessageSender in interface MessageViewsender - The message sender to set
public final int getMessageSender()
MessageView.getMessageSender()
getMessageSender in interface MessageViewpublic final MessageView setMessageFlow(int flow)
MessageView.setMessageFlow(int)
setMessageFlow in interface MessageViewflow - The message flow to set.
public final int getMessageFlow()
MessageView.getMessageFlow()
getMessageFlow in interface MessageViewpublic final MessageView setMessageSequenceNumber(long sno)
MessageView.setMessageSequenceNumber(long)
setMessageSequenceNumber in interface MessageViewsno - The sequence number to set.
public final long getMessageSequenceNumber()
MessageView.getMessageSequenceNumber()
getMessageSequenceNumber in interface MessageViewpublic final MessageView setPossibleDuplicate()
MessageView.setPossibleDuplicate()
setPossibleDuplicate in interface MessageViewpublic final boolean isPossibleDuplicate()
MessageView.isPossibleDuplicate()
isPossibleDuplicate in interface MessageViewpublic final MessageView setOriginTs(long ts)
MessageView
setOriginTs in interface MessageViewts - The timestamp to set.
public final long getOriginTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the first message in this message's flow originated.
getOriginTs in interface MessageViewpublic final MessageView setCreateTs(long ts)
MessageView
setCreateTs in interface MessageViewts - The timestamp to set.
public final long getCreateTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was created.
getCreateTs in interface MessageViewpublic MessageView setAppSendBeginTs(long ts)
MessageView
setAppSendBeginTs in interface MessageViewts - The application's send start timestamp.
public long getAppSendBeginTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the send started from from the application's view point. This timestamp is the same as outTs unless an application explicitly sets it to an earlier value.
getAppSendBeginTs in interface MessageViewpublic MessageView setAppSendDoneTs(long ts)
MessageView
setAppSendDoneTs in interface MessageViewpublic long getAppSendDoneTs()
MessageView
This timestamp, in microseconds, specifies the time at which
the send completes from an application's perspective. If the message is sent
in the background this value can be lower even the MessageView.getSendStartTs()
getAppSendDoneTs in interface MessageViewpublic final MessageView setSendTs(long ts)
MessageView
setSendTs in interface MessageViewts - The timestamp to set.
public final long getSendTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was offered to the bus for begin the send.
getSendTs in interface MessageViewpublic final MessageView setSendStartTs(long ts)
MessageView
setSendStartTs in interface MessageViewts - The timestamp to set.
public final long getSendStartTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was offered to the bus for send.
getSendStartTs in interface MessageView@Deprecated public final MessageView setOutTs(long ts)
MessageView
setOutTs in interface MessageViewts - The timestamp to set.
public final long getOutTs()
MessageViewThis timestamp is the same timestamp as the 'send' timestamp but in milliseconds.
getOutTs in interface MessageViewpublic final MessageView setOutTsMicros(long ts)
MessageView
It is expected that this field will be set via a value obtained from
UtlTime#nowSinceEpoch()
setOutTsMicros in interface MessageViewts - The timestamp to set.
UtlTime.nowSinceEpoch()public final long getOutTsMicros()
MessageView
getOutTsMicros in interface MessageViewpublic final MessageView setPreSerializeTs(long ts)
MessageView
setPreSerializeTs in interface MessageViewts - The timestamp to set.
public final long getPreSerializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was serialized for transport.
getPreSerializeTs in interface MessageViewpublic final MessageView setPostSerializeTs(long ts)
MessageView
setPostSerializeTs in interface MessageViewts - The timestamp to set.
public final long getPostSerializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was serialized for transport.
getPostSerializeTs in interface MessageViewpublic final MessageView setPreWireTs(long ts)
MessageViewThis timestamp, in microseconds, specifies the time just before a message was sent on the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message)
setPreWireTs in interface MessageViewts - The timestamp to set.
public final long getPreWireTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was sent on the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message).
The returned timestamp is in microseconds.
getPreWireTs in interface MessageViewpublic final RawMessageViewImpl setPostWireSendTs(long ts)
MessageView
setPostWireSendTs in interface MessageViewts - The timestamp to set.
public final long getPostWireSendTs()
MessageView
This timestamp, in microseconds, specifies the time just
after the bus provider specific network send call returns.
Comparing this timestamp to MessageView.getPreWireTs() determines
the time spent in the bus provider's send call.
getPostWireSendTs in interface MessageViewpublic final MessageView setPostWireTs(long ts)
MessageView
setPostWireTs in interface MessageViewts - The timestamp to set.
public final long getPostWireTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was received from the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message)
getPostWireTs in interface MessageViewpublic final MessageView setPreDeserializeTs(long ts)
MessageView
setPreDeserializeTs in interface MessageViewts - The timestamp to set.
public final long getPreDeserializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was de-serialized after transport.
getPreDeserializeTs in interface MessageViewpublic final MessageView setPostDeserializeTs(long ts)
MessageView
setPostDeserializeTs in interface MessageViewts - The timestamp to set.
public final long getPostDeserializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was de-serialized after transport.
getPostDeserializeTs in interface MessageViewpublic long getEnqueueTs()
MessageView
getEnqueueTs in interface MessageViewMessageView.getEnqueueTsMicros()public MessageView setEnqueueTsMicros(long ts)
MessageViewThis timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue. This timestamp can be compared with
setEnqueueTsMicros in interface MessageViewts - the enqueue time in microseconds.public long getEnqueueTsMicros()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue. This timestamp can be compared with
getEnqueueTsMicros in interface MessageViewpublic final MessageView setReceiveTs(long ts)
MessageView
setReceiveTs in interface MessageViewts - The timestamp to set.
public final long getReceiveTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was received by X's application dispatch machinery. It is the same as the pre-processing timestamp if the message is not being redelivered to the application by the in-process X runtime.
getReceiveTs in interface MessageView@Deprecated public final MessageView setPreProcessingTs(long ts)
MessageView
setPreProcessingTs in interface MessageViewts - The timestamp to set.
public final long getPreProcessingTs()
MessageViewThis timestamp, in milliseconds, specifies the time just before a message was dispatched to the application for processing.
getPreProcessingTs in interface MessageViewpublic final MessageView setPreProcessingTsMicros(long ts)
MessageView
It is expected that this field will be set via a value obtained from
UtlTime#nowSinceEpoch()
setPreProcessingTsMicros in interface MessageViewts - The timestamp to set.
UtlTime.nowSinceEpoch()public final long getPreProcessingTsMicros()
MessageView
It is expected that this field will be set via a value obtained from
UtlTime#nowSinceEpoch()
getPreProcessingTsMicros in interface MessageView@Deprecated public final MessageView setPostProcessingTs(long ts)
MessageView
setPostProcessingTs in interface MessageViewts - The timestamp to set.
@Deprecated public final long getPostProcessingTs()
MessageViewThis timestamp, in milliseconds, specifies the time just after a message processing handler completes.
getPostProcessingTs in interface MessageViewpublic final MessageView setPostProcessingTsMicros(long ts)
MessageView
setPostProcessingTsMicros in interface MessageViewts - The timestamp to set.
public final long getPostProcessingTsMicros()
MessageViewThis timestamp, in microseconds, specifies the time just after a message processing handler completes.
getPostProcessingTsMicros in interface MessageViewpublic final void sync()
MessageView.sync()
sync in interface MessageViewpublic final byte[] serializeToByteArray()
MessageView.serializeToByteArray()
serializeToByteArray in interface MessageViewpublic final ByteBuffer serializeToByteBuffer()
MessageView.serializeToByteBuffer()
serializeToByteBuffer in interface MessageViewpublic final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)
MessageViewMessageView to an IOBuffer.
Ownership of the returned IOBuffer is given to the caller which should dispose of it when done.
The buffer backing the IOBuffer should be flipped (ready for read) upon return.
serializeToIOBuffer in interface MessageViewserializeToIOBuffer in class MessageViewImpluseNative - Whether the returned buffer should be native.
MessageView serialized to an IOBuffer.public final RawMessageViewImpl copy()
CopyableMessageViewThe copy has the following characteristics:
Timestamps Timestamp fields that must be included in the copy:
Additionally, theMessageView.getCreateTs() for the message copy
will be the time of this copy().
copy in interface CopyableMessageView<RawMessageViewImpl>public final PktPacket serializeToPacket()
MessageView.serializeToPacket()
serializeToPacket in interface MessageViewpublic final String serializeToJson()
MessageView.serializeToJson()
serializeToJson in interface MessageViewpublic final RawMessageViewImpl deserializeFromByteArray(byte[] array)
MessageView.deserializeFromByteArray(byte[])
deserializeFromByteArray in interface MessageViewarray - The view's backing message serialized as a byte array.public final RawMessageViewImpl deserializeFromByteBuffer(ByteBuffer buffer)
MessageView.deserializeFromByteBuffer(java.nio.ByteBuffer)
deserializeFromByteBuffer in interface MessageViewbuffer - The view's backing message serialized as a byte buffer.public final RawMessageViewImpl deserializeFromPacket(PktPacket packet)
MessageView.deserializeFromPacket(com.neeve.pkt.PktPacket)
deserializeFromPacket in interface MessageViewpacket - The view's backing message serialized as a packet.public final RawMessageViewImpl deserializeFromJson(String json)
MessageView.deserializeFromJson(java.lang.String)
deserializeFromJson in interface MessageViewjson - The view's backing message serialized as a json string.
Serializing/deserializing a message to/from JSON is an optional operation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||