public abstract class ChunkHandler extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHUNK_FAIL |
static ByteOrder |
CHUNK_ORDER |
Constructor and Description |
---|
ChunkHandler() |
Modifier and Type | Method and Description |
---|---|
abstract void |
connected()
Called when the DDM server connects.
|
static Chunk |
createFailChunk(int errorCode,
String msg)
Create a FAIL chunk.
|
abstract void |
disconnected()
Called when the DDM server disconnects.
|
static String |
getString(ByteBuffer buf,
int len)
Utility function to copy a String out of a ByteBuffer.
|
abstract Chunk |
handleChunk(Chunk request)
Handle a single chunk of data.
|
static String |
name(int type)
Convert an integer type to a 4-character string.
|
static void |
putString(ByteBuffer buf,
String str)
Utility function to copy a String into a ByteBuffer.
|
static int |
type(String typeName)
Convert a 4-character string to a 32-bit type.
|
static ByteBuffer |
wrapChunk(Chunk request)
Utility function to wrap a ByteBuffer around a Chunk.
|
public static final ByteOrder CHUNK_ORDER
public static final int CHUNK_FAIL
public abstract void connected()
public abstract void disconnected()
public abstract Chunk handleChunk(Chunk request)
public static Chunk createFailChunk(int errorCode, String msg)
public static ByteBuffer wrapChunk(Chunk request)
public static String getString(ByteBuffer buf, int len)
public static void putString(ByteBuffer buf, String str)
public static int type(String typeName)
public static String name(int type)