1 24 package org.objectweb.joram.shared.client; 25 26 import java.io.Externalizable ; 27 import java.io.InputStream ; 28 import java.io.OutputStream ; 29 import java.io.IOException ; 30 31 import org.objectweb.joram.shared.stream.Streamable; 32 import org.objectweb.joram.shared.stream.StreamUtil; 33 34 38 public final class XACnxCommit extends AbstractJmsRequest { 39 40 private byte[] bq; 41 42 43 public byte[] getBQ() { 44 return bq; 45 } 46 47 public void setBQ(byte[] bq) { 48 this.bq = bq; 49 } 50 51 52 private int fi; 53 54 55 public int getFI() { 56 return fi; 57 } 58 59 public void setFI(int fi) { 60 this.fi = fi; 61 } 62 63 64 private byte[] gti; 65 66 67 public byte[] getGTI() { 68 return gti; 69 } 70 71 public void setGTI(byte[] gti) { 72 this.gti = gti; 73 } 74 75 protected int getClassId() { 76 return XA_CNX_COMMIT; 77 } 78 79 86 public XACnxCommit(byte[] bq, int fi, byte[] gti) { 87 super(); 88 this.bq = bq; 89 this.fi = fi; 90 this.gti = gti; 91 } 92 93 96 public XACnxCommit() {} 97 98 101 102 108 public void writeTo(OutputStream os) throws IOException { 109 super.writeTo(os); 110 StreamUtil.writeTo(bq, os); 111 StreamUtil.writeTo(fi, os); 112 StreamUtil.writeTo(gti, os); 113 } 114 115 121 public void readFrom(InputStream is) throws IOException { 122 super.readFrom(is); 123 bq = StreamUtil.readByteArrayFrom(is); 124 fi = StreamUtil.readIntFrom(is); 125 gti = StreamUtil.readByteArrayFrom(is); 126 } 127 } 128 | Popular Tags |