org.fusesource.hawtbuf.proto
Class PBMessageFramedCodec<T extends MessageBuffer>

java.lang.Object
  extended by org.fusesource.hawtbuf.codec.VariableCodec<T>
      extended by org.fusesource.hawtbuf.proto.PBMessageFramedCodec<T>
All Implemented Interfaces:
Codec<T>

public class PBMessageFramedCodec<T extends MessageBuffer>
extends VariableCodec<T>

Implements the Codec interface for PBMessages type which encode/decodes framed messages.

Author:
Hiram Chirino

Constructor Summary
PBMessageFramedCodec(PBMessageFactory<?,? extends T> factory)
           
 
Method Summary
 T decode(DataInput dataIn)
           
 T deepCopy(T value)
           
 void encode(T value, DataOutput dataOut)
           
 int estimatedSize(T value)
           
 boolean isDeepCopySupported()
           
 
Methods inherited from class org.fusesource.hawtbuf.codec.VariableCodec
getFixedSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBMessageFramedCodec

public PBMessageFramedCodec(PBMessageFactory<?,? extends T> factory)
Method Detail

decode

public T decode(DataInput dataIn)
                               throws IOException
Throws:
IOException

encode

public void encode(T value,
                   DataOutput dataOut)
            throws IOException
Throws:
IOException

estimatedSize

public int estimatedSize(T value)

isDeepCopySupported

public boolean isDeepCopySupported()
Specified by:
isDeepCopySupported in interface Codec<T extends MessageBuffer>
Overrides:
isDeepCopySupported in class VariableCodec<T extends MessageBuffer>

deepCopy

public T deepCopy(T value)
Specified by:
deepCopy in interface Codec<T extends MessageBuffer>
Overrides:
deepCopy in class VariableCodec<T extends MessageBuffer>


Copyright © 2010 Progress Software Inc.. All Rights Reserved.