com.neeve.sma
Class RawMessageViewImpl

java.lang.Object
  extended by com.neeve.util.UtlListElement
      extended by com.neeve.sma.MessageViewImpl
          extended by com.neeve.sma.RawMessageViewImpl
All Implemented Interfaces:
CopyableMessageView<RawMessageViewImpl>, MessageView, UtlPool.Item<RawMessageViewImpl>, UtlReferenceTracker.HasReferenceTracker

public final class RawMessageViewImpl
extends MessageViewImpl
implements UtlPool.Item<RawMessageViewImpl>, CopyableMessageView<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

init

public final RawMessageViewImpl init()
Description copied from interface: UtlPool.Item
Initialize an 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.

Specified by:
init in interface UtlPool.Item<RawMessageViewImpl>
Returns:
Return 'this' object for method invocation chaining.

setPool

public final RawMessageViewImpl setPool(UtlPool<RawMessageViewImpl> pool)
Description copied from interface: UtlPool.Item
Set a pool item's pool.

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.

Specified by:
setPool in interface UtlPool.Item<RawMessageViewImpl>
Returns:
Return 'this' object for method invocation chaining.

getPool

public final UtlPool<RawMessageViewImpl> getPool()
Description copied from interface: UtlPool.Item
Get a pool item's pool.

This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool)

Specified by:
getPool in interface UtlPool.Item<RawMessageViewImpl>
Returns:
the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool)

dispose

public int dispose()
Description copied from class: MessageViewImpl
Default implementation of 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.

Specified by:
dispose in interface MessageView
Overrides:
dispose in class MessageViewImpl

setMessageBus

public final MessageView setMessageBus(String name)
Implementation of MessageView.setMessageBus(java.lang.String)

Specified by:
setMessageBus in interface MessageView
Parameters:
name - The message bus name to set.
Returns:
Returns this for invocation chaining.

getMessageBus

public final String getMessageBus()
Implementation of MessageView.getMessageBus()

Specified by:
getMessageBus in interface MessageView

setMessageBusAsRaw

public final MessageView setMessageBusAsRaw(XString bus)
Implementation of MessageView.setMessageBusAsRaw(com.neeve.lang.XString)

Specified by:
setMessageBusAsRaw in interface MessageView
Parameters:
bus - The message bus to set.
Returns:
Returns this for invocation chaining.

getMessageBusAsRaw

public final XString getMessageBusAsRaw()
Implementation of MessageView.getMessageBusAsRaw()

Specified by:
getMessageBusAsRaw in interface MessageView

setMessageChannel

public final MessageView setMessageChannel(String name)
Implementation of MessageView.setMessageChannel(java.lang.String)

Specified by:
setMessageChannel in interface MessageView
Parameters:
name - The message channel name to set.
Returns:
Returns this for invocation chaining.

getMessageChannel

public final String getMessageChannel()
Implementation of MessageView.getMessageChannel()

Specified by:
getMessageChannel in interface MessageView

setMessageChannelAsRaw

public final MessageView setMessageChannelAsRaw(XString channel)
Implementation of MessageView.setMessageChannelAsRaw(com.neeve.lang.XString)

Specified by:
setMessageChannelAsRaw in interface MessageView
Parameters:
channel - The message channel to set.
Returns:
Returns this for invocation chaining.

getMessageChannelAsRaw

public final XString getMessageChannelAsRaw()
Implementation of MessageView.getMessageChannelAsRaw()

Specified by:
getMessageChannelAsRaw in interface MessageView

setMessageKey

public final MessageView setMessageKey(String key)
Implementation of MessageView.setMessageKey(java.lang.String)

Specified by:
setMessageKey in interface MessageView
Parameters:
key - The message key to set.
Returns:
Returns this for invocation chaining.

getMessageKey

public final String getMessageKey()
Implementation of MessageView.getMessageKey()

Specified by:
getMessageKey in interface MessageView

setMessageKeyAsRaw

public final MessageView setMessageKeyAsRaw(XString key)
Implementation of MessageView.setMessageKey(java.lang.String)

Specified by:
setMessageKeyAsRaw in interface MessageView
Parameters:
key - The message key to set.
Returns:
Returns this for invocation chaining.

getMessageKeyAsRaw

public final XString getMessageKeyAsRaw()
Implementation of MessageView.getMessageKeyAsRaw()

Specified by:
getMessageKeyAsRaw in interface MessageView

setMessageSender

public final MessageView setMessageSender(int sender)
Implementation of MessageView.setMessageSender(int)

Specified by:
setMessageSender in interface MessageView
Parameters:
sender - The message sender to set
Returns:
Returns this for invocation chaining.

getMessageSender

public final int getMessageSender()
Implementation of MessageView.getMessageSender()

Specified by:
getMessageSender in interface MessageView

setMessageFlow

public final MessageView setMessageFlow(int flow)
Implementation of MessageView.setMessageFlow(int)

Specified by:
setMessageFlow in interface MessageView
Parameters:
flow - The message flow to set.
Returns:
Returns this for invocation chaining.

getMessageFlow

public final int getMessageFlow()
Implementation of MessageView.getMessageFlow()

Specified by:
getMessageFlow in interface MessageView

setMessageSequenceNumber

public final MessageView setMessageSequenceNumber(long sno)
Implementation of MessageView.setMessageSequenceNumber(long)

Specified by:
setMessageSequenceNumber in interface MessageView
Parameters:
sno - The sequence number to set.
Returns:
Returns this for invocation chaining.

getMessageSequenceNumber

public final long getMessageSequenceNumber()
Implementation of MessageView.getMessageSequenceNumber()

Specified by:
getMessageSequenceNumber in interface MessageView

setPossibleDuplicate

public final MessageView setPossibleDuplicate()
Implementation of MessageView.setPossibleDuplicate()

Specified by:
setPossibleDuplicate in interface MessageView
Returns:
Returns this for invocation chaining.

isPossibleDuplicate

public final boolean isPossibleDuplicate()
Implementation of MessageView.isPossibleDuplicate()

Specified by:
isPossibleDuplicate in interface MessageView

setOriginTs

public final MessageView setOriginTs(long ts)
Description copied from interface: MessageView
Set a message's origin timestamp.

Specified by:
setOriginTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getOriginTs

public final long getOriginTs()
Description copied from interface: MessageView
Get a message's origin timestamp.

This timestamp, in microseconds, specifies the time at which the first message in this message's flow originated.

Specified by:
getOriginTs in interface MessageView
Returns:
Returns the origin timestamp. A value of zero indicates that the origin timestamp was not recorded.

setCreateTs

public final MessageView setCreateTs(long ts)
Description copied from interface: MessageView
Set a message's create timestamp.

Specified by:
setCreateTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getCreateTs

public final long getCreateTs()
Description copied from interface: MessageView
Get a message's create timestamp.

This timestamp, in microseconds, specifies the time at which the message was created.

Specified by:
getCreateTs in interface MessageView
Returns:
Returns the create timestamp. A value of zero indicates that the create timestamp was not recorded.

setAppSendBeginTs

public MessageView setAppSendBeginTs(long ts)
Description copied from interface: MessageView
Time at which the application considers send for a message to start.

Specified by:
setAppSendBeginTs in interface MessageView
Parameters:
ts - The application's send start timestamp.
Returns:
Returns this for invocation chaining.

getAppSendBeginTs

public long getAppSendBeginTs()
Description copied from interface: MessageView
Get's the time at which the application considers send for a message to start.

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.

Specified by:
getAppSendBeginTs in interface MessageView
Returns:
The application's send start timestamp.

setAppSendDoneTs

public MessageView setAppSendDoneTs(long ts)
Description copied from interface: MessageView
Set's the time at which the application considers send for a message to be complete.

Specified by:
setAppSendDoneTs in interface MessageView
Returns:
The application's send start timestamp.

getAppSendDoneTs

public long getAppSendDoneTs()
Description copied from interface: MessageView
Get's the time at which the application considers send for a message to be complete.

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()

Specified by:
getAppSendDoneTs in interface MessageView
Returns:
Returns this for invocation chaining.

setSendTs

public final MessageView setSendTs(long ts)
Description copied from interface: MessageView
Set a message's send timestamp.

Specified by:
setSendTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getSendTs

public final long getSendTs()
Description copied from interface: MessageView
Get a message's send timestamp.

This timestamp, in microseconds, specifies the time at which the message was offered to the bus for begin the send.

Specified by:
getSendTs in interface MessageView
Returns:
Returns the send timestamp. A value of zero indicates that the outbound timestamp was not recorded.

setSendStartTs

public final MessageView setSendStartTs(long ts)
Description copied from interface: MessageView
Set a message's send timestamp.

Specified by:
setSendStartTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getSendStartTs

public final long getSendStartTs()
Description copied from interface: MessageView
Get a message's send timestamp.

This timestamp, in microseconds, specifies the time at which the message was offered to the bus for send.

Specified by:
getSendStartTs in interface MessageView
Returns:
Returns the send timestamp. A value of zero indicates that the outbound timestamp was not recorded.

setOutTs

@Deprecated
public final MessageView setOutTs(long ts)
Deprecated. 

Description copied from interface: MessageView
Set a message's out timestamp.

Specified by:
setOutTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getOutTs

public final long getOutTs()
Description copied from interface: MessageView
Get a message's out timestamp.

This timestamp is the same timestamp as the 'send' timestamp but in milliseconds.

Specified by:
getOutTs in interface MessageView
Returns:
Returns the out timestamp. A value of zero indicates that the outbound timestamp was not recorded.

setOutTsMicros

public final MessageView setOutTsMicros(long ts)
Description copied from interface: MessageView
Set a message's out timestamp in microseconds since the epoch.

It is expected that this field will be set via a value obtained from UtlTime#nowSinceEpoch()

Specified by:
setOutTsMicros in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.
See Also:
UtlTime.nowSinceEpoch()

getOutTsMicros

public final long getOutTsMicros()
Description copied from interface: MessageView
Get a message's out timestamp in microseconds since the epoch.

Specified by:
getOutTsMicros in interface MessageView
Returns:
Returns the out timestamp. A value of zero indicates that the outbound timestamp was not recorded.

setPreSerializeTs

public final MessageView setPreSerializeTs(long ts)
Description copied from interface: MessageView
Set a message's pre-serialize timestamp.

Specified by:
setPreSerializeTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPreSerializeTs

public final long getPreSerializeTs()
Description copied from interface: MessageView
Get a message's pre-serialize timestamp.

This timestamp, in microseconds, specifies the time just before a message was serialized for transport.

Specified by:
getPreSerializeTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setPostSerializeTs

public final MessageView setPostSerializeTs(long ts)
Description copied from interface: MessageView
Set a message's post-serialize timestamp.

Specified by:
setPostSerializeTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostSerializeTs

public final long getPostSerializeTs()
Description copied from interface: MessageView
Get a message's post-serialize timestamp.

This timestamp, in microseconds, specifies the time just after a message was serialized for transport.

Specified by:
getPostSerializeTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setPreWireTs

public final MessageView setPreWireTs(long ts)
Description copied from interface: MessageView
Set a message's pre-wire timestamp.

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)

Specified by:
setPreWireTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPreWireTs

public final long getPreWireTs()
Description copied from interface: MessageView
Get a message's pre-wire timestamp.

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.

Specified by:
getPreWireTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the outbound timestamp was not recorded.

setPostWireSendTs

public final RawMessageViewImpl setPostWireSendTs(long ts)
Description copied from interface: MessageView
Set a message's post-wire send timestamp.

Specified by:
setPostWireSendTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostWireSendTs

public final long getPostWireSendTs()
Description copied from interface: MessageView
Get a message's post-wire timestamp.

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.

Specified by:
getPostWireSendTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the timestamp was not recorded.

setPostWireTs

public final MessageView setPostWireTs(long ts)
Description copied from interface: MessageView
Set a message's post-wire timestamp.

Specified by:
setPostWireTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostWireTs

public final long getPostWireTs()
Description copied from interface: MessageView
Get a message's post-wire timestamp.

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)

Specified by:
getPostWireTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setPreDeserializeTs

public final MessageView setPreDeserializeTs(long ts)
Description copied from interface: MessageView
Set a message's pre-deserialize timestamp.

Specified by:
setPreDeserializeTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPreDeserializeTs

public final long getPreDeserializeTs()
Description copied from interface: MessageView
Get a message's pre-deserialize timestamp.

This timestamp, in microseconds, specifies the time just before a message was de-serialized after transport.

Specified by:
getPreDeserializeTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setPostDeserializeTs

public final MessageView setPostDeserializeTs(long ts)
Description copied from interface: MessageView
Set a message's post-deserialize timestamp.

Specified by:
setPostDeserializeTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostDeserializeTs

public final long getPostDeserializeTs()
Description copied from interface: MessageView
Get a message's post-deserialize timestamp.

This timestamp, in microseconds, specifies the time just after a message was de-serialized after transport.

Specified by:
getPostDeserializeTs in interface MessageView
Returns:
Returns the timestamp. A value of zero indicates that the inbound timestamp was not recorded.

getEnqueueTs

public long getEnqueueTs()
Description copied from interface: MessageView
Get a message's enqueue timestamp in milliseconds

Specified by:
getEnqueueTs in interface MessageView
Returns:
Returns the in timestamp. A value of zero indicates that the inbound timestamp was not recorded.
See Also:
MessageView.getEnqueueTsMicros()

setEnqueueTsMicros

public MessageView setEnqueueTsMicros(long ts)
Description copied from interface: MessageView
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. This timestamp can be compared with

Specified by:
setEnqueueTsMicros in interface MessageView
Parameters:
ts - the enqueue time in microseconds.

getEnqueueTsMicros

public long getEnqueueTsMicros()
Description copied from interface: MessageView
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. This timestamp can be compared with

Specified by:
getEnqueueTsMicros in interface MessageView
Returns:
Returns the in timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setReceiveTs

public final MessageView setReceiveTs(long ts)
Description copied from interface: MessageView
Set a message's receive timestamp.

Specified by:
setReceiveTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getReceiveTs

public final long getReceiveTs()
Description copied from interface: MessageView
Get a message's receive timestamp.

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.

Specified by:
getReceiveTs in interface MessageView
Returns:
Returns the in timestamp. A value of zero indicates that the inbound timestamp was not recorded.

setPreProcessingTs

@Deprecated
public final MessageView setPreProcessingTs(long ts)
Deprecated. 

Description copied from interface: MessageView
Set a message's pre-processing timestamp.

Specified by:
setPreProcessingTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPreProcessingTs

public final long getPreProcessingTs()
Description copied from interface: MessageView
Get a message's pre-processing timestamp.

This timestamp, in milliseconds, specifies the time just before a message was dispatched to the application for processing.

Specified by:
getPreProcessingTs in interface MessageView
Returns:
Returns the timestamp just before the message was dispatched into the application for processing. A value of zero indicates that the pre-processing timestamp was not recorded.

setPreProcessingTsMicros

public final MessageView setPreProcessingTsMicros(long ts)
Description copied from interface: MessageView
Set a message's pre-processing timestamp in microseconds.

It is expected that this field will be set via a value obtained from UtlTime#nowSinceEpoch()

Specified by:
setPreProcessingTsMicros in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.
See Also:
UtlTime.nowSinceEpoch()

getPreProcessingTsMicros

public final long getPreProcessingTsMicros()
Description copied from interface: MessageView
Get a message's pre-processing timestamp in microseconds.

It is expected that this field will be set via a value obtained from UtlTime#nowSinceEpoch()

Specified by:
getPreProcessingTsMicros in interface MessageView
Returns:
Returns the timestamp just before the message was dispatched into the application for processing. A value of zero indicates that the pre-processing timestamp was not recorded.

setPostProcessingTs

@Deprecated
public final MessageView setPostProcessingTs(long ts)
Deprecated. 

Description copied from interface: MessageView
Set a message's post-processing timestamp.

Specified by:
setPostProcessingTs in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostProcessingTs

@Deprecated
public final long getPostProcessingTs()
Deprecated. 

Description copied from interface: MessageView
Get a message's post-processing timestamp.

This timestamp, in milliseconds, specifies the time just after a message processing handler completes.

Specified by:
getPostProcessingTs in interface MessageView
Returns:
Returns the timestamp just after the message was processed by the application. A value of zero indicates that the post-processing timestamp was not recorded.

setPostProcessingTsMicros

public final MessageView setPostProcessingTsMicros(long ts)
Description copied from interface: MessageView
Set a message's post-processing timestamp.

Specified by:
setPostProcessingTsMicros in interface MessageView
Parameters:
ts - The timestamp to set.
Returns:
Returns this for invocation chaining.

getPostProcessingTsMicros

public final long getPostProcessingTsMicros()
Description copied from interface: MessageView
Get a message's post-processing timestamp.

This timestamp, in microseconds, specifies the time just after a message processing handler completes.

Specified by:
getPostProcessingTsMicros in interface MessageView
Returns:
Returns the timestamp just after the message was processed by the application. A value of zero indicates that the post-processing timestamp was not recorded.

sync

public final void sync()
Implementation of MessageView.sync()

Specified by:
sync in interface MessageView

serializeToByteArray

public final byte[] serializeToByteArray()
Implementation of MessageView.serializeToByteArray()

Specified by:
serializeToByteArray in interface MessageView

serializeToByteBuffer

public final ByteBuffer serializeToByteBuffer()
Implementation of MessageView.serializeToByteBuffer()

Specified by:
serializeToByteBuffer in interface MessageView

serializeToIOBuffer

public final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)
Description copied from interface: MessageView
Serializes the 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.

Specified by:
serializeToIOBuffer in interface MessageView
Overrides:
serializeToIOBuffer in class MessageViewImpl
Parameters:
useNative - Whether the returned buffer should be native.
Returns:
The MessageView serialized to an IOBuffer.

copy

public final RawMessageViewImpl copy()
Description copied from interface: CopyableMessageView
Creates a shallow copy of the object.

The copy has the following characteristics:

The copy does not include

Timestamps Timestamp fields that must be included in the copy:

Additionally, the MessageView.getCreateTs() for the message copy will be the time of this copy().

Specified by:
copy in interface CopyableMessageView<RawMessageViewImpl>
Returns:
A copy of this message.

serializeToPacket

public final PktPacket serializeToPacket()
Implementation of MessageView.serializeToPacket()

Specified by:
serializeToPacket in interface MessageView

serializeToJson

public final String serializeToJson()
Implementation of MessageView.serializeToJson()

Specified by:
serializeToJson in interface MessageView

deserializeFromByteArray

public final RawMessageViewImpl deserializeFromByteArray(byte[] array)
Implementation of MessageView.deserializeFromByteArray(byte[])

Specified by:
deserializeFromByteArray in interface MessageView
Parameters:
array - The view's backing message serialized as a byte array.

deserializeFromByteBuffer

public final RawMessageViewImpl deserializeFromByteBuffer(ByteBuffer buffer)
Implementation of MessageView.deserializeFromByteBuffer(java.nio.ByteBuffer)

Specified by:
deserializeFromByteBuffer in interface MessageView
Parameters:
buffer - The view's backing message serialized as a byte buffer.

deserializeFromPacket

public final RawMessageViewImpl deserializeFromPacket(PktPacket packet)
Implementation of MessageView.deserializeFromPacket(com.neeve.pkt.PktPacket)

Specified by:
deserializeFromPacket in interface MessageView
Parameters:
packet - The view's backing message serialized as a packet.

deserializeFromJson

public final RawMessageViewImpl deserializeFromJson(String json)
Implementation of MessageView.deserializeFromJson(java.lang.String)

Specified by:
deserializeFromJson in interface MessageView
Parameters:
json - The view's backing message serialized as a json string.

Serializing/deserializing a message to/from JSON is an optional operation



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