1 8 9 package mx4j.tools.remote.caucho.burlap; 10 11 import java.io.IOException ; 12 import java.io.OutputStream ; 13 14 import com.caucho.burlap.io.BurlapOutput; 15 import mx4j.tools.remote.caucho.CauchoOutput; 16 import mx4j.tools.remote.caucho.serialization.JMXSerializerFactory; 17 18 21 class BurlapCauchoOutput implements CauchoOutput 22 { 23 private final BurlapOutput output; 24 25 BurlapCauchoOutput(OutputStream stream) 26 { 27 this.output = new BurlapOutput(); 28 output.setSerializerFactory(new JMXSerializerFactory()); 29 output.init(stream); 30 } 31 32 public void startReply() throws IOException 33 { 34 output.startReply(); 35 } 36 37 public void completeReply() throws IOException 38 { 39 output.completeReply(); 40 } 41 42 public void startCall() throws IOException 43 { 44 output.startCall(); 45 } 46 47 public void completeCall() throws IOException 48 { 49 output.completeCall(); 50 } 51 52 public void writeHeader(String header) throws IOException 53 { 54 output.writeHeader(header); 55 } 56 57 public void writeMethod(String methodName) throws IOException 58 { 59 output.writeMethod(methodName); 60 } 61 62 public void writeObject(Object object) throws IOException 63 { 64 output.writeObject(object); 65 } 66 67 public void writeFault(Throwable fault) throws IOException 68 { 69 output.writeFault(fault.getClass().getName(), fault.getMessage(), fault); 70 } 71 } 72 | Popular Tags |