org.jnetstream.protocol.codec
Interface CodecField<F extends Field,T>

All Superinterfaces:
Codec

public interface CodecField<F extends Field,T>
extends Codec

A codec for fields.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetstream.protocol.codec.Codec
Codec.Characteristic
 
Method Summary
 void dispatchValueChange(Field source, T oldValue, T newValue)
           
 F newField(java.lang.Class<F> type, Field field, int offset)
          Creates a new sub field inside another field.
 F newField(java.lang.Class<F> type, Header header, int offset)
          Creates a new field inside a header.
 
Methods inherited from interface org.jnetstream.protocol.codec.Codec
getCharacteristics
 

Method Detail

newField

F newField(java.lang.Class<F> type,
           Header header,
           int offset)
                         throws java.io.IOException,
                                CodecCreateException
Creates a new field inside a header. If the field already exists then a codec exception is thrown.

Type Parameters:
T -
Parameters:
type -
header -
offset -
Returns:
Throws:
java.io.IOException
CodecCreateException

newField

F newField(java.lang.Class<F> type,
           Field field,
           int offset)
                         throws java.io.IOException,
                                CodecCreateException
Creates a new sub field inside another field. If the field already exists then a codec exception is thrown.

Type Parameters:
T -
Parameters:
type -
field -
offset -
Returns:
Throws:
java.io.IOException
CodecCreateException

dispatchValueChange

void dispatchValueChange(Field source,
                         T oldValue,
                         T newValue)