@Immutable public final 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. |
Timestamp |
getKernelTimestamp()
Returns the kernel timestamp associated with the
NetworkEvent or null if not
set. |
long |
getMessageId()
Returns the message id argument that serves to uniquely identify each network message.
|
long |
getMessageSize()
Returns The message size in bytes of the
NetworkEvent. |
NetworkEvent.Type |
getType()
Returns the type of the
NetworkEvent. |
String |
toString() |
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 Timestamp getKernelTimestamp()
NetworkEvent or null if not
set.NetworkEvent or null if not
set.public NetworkEvent.Type getType()
NetworkEvent.NetworkEvent.public long getMessageId()
NetworkEvent.public long getMessageSize()
NetworkEvent.NetworkEvent.