@Immutable public abstract class NetworkEvent extends Object
type and a message id that
serves to uniquely identify each network message. It can optionally can have information about
the kernel time and message size.| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkEvent.Builder
Builder class for
NetworkEvent. |
static class |
NetworkEvent.Type
Available types for a
NetworkEvent. |
| Modifier and Type | Method and Description |
|---|---|
static NetworkEvent.Builder |
builder(NetworkEvent.Type type,
long messageId)
Returns a new
NetworkEvent.Builder with default values. |
abstract Timestamp |
getKernelTimestamp()
Returns the kernel timestamp associated with the
NetworkEvent or null if not
set. |
abstract long |
getMessageId()
Returns the message id argument that serves to uniquely identify each network message.
|
abstract long |
getMessageSize()
Returns The message size in bytes of the
NetworkEvent. |
abstract NetworkEvent.Type |
getType()
Returns the type of the
NetworkEvent. |
public static NetworkEvent.Builder builder(NetworkEvent.Type type, long messageId)
NetworkEvent.Builder with default values.type - designates whether this is a network send or receive message.messageId - serves to uniquely identify each network message.Builder with default values.NullPointerException - if type is null.@Nullable public abstract Timestamp getKernelTimestamp()
NetworkEvent or null if not
set.NetworkEvent or null if not
set.public abstract NetworkEvent.Type getType()
NetworkEvent.NetworkEvent.public abstract long getMessageId()
NetworkEvent.public abstract long getMessageSize()
NetworkEvent.NetworkEvent.