|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.protocol.specification.FrameReader
public final class FrameReader
A utility class for reading fulmine delta (FD) protocol frames. Thread safe.
Please refer to the "Fulmine Delta Transmission Protocol" specification for a complete description of the fulmine serialisation technique.
IFrameConstants| Field Summary | |
|---|---|
static ThreadLocal<Boolean> |
inContext
Allows a thread to signal it is executing in a FrameReader context. |
| Constructor Summary | |
|---|---|
FrameReader()
Standard constructor |
|
| Method Summary | |
|---|---|
static void |
debug(byte[] frame)
Reads an FD frame holding the state of a container. |
static void |
findHeaderAndDataBufferPositions(byte[] frame,
int start,
int[] headerStart,
int[] headerLength,
int[] dataStart,
int[] dataLength)
Identify the header and data buffers within the frame. |
IAddressable |
getRemoteContainerDetailsFromFrame(byte[] frame,
String remoteContextIdentity)
Get the identity, type and domain of the container in the frame |
IContainer |
getRemoteContainerForFrame(byte[] frame,
String remoteContextIdentity,
IFrameworkContext context)
Get the remote container for the frame. |
static boolean |
inContext()
Determine if the thread is executing in a FrameReader context. |
IContainer |
read(byte[] frame,
String remoteContextIdentity,
IFrameworkContext context)
Reads an FD frame holding the state of a container. |
static void |
readNestedIWF(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes,
FieldReader.IFieldReaderTask readerTask)
Read a nested FD frame that is composed of IWF fields/fields. |
static void |
readNestedSWF(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes,
FieldReader.IFieldReaderTask readerTask)
Read a nested FD frame that is composed of SWF fields/fields. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ThreadLocal<Boolean> inContext
| Constructor Detail |
|---|
public FrameReader()
| Method Detail |
|---|
public static boolean inContext()
true if the executing thread in a FrameReader
context.public static void debug(byte[] frame)
frame - the byte[] holding the wire state of a container.
public IAddressable getRemoteContainerDetailsFromFrame(byte[] frame,
String remoteContextIdentity)
IFrameReader
getRemoteContainerDetailsFromFrame in interface IFrameReaderframe - the byte[] holding the wire state of a container.remoteContextIdentity - the identity of the remote context this frame is from
IAddressable object identifying the identity, type and
domain of the container this frame is for
public IContainer getRemoteContainerForFrame(byte[] frame,
String remoteContextIdentity,
IFrameworkContext context)
getRemoteContainerForFrame in interface IFrameReaderframe - the byte[] holding the wire state of a container.remoteContextIdentity - the identity of the remote context this frame is fromcontext - the context to use to create the remote IContainer
IContainer for the frame.
public IContainer read(byte[] frame,
String remoteContextIdentity,
IFrameworkContext context)
read in interface IFrameReaderframe - the byte[] holding the wire state of a container.remoteContextIdentity - the identity of the remote context this frame is fromcontext - the context to use to create the remote IContainer
IContainer with the state in the frame applied
public static void readNestedSWF(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes,
FieldReader.IFieldReaderTask readerTask)
scope - the scope of the read operationbuffer - the buffer holding the nested FD framestart - the start in the buffer for the nested FD framenumberOfBytes - the length of the nested FD framereaderTask - the task to invoke for each component/component in the nested
FD frame as it is parsed
public static void readNestedIWF(IOperationScope scope,
byte[] buffer,
int start,
int numberOfBytes,
FieldReader.IFieldReaderTask readerTask)
scope - the scope of the read operationbuffer - the buffer holding the nested FD framestart - the start in the buffer for the nested FD framenumberOfBytes - the length of the nested FD framereaderTask - the task to invoke for each component/component in the nested
FD frame as it is parsed
public static void findHeaderAndDataBufferPositions(byte[] frame,
int start,
int[] headerStart,
int[] headerLength,
int[] dataStart,
int[] dataLength)
frame - the byte[] holding the header and data buffersstart - the position in the byte[] where the frame startsheaderStart - headerStart[0] will hold the position where the header buffer
starts in the frameheaderLength - headerLength[0] will hold the length of the headerdataStart - dataStart[0] will hold the position where the data buffer
starts in the framedataLength - dataLength[0] will hold the length of the data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||