Commit dba43eab authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Major Java rename spree...

parent 1812c7dc
...@@ -293,7 +293,7 @@ aspect Java_Register { ...@@ -293,7 +293,7 @@ aspect Java_Register {
public void Program.Java_emitTypeRegister(Java_env env) { public void Program.Java_emitTypeRegister(Java_env env) {
/* /*
env.println("static void register(LabCommChannel c) {"); env.println("static void register(Channel c) {");
env.indent(); env.indent();
for (int i = 0; i < getNumDecl(); i++) { for (int i = 0; i < getNumDecl(); i++) {
getDecl(i).Java_emitTypeRegister(env); getDecl(i).Java_emitTypeRegister(env);
...@@ -340,11 +340,11 @@ aspect Java_Class { ...@@ -340,11 +340,11 @@ aspect Java_Class {
} }
env.println("import java.io.IOException;"); env.println("import java.io.IOException;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommType;"); env.println("import se.lth.control.labcomm"+env.verStr+".Type;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommEncoder;"); env.println("import se.lth.control.labcomm"+env.verStr+".Encoder;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommDecoder;"); env.println("import se.lth.control.labcomm"+env.verStr+".Decoder;");
env.println(); env.println();
env.println("public class " + getName() + " implements LabCommType {"); env.println("public class " + getName() + " implements Type {");
env.println(); env.println();
env.indent(); env.indent();
getType().Java_emitInstance(env); getType().Java_emitInstance(env);
...@@ -380,21 +380,21 @@ aspect Java_Class { ...@@ -380,21 +380,21 @@ aspect Java_Class {
} }
env.println("import java.io.IOException;"); env.println("import java.io.IOException;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommDecoder;"); env.println("import se.lth.control.labcomm"+env.verStr+".Decoder;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommDispatcher;"); env.println("import se.lth.control.labcomm"+env.verStr+".SampleDispatcher;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommEncoder;"); env.println("import se.lth.control.labcomm"+env.verStr+".Encoder;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommHandler;"); env.println("import se.lth.control.labcomm"+env.verStr+".SampleHandler;");
env.println("import se.lth.control.labcomm"+env.verStr+".LabCommSample;"); env.println("import se.lth.control.labcomm"+env.verStr+".Sample;");
env.println(); env.println();
env.print("public class " + getName()); env.print("public class " + getName());
// if(getType().isUserType()) { // if(getType().isUserType()) {
// env.print(" extends "+getType().getTypeName()); // env.print(" extends "+getType().getTypeName());
// } // }
env.println(" implements LabCommSample {"); env.println(" implements Sample {");
env.println(); env.println();
env.indent(); env.indent();
getType().Java_emitInstance(env); getType().Java_emitInstance(env);
env.println("public interface Handler extends LabCommHandler {"); env.println("public interface Handler extends SampleHandler {");
env.print(" public void handle_" + getName() + "("); env.print(" public void handle_" + getName() + "(");
if (!isVoid()) { if (!isVoid()) {
getType().Java_emitType(env); getType().Java_emitType(env);
...@@ -403,21 +403,21 @@ aspect Java_Class { ...@@ -403,21 +403,21 @@ aspect Java_Class {
env.println(") throws Exception;"); env.println(") throws Exception;");
env.println("}"); env.println("}");
env.println(); env.println();
env.println("public static void register(LabCommDecoder d, Handler h) throws IOException {"); env.println("public static void register(Decoder d, SampleHandler h) throws IOException {");
env.indent(); env.indent();
env.println("d.register(new Dispatcher(), h);"); env.println("d.register(new Dispatcher(), h);");
env.unindent(); env.unindent();
env.println("}"); env.println("}");
env.println(); env.println();
env.println("public static void register(LabCommEncoder e) throws IOException {"); env.println("public static void register(Encoder e) throws IOException {");
env.indent(); env.indent();
env.println("e.register(new Dispatcher());"); env.println("e.register(new Dispatcher());");
env.unindent(); env.unindent();
env.println("}"); env.println("}");
env.println(); env.println();
env.println("private static class Dispatcher implements LabCommDispatcher {"); env.println("private static class Dispatcher implements SampleDispatcher {");
env.indent(); env.indent();
env.println(); env.println();
env.println("public Class getSampleClass() {"); env.println("public Class getSampleClass() {");
...@@ -438,8 +438,8 @@ aspect Java_Class { ...@@ -438,8 +438,8 @@ aspect Java_Class {
env.unindent(); env.unindent();
env.println("}"); env.println("}");
env.println(); env.println();
env.println("public void decodeAndHandle(LabCommDecoder d,"); env.println("public void decodeAndHandle(Decoder d,");
env.println(" LabCommHandler h) throws Exception {"); env.println(" SampleHandler h) throws Exception {");
env.indent(); env.indent();
if (isVoid()) { if (isVoid()) {
env.println(getName() + ".decode(d);"); env.println(getName() + ".decode(d);");
...@@ -481,7 +481,7 @@ aspect Java_Class { ...@@ -481,7 +481,7 @@ aspect Java_Class {
} }
public void TypeDecl.Java_emitEncoder(Java_env env) { public void TypeDecl.Java_emitEncoder(Java_env env) {
env.print("public static void encode(LabCommEncoder e"); env.print("public static void encode(Encoder e");
if (!isVoid()) { if (!isVoid()) {
env.print(", "); env.print(", ");
getType().Java_emitType(env); getType().Java_emitType(env);
...@@ -496,7 +496,7 @@ aspect Java_Class { ...@@ -496,7 +496,7 @@ aspect Java_Class {
} }
public void SampleDecl.Java_emitEncoder(Java_env env) { public void SampleDecl.Java_emitEncoder(Java_env env) {
env.print("public static void encode(LabCommEncoder e"); env.print("public static void encode(Encoder e");
if (!isVoid()) { if (!isVoid()) {
env.print(", "); env.print(", ");
getType().Java_emitType(env); getType().Java_emitType(env);
...@@ -588,7 +588,7 @@ aspect Java_Class { ...@@ -588,7 +588,7 @@ aspect Java_Class {
public void Decl.Java_emitDecoder(Java_env env) { public void Decl.Java_emitDecoder(Java_env env) {
env.print("public static "); env.print("public static ");
getType().Java_emitType(env); getType().Java_emitType(env);
env.println(" decode(LabCommDecoder d) throws IOException {"); env.println(" decode(Decoder d) throws IOException {");
env.indent(); env.indent();
if (!isVoid()) { if (!isVoid()) {
getType().Java_emitType(env); getType().Java_emitType(env);
......
...@@ -18,12 +18,12 @@ import java.util.Iterator; ...@@ -18,12 +18,12 @@ import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import se.lth.control.labcomm.LabCommDecoder; import se.lth.control.labcomm.Decoder;
import se.lth.control.labcomm.LabCommDecoderChannel; import se.lth.control.labcomm.DecoderChannel;
import se.lth.control.labcomm.LabCommEncoder; import se.lth.control.labcomm.Encoder;
import se.lth.control.labcomm.LabCommEncoderChannel; import se.lth.control.labcomm.EncoderChannel;
import AST.LabCommParser; import AST.Parser;
import AST.LabCommScanner; import AST.Scanner;
import AST.Program; import AST.Program;
import beaver.Parser.Exception; import beaver.Parser.Exception;
...@@ -160,8 +160,8 @@ public class DynamicPart { ...@@ -160,8 +160,8 @@ public class DynamicPart {
public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) { public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) {
Program ast = null; Program ast = null;
InputStream in = new ByteArrayInputStream(lcDecl.getBytes()); InputStream in = new ByteArrayInputStream(lcDecl.getBytes());
LabCommScanner scanner = new LabCommScanner(in); Scanner scanner = new Scanner(in);
LabCommParser parser = new LabCommParser(); Parser parser = new Parser();
Collection errors = new LinkedList(); Collection errors = new LinkedList();
InRAMCompiler irc = null; InRAMCompiler irc = null;
...@@ -272,7 +272,7 @@ public class DynamicPart { ...@@ -272,7 +272,7 @@ public class DynamicPart {
private void decodeTest(InRAMCompiler irc, HandlerContext ctxt, String tmpFile, String... sampleNames) { private void decodeTest(InRAMCompiler irc, HandlerContext ctxt, String tmpFile, String... sampleNames) {
try { try {
FileInputStream in = new FileInputStream(tmpFile); FileInputStream in = new FileInputStream(tmpFile);
LabCommDecoderChannel dec = new LabCommDecoderChannel(in); DecoderChannel dec = new DecoderChannel(in);
Class handlerClass = irc.load(handlerClassName); Class handlerClass = irc.load(handlerClassName);
Constructor hcc = handlerClass.getDeclaredConstructor(Object.class); Constructor hcc = handlerClass.getDeclaredConstructor(Object.class);
Object handler = hcc.newInstance(ctxt); Object handler = hcc.newInstance(ctxt);
...@@ -282,7 +282,7 @@ public class DynamicPart { ...@@ -282,7 +282,7 @@ public class DynamicPart {
Class sampleClass = irc.load(sampleName); Class sampleClass = irc.load(sampleName);
Class handlerInterface = irc.load(sampleName+"$Handler"); Class handlerInterface = irc.load(sampleName+"$Handler");
Method reg = sampleClass.getDeclaredMethod("register", LabCommDecoder.class, handlerInterface); Method reg = sampleClass.getDeclaredMethod("register", Decoder.class, handlerInterface);
reg.invoke(sampleClass, dec, handler); reg.invoke(sampleClass, dec, handler);
} }
...@@ -324,20 +324,20 @@ public class DynamicPart { ...@@ -324,20 +324,20 @@ public class DynamicPart {
FileOutputStream out = new FileOutputStream(tmpFile); FileOutputStream out = new FileOutputStream(tmpFile);
LabCommEncoderChannel enc = new LabCommEncoderChannel(out); EncoderChannel enc = new EncoderChannel(out);
/* register and send foo */ /* register and send foo */
Method regFoo = fc.getDeclaredMethod("register", LabCommEncoder.class); Method regFoo = fc.getDeclaredMethod("register", Encoder.class);
regFoo.invoke(fc, enc); regFoo.invoke(fc, enc);
Method doEncodeFoo = fc.getDeclaredMethod("encode", LabCommEncoder.class, ft); Method doEncodeFoo = fc.getDeclaredMethod("encode", Encoder.class, ft);
doEncodeFoo.invoke(fc, enc, fv); doEncodeFoo.invoke(fc, enc, fv);
/* register and send bar (NB! uses primitive type int) */ /* register and send bar (NB! uses primitive type int) */
Method regBar = bc.getDeclaredMethod("register", LabCommEncoder.class); Method regBar = bc.getDeclaredMethod("register", Encoder.class);
regBar.invoke(bc, enc); regBar.invoke(bc, enc);
Method doEncodeBar = bc.getDeclaredMethod("encode", LabCommEncoder.class, Integer.TYPE); Method doEncodeBar = bc.getDeclaredMethod("encode", Encoder.class, Integer.TYPE);
doEncodeBar.invoke(bc, enc, ctxt.bar); doEncodeBar.invoke(bc, enc, ctxt.bar);
out.close(); out.close();
......
...@@ -6,16 +6,16 @@ import gen.bar; ...@@ -6,16 +6,16 @@ import gen.bar;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import se.lth.control.labcomm.LabCommDecoderChannel; import se.lth.control.labcomm.DecoderChannel;
public class StaticDecoder implements foo.Handler, bar.Handler public class StaticDecoder implements foo.Handler, bar.Handler
{ {
LabCommDecoderChannel decoder; DecoderChannel decoder;
public StaticDecoder(InputStream in) throws Exception { public StaticDecoder(InputStream in) throws Exception {
decoder = new LabCommDecoderChannel(in); decoder = new DecoderChannel(in);
foo.register(decoder, this); foo.register(decoder, this);
bar.register(decoder, this); bar.register(decoder, this);
......
...@@ -2,19 +2,19 @@ package test; ...@@ -2,19 +2,19 @@ package test;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
import se.lth.control.labcomm.LabCommEncoderChannel; import se.lth.control.labcomm.EncoderChannel;
import gen.foo; import gen.foo;
import gen.bar; import gen.bar;
public class StaticEncoder { public class StaticEncoder {
LabCommEncoderChannel encoder; EncoderChannel encoder;
public StaticEncoder(OutputStream out) public StaticEncoder(OutputStream out)
throws Exception throws Exception
{ {
encoder = new LabCommEncoderChannel(out); encoder = new EncoderChannel(out);
foo.register(encoder); foo.register(encoder);
bar.register(encoder); bar.register(encoder);
} }
......
...@@ -16,18 +16,18 @@ import java.util.Iterator; ...@@ -16,18 +16,18 @@ import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import se.lth.control.labcomm.LabCommDecoder; import se.lth.control.labcomm.Decoder;
import se.lth.control.labcomm.LabCommDecoderChannel; import se.lth.control.labcomm.DecoderChannel;
import se.lth.control.labcomm.LabCommEncoder; import se.lth.control.labcomm.Encoder;
import se.lth.control.labcomm.LabCommEncoderChannel; import se.lth.control.labcomm.EncoderChannel;
import AST.LabCommParser; import AST.Parser;
import AST.LabCommScanner; import AST.Scanner;
import AST.Program; import AST.Program;
import beaver.Parser.Exception; import beaver.Parser.Exception;
public class TestLabCommCompiler { public class TestCompiler {
private static final String BAR = "bar"; private static final String BAR = "bar";
private static final String FOO = "foo"; private static final String FOO = "foo";
...@@ -73,7 +73,7 @@ public class TestLabCommCompiler { ...@@ -73,7 +73,7 @@ public class TestLabCommCompiler {
private static void decodeTest(InRAMCompiler irc, String tmpFile) { private static void decodeTest(InRAMCompiler irc, String tmpFile) {
try { try {
FileInputStream in = new FileInputStream(tmpFile); FileInputStream in = new FileInputStream(tmpFile);
LabCommDecoderChannel dec = new LabCommDecoderChannel(in); DecoderChannel dec = new DecoderChannel(in);
Class fc = irc.load(FOO); Class fc = irc.load(FOO);
Class hc = irc.load("gen_"+FOO+"Handler"); Class hc = irc.load("gen_"+FOO+"Handler");
...@@ -81,7 +81,7 @@ public class TestLabCommCompiler { ...@@ -81,7 +81,7 @@ public class TestLabCommCompiler {
Object h = hc.newInstance(); Object h = hc.newInstance();
Method reg = fc.getDeclaredMethod("register", LabCommDecoder.class, hi); Method reg = fc.getDeclaredMethod("register", Decoder.class, hi);
reg.invoke(fc, dec, h); reg.invoke(fc, dec, h);
dec.runOne(); dec.runOne();
...@@ -106,11 +106,11 @@ public class TestLabCommCompiler { ...@@ -106,11 +106,11 @@ public class TestLabCommCompiler {
z.setInt(f, 12); z.setInt(f, 12);
FileOutputStream out = new FileOutputStream(tmpFile); FileOutputStream out = new FileOutputStream(tmpFile);
LabCommEncoderChannel enc = new LabCommEncoderChannel(out); EncoderChannel enc = new EncoderChannel(out);
Method reg = fc.getDeclaredMethod("register", LabCommEncoder.class); Method reg = fc.getDeclaredMethod("register", Encoder.class);
reg.invoke(fc, enc); reg.invoke(fc, enc);
Method doEncode = fc.getDeclaredMethod("encode", LabCommEncoder.class, fc); Method doEncode = fc.getDeclaredMethod("encode", Encoder.class, fc);
doEncode.invoke(fc, enc, f); doEncode.invoke(fc, enc, f);
out.close(); out.close();
...@@ -123,8 +123,8 @@ public class TestLabCommCompiler { ...@@ -123,8 +123,8 @@ public class TestLabCommCompiler {
public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) { public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) {
Program ast = null; Program ast = null;
InputStream in = new ByteArrayInputStream(lcDecl.getBytes()); InputStream in = new ByteArrayInputStream(lcDecl.getBytes());
LabCommScanner scanner = new LabCommScanner(in); Scanner scanner = new Scanner(in);
LabCommParser parser = new LabCommParser(); Parser parser = new Parser();
Collection errors = new LinkedList(); Collection errors = new LinkedList();
InRAMCompiler irc = null; InRAMCompiler irc = null;
......
...@@ -18,12 +18,12 @@ import java.util.Iterator; ...@@ -18,12 +18,12 @@ import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import se.lth.control.labcomm.LabCommDecoder; import se.lth.control.labcomm.Decoder;
import se.lth.control.labcomm.LabCommDecoderChannel; import se.lth.control.labcomm.DecoderChannel;
import se.lth.control.labcomm.LabCommEncoder; import se.lth.control.labcomm.Encoder;
import se.lth.control.labcomm.LabCommEncoderChannel; import se.lth.control.labcomm.EncoderChannel;
import AST.LabCommParser; import AST.Parser;
import AST.LabCommScanner; import AST.Scanner;
import AST.Program; import AST.Program;
import beaver.Parser.Exception; import beaver.Parser.Exception;
...@@ -163,8 +163,8 @@ public class TestLabcommGen { ...@@ -163,8 +163,8 @@ public class TestLabcommGen {
public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) { public static InRAMCompiler generateCode(String lcDecl, HashMap<String, String> handlers) {
Program ast = null; Program ast = null;
InputStream in = new ByteArrayInputStream(lcDecl.getBytes()); InputStream in = new ByteArrayInputStream(lcDecl.getBytes());
LabCommScanner scanner = new LabCommScanner(in); Scanner scanner = new Scanner(in);
LabCommParser parser = new LabCommParser(); Parser parser = new Parser();
Collection errors = new LinkedList(); Collection errors = new LinkedList();
InRAMCompiler irc = null; InRAMCompiler irc = null;
...@@ -332,7 +332,7 @@ public class TestLabcommGen { ...@@ -332,7 +332,7 @@ public class TestLabcommGen {
private static void decodeTest(InRAMCompiler irc, String tmpFile, String... sampleNames) { private static void decodeTest(InRAMCompiler irc, String tmpFile, String... sampleNames) {
try { try {
FileInputStream in = new FileInputStream(tmpFile); FileInputStream in = new FileInputStream(tmpFile);
LabCommDecoderChannel dec = new LabCommDecoderChannel(in); DecoderChannel dec = new DecoderChannel(in);
Class handlerClass = irc.load(handlerClassName); Class handlerClass = irc.load(handlerClassName);
Constructor hcc = handlerClass.getDeclaredConstructor(Object.class); Constructor hcc = handlerClass.getDeclaredConstructor(Object.class);
// Object handler = handlerClass.newInstance(); // Object handler = handlerClass.newInstance();
...@@ -344,7 +344,7 @@ public class TestLabcommGen { ...@@ -344,7 +344,7 @@ public class TestLabcommGen {
Class sampleClass = irc.load(sampleName); Class sampleClass = irc.load(sampleName);
Class handlerInterface = irc.load(sampleName+"$Handler"); Class handlerInterface = irc.load(sampleName+"$Handler");
Method reg = sampleClass.getDeclaredMethod("register", LabCommDecoder.class, handlerInterface); Method reg = sampleClass.getDeclaredMethod("register", Decoder.class, handlerInterface);
reg.invoke(sampleClass, dec, handler); reg.invoke(sampleClass, dec, handler);
} }
...@@ -389,20 +389,20 @@ public class TestLabcommGen { ...@@ -389,20 +389,20 @@ public class TestLabcommGen {
FileOutputStream out = new FileOutputStream(tmpFile); FileOutputStream out = new FileOutputStream(tmpFile);
LabCommEncoderChannel enc = new LabCommEncoderChannel(out); EncoderChannel enc = new EncoderChannel(out);
/* register and send foo */ /* register and send foo */
Method regFoo = fc.getDeclaredMethod("register", LabCommEncoder.class); Method regFoo = fc.getDeclaredMethod("register", Encoder.class);
regFoo.invoke(fc, enc); regFoo.invoke(fc, enc);
Method doEncodeFoo = fc.getDeclaredMethod("encode", LabCommEncoder.class, ft); Method doEncodeFoo = fc.getDeclaredMethod("encode", Encoder.class, ft);
doEncodeFoo.invoke(fc, enc, f); doEncodeFoo.invoke(fc, enc, f);
/* register and send bar (NB! uses primitive type int) */ /* register and send bar (NB! uses primitive type int) */
Method regBar = bc.getDeclaredMethod("register", LabCommEncoder.class); Method regBar = bc.getDeclaredMethod("register", Encoder.class);
regBar.invoke(bc, enc); regBar.invoke(bc, enc);
Method doEncodeBar = bc.getDeclaredMethod("encode", LabCommEncoder.class, Integer.TYPE); Method doEncodeBar = bc.getDeclaredMethod("encode", Encoder.class, Integer.TYPE);
doEncodeBar.invoke(bc, enc, 42); doEncodeBar.invoke(bc, enc, 42);
out.close(); out.close();
...@@ -475,7 +475,7 @@ public class TestLabcommGen { ...@@ -475,7 +475,7 @@ public class TestLabcommGen {
private static void decodeTestSeparate(InRAMCompiler irc, String tmpFile, String... sampleNames) { private static void decodeTestSeparate(InRAMCompiler irc, String tmpFile, String... sampleNames) {
try { try {
FileInputStream in = new FileInputStream(tmpFile); FileInputStream in = new FileInputStream(tmpFile);
LabCommDecoderChannel dec = new LabCommDecoderChannel(in); DecoderChannel dec = new DecoderChannel(in);
for (String sampleName : sampleNames) { for (String sampleName : sampleNames) {
System.out.println("registering handler for "+sampleName); System.out.println("registering handler for "+sampleName);
Class sampleClass = irc.load(sampleName); Class sampleClass = irc.load(sampleName);
...@@ -484,7 +484,7 @@ public class TestLabcommGen { ...@@ -484,7 +484,7 @@ public class TestLabcommGen {
Object handler = handlerClass.newInstance(); Object handler = handlerClass.newInstance();
Method reg = sampleClass.getDeclaredMethod("register", LabCommDecoder.class, handlerInterface); Method reg = sampleClass.getDeclaredMethod("register", Decoder.class, handlerInterface);
reg.invoke(sampleClass, dec, handler); reg.invoke(sampleClass, dec, handler);
} }
......
...@@ -6,8 +6,8 @@ import java.io.OutputStream; ...@@ -6,8 +6,8 @@ import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import se.lth.control.labcomm.LabCommDecoderChannel; import se.lth.control.labcomm.DecoderChannel;
import se.lth.control.labcomm.LabCommEncoderChannel; import se.lth.control.labcomm.EncoderChannel;
import labcommTCPtest.gen.foo; import labcommTCPtest.gen.foo;
import labcommTCPtest.gen.foo.Handler; import labcommTCPtest.gen.foo.Handler;
...@@ -25,7 +25,7 @@ public class TestClient implements Handler { ...@@ -25,7 +25,7 @@ public class TestClient implements Handler {
public void test() { public void test() {
try { try {
LabCommEncoderChannel e = new LabCommEncoderChannel(out ); EncoderChannel e = new EncoderChannel(out );
foo.register(e); foo.register(e);
foo sample = new foo(); foo sample = new foo();
sample.c = 17; sample.c = 17;
...@@ -36,7 +36,7 @@ public class TestClient implements Handler { ...@@ -36,7 +36,7 @@ public class TestClient implements Handler {
printSample("Client sending", sample); printSample("Client sending", sample);
foo.encode(e, sample); foo.encode(e, sample);
LabCommDecoderChannel c = new LabCommDecoderChannel(in); DecoderChannel c = new DecoderChannel(in);
foo.register(c,this); foo.register(c,this);
c.run(); c.run();
} catch (Exception e) { } catch (Exception e) {
......
...@@ -6,8 +6,8 @@ import java.io.OutputStream; ...@@ -6,8 +6,8 @@ import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import java.net.UnknownHostException; import java.net.UnknownHostException;