|
|||||||||
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.Item
This 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.Item
This 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()
MessageViewImpl
MessageView.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 MessageView
dispose
in class MessageViewImpl
public final MessageView setMessageBus(String name)
MessageView.setMessageBus(java.lang.String)
setMessageBus
in interface MessageView
name
- The message bus name to set.
public final String getMessageBus()
MessageView.getMessageBus()
getMessageBus
in interface MessageView
public final MessageView setMessageBusAsRaw(XString bus)
MessageView.setMessageBusAsRaw(com.neeve.lang.XString)
setMessageBusAsRaw
in interface MessageView
bus
- The message bus to set.
public final XString getMessageBusAsRaw()
MessageView.getMessageBusAsRaw()
getMessageBusAsRaw
in interface MessageView
public final MessageView setMessageChannel(String name)
MessageView.setMessageChannel(java.lang.String)
setMessageChannel
in interface MessageView
name
- The message channel name to set.
public final String getMessageChannel()
MessageView.getMessageChannel()
getMessageChannel
in interface MessageView
public final MessageView setMessageChannelAsRaw(XString channel)
MessageView.setMessageChannelAsRaw(com.neeve.lang.XString)
setMessageChannelAsRaw
in interface MessageView
channel
- The message channel to set.
public final XString getMessageChannelAsRaw()
MessageView.getMessageChannelAsRaw()
getMessageChannelAsRaw
in interface MessageView
public final MessageView setMessageKey(String key)
MessageView.setMessageKey(java.lang.String)
setMessageKey
in interface MessageView
key
- The message key to set.
public final String getMessageKey()
MessageView.getMessageKey()
getMessageKey
in interface MessageView
public final MessageView setMessageKeyAsRaw(XString key)
MessageView.setMessageKey(java.lang.String)
setMessageKeyAsRaw
in interface MessageView
key
- The message key to set.
public final XString getMessageKeyAsRaw()
MessageView.getMessageKeyAsRaw()
getMessageKeyAsRaw
in interface MessageView
public final MessageView setMessageSender(int sender)
MessageView.setMessageSender(int)
setMessageSender
in interface MessageView
sender
- The message sender to set
public final int getMessageSender()
MessageView.getMessageSender()
getMessageSender
in interface MessageView
public final MessageView setMessageFlow(int flow)
MessageView.setMessageFlow(int)
setMessageFlow
in interface MessageView
flow
- The message flow to set.
public final int getMessageFlow()
MessageView.getMessageFlow()
getMessageFlow
in interface MessageView
public final MessageView setMessageSequenceNumber(long sno)
MessageView.setMessageSequenceNumber(long)
setMessageSequenceNumber
in interface MessageView
sno
- The sequence number to set.
public final long getMessageSequenceNumber()
MessageView.getMessageSequenceNumber()
getMessageSequenceNumber
in interface MessageView
public final MessageView setPossibleDuplicate()
MessageView.setPossibleDuplicate()
setPossibleDuplicate
in interface MessageView
public final boolean isPossibleDuplicate()
MessageView.isPossibleDuplicate()
isPossibleDuplicate
in interface MessageView
public final MessageView setOriginTs(long ts)
MessageView
setOriginTs
in interface MessageView
ts
- The timestamp to set.
public final long getOriginTs()
MessageView
This timestamp, in microseconds, specifies the time at which the first message in this message's flow originated.
getOriginTs
in interface MessageView
public final MessageView setCreateTs(long ts)
MessageView
setCreateTs
in interface MessageView
ts
- The timestamp to set.
public final long getCreateTs()
MessageView
This timestamp, in microseconds, specifies the time at which the message was created.
getCreateTs
in interface MessageView
public MessageView setAppSendBeginTs(long ts)
MessageView
setAppSendBeginTs
in interface MessageView
ts
- The application's send start timestamp.
public long getAppSendBeginTs()
MessageView
This 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 MessageView
public MessageView setAppSendDoneTs(long ts)
MessageView
setAppSendDoneTs
in interface MessageView
public 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 MessageView
public final MessageView setSendTs(long ts)
MessageView
setSendTs
in interface MessageView
ts
- The timestamp to set.
public final long getSendTs()
MessageView
This timestamp, in microseconds, specifies the time at which the message was offered to the bus for begin the send.
getSendTs
in interface MessageView
public final MessageView setSendStartTs(long ts)
MessageView
setSendStartTs
in interface MessageView
ts
- The timestamp to set.
public final long getSendStartTs()
MessageView
This 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 MessageView
ts
- The timestamp to set.
public final long getOutTs()
MessageView
This timestamp is the same timestamp as the 'send' timestamp but in milliseconds.
getOutTs
in interface MessageView
public 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 MessageView
ts
- The timestamp to set.
UtlTime.nowSinceEpoch()
public final long getOutTsMicros()
MessageView
getOutTsMicros
in interface MessageView
public final MessageView setPreSerializeTs(long ts)
MessageView
setPreSerializeTs
in interface MessageView
ts
- The timestamp to set.
public final long getPreSerializeTs()
MessageView
This timestamp, in microseconds, specifies the time just before a message was serialized for transport.
getPreSerializeTs
in interface MessageView
public final MessageView setPostSerializeTs(long ts)
MessageView
setPostSerializeTs
in interface MessageView
ts
- The timestamp to set.
public final long getPostSerializeTs()
MessageView
This timestamp, in microseconds, specifies the time just after a message was serialized for transport.
getPostSerializeTs
in interface MessageView
public final MessageView setPreWireTs(long ts)
MessageView
This 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 MessageView
ts
- The timestamp to set.
public final long getPreWireTs()
MessageView
This 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 MessageView
public final RawMessageViewImpl setPostWireSendTs(long ts)
MessageView
setPostWireSendTs
in interface MessageView
ts
- 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 MessageView
public final MessageView setPostWireTs(long ts)
MessageView
setPostWireTs
in interface MessageView
ts
- The timestamp to set.
public final long getPostWireTs()
MessageView
This 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 MessageView
public final MessageView setPreDeserializeTs(long ts)
MessageView
setPreDeserializeTs
in interface MessageView
ts
- The timestamp to set.
public final long getPreDeserializeTs()
MessageView
This timestamp, in microseconds, specifies the time just before a message was de-serialized after transport.
getPreDeserializeTs
in interface MessageView
public final MessageView setPostDeserializeTs(long ts)
MessageView
setPostDeserializeTs
in interface MessageView
ts
- The timestamp to set.
public final long getPostDeserializeTs()
MessageView
This timestamp, in microseconds, specifies the time just after a message was de-serialized after transport.
getPostDeserializeTs
in interface MessageView
public long getEnqueueTs()
MessageView
getEnqueueTs
in interface MessageView
MessageView.getEnqueueTsMicros()
public MessageView setEnqueueTsMicros(long ts)
MessageView
This 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 MessageView
ts
- the enqueue time in microseconds.public long getEnqueueTsMicros()
MessageView
This 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 MessageView
public final MessageView setReceiveTs(long ts)
MessageView
setReceiveTs
in interface MessageView
ts
- The timestamp to set.
public final long getReceiveTs()
MessageView
This 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 MessageView
ts
- The timestamp to set.
public final long getPreProcessingTs()
MessageView
This timestamp, in milliseconds, specifies the time just before a message was dispatched to the application for processing.
getPreProcessingTs
in interface MessageView
public 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 MessageView
ts
- 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 MessageView
ts
- The timestamp to set.
@Deprecated public final long getPostProcessingTs()
MessageView
This timestamp, in milliseconds, specifies the time just after a message processing handler completes.
getPostProcessingTs
in interface MessageView
public final MessageView setPostProcessingTsMicros(long ts)
MessageView
setPostProcessingTsMicros
in interface MessageView
ts
- The timestamp to set.
public final long getPostProcessingTsMicros()
MessageView
This timestamp, in microseconds, specifies the time just after a message processing handler completes.
getPostProcessingTsMicros
in interface MessageView
public final void sync()
MessageView.sync()
sync
in interface MessageView
public final byte[] serializeToByteArray()
MessageView.serializeToByteArray()
serializeToByteArray
in interface MessageView
public final ByteBuffer serializeToByteBuffer()
MessageView.serializeToByteBuffer()
serializeToByteBuffer
in interface MessageView
public final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)
MessageView
MessageView
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 MessageView
serializeToIOBuffer
in class MessageViewImpl
useNative
- Whether the returned buffer should be native.
MessageView
serialized to an IOBuffer.public final RawMessageViewImpl copy()
CopyableMessageView
The 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 MessageView
public final String serializeToJson()
MessageView.serializeToJson()
serializeToJson
in interface MessageView
public final RawMessageViewImpl deserializeFromByteArray(byte[] array)
MessageView.deserializeFromByteArray(byte[])
deserializeFromByteArray
in interface MessageView
array
- The view's backing message serialized as a byte array.public final RawMessageViewImpl deserializeFromByteBuffer(ByteBuffer buffer)
MessageView.deserializeFromByteBuffer(java.nio.ByteBuffer)
deserializeFromByteBuffer
in interface MessageView
buffer
- 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 MessageView
packet
- The view's backing message serialized as a packet.public final RawMessageViewImpl deserializeFromJson(String json)
MessageView.deserializeFromJson(java.lang.String)
deserializeFromJson
in interface MessageView
json
- 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 |