public class DatagramFactory
extends java.lang.Object
Constructor and Description |
---|
DatagramFactory() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Constructor<? extends Datagram> |
getByteBufferConstructor(int protocol)
Return the Constructor for creating a Datagram with a ByteBuffer,
for a given protocol.
|
static Datagram |
newDatagram(byte[] payload)
Return a Datagram given a byte[]
|
static Datagram |
newDatagram(java.nio.ByteBuffer payload)
Return a Datagram given a ByteBuffer
|
static Datagram |
newDatagram(int protocol,
byte[] payload)
Return the relevant Datagram given a ByteBuffer
|
static Datagram |
newDatagram(int protocol,
java.nio.ByteBuffer payload)
Return the relevant Datagram given a ByteBuffer
|
static void |
setClassForProtocol(java.lang.String className,
int protocol)
Set up the class for a protocol
|
static void |
setInitialTTL(int ttl)
Set the default Initial TTL for each datagram type
|
public static Datagram newDatagram(java.nio.ByteBuffer payload)
public static Datagram newDatagram(byte[] payload)
public static Datagram newDatagram(int protocol, java.nio.ByteBuffer payload)
public static Datagram newDatagram(int protocol, byte[] payload)
public static java.lang.reflect.Constructor<? extends Datagram> getByteBufferConstructor(int protocol)
public static void setClassForProtocol(java.lang.String className, int protocol)
public static void setInitialTTL(int ttl)
User Space Routing 0.10.3