Commit 32bcdfe6 authored by Erik Jansson's avatar Erik Jansson
Browse files

Open up EncoderChannel and DecoderChannel for extension.

We need our subclasses of EncoderChannel and DecoderChannel to access
the def_registry field when using Firefly in order to short-circuit the
registration of Firefly's protocol types.

We also need access to the writer field from one of our subclasses of
EncoderChannel since we collect the data from one encoded sample and
flush the writer when it's done, placing the encoded data into a Firefly
data sample which is sent on the wire.
parent 7cac2f32
......@@ -9,7 +9,7 @@ import;
public class DecoderChannel implements Decoder {
private DataInputStream in;
private DecoderRegistry def_registry = new DecoderRegistry();
protected DecoderRegistry def_registry = new DecoderRegistry();
private DecoderRegistry ref_registry = new DecoderRegistry();
public DecoderChannel(InputStream in) throws IOException {
......@@ -7,10 +7,10 @@ import;
public class EncoderChannel implements Encoder {
private Writer writer;
protected Writer writer;
private ByteArrayOutputStream bytes = new ByteArrayOutputStream();
private DataOutputStream data = new DataOutputStream(bytes);
private EncoderRegistry def_registry = new EncoderRegistry();
protected EncoderRegistry def_registry = new EncoderRegistry();
private EncoderRegistry ref_registry = new EncoderRegistry();
private int current_tag;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment