1 22 package org.jboss.mq.il.uil2.msgs; 23 24 import java.io.IOException ; 25 import java.io.ObjectInputStream ; 26 import java.io.ObjectOutputStream ; 27 28 import javax.transaction.xa.Xid ; 29 30 36 public class RecoverMsg extends BaseMsg 37 { 38 private int flags; 39 private Xid [] xids; 40 41 public RecoverMsg() 42 { 43 super(MsgTypes.m_recover); 44 } 45 46 public RecoverMsg(int flags) 47 { 48 super(MsgTypes.m_recover); 49 this.flags = flags; 50 } 51 52 public int getFlags() 53 { 54 return flags; 55 } 56 57 public Xid [] getXids() 58 { 59 return xids; 60 } 61 62 public void setXids(Xid [] xids) 63 { 64 this.xids = xids; 65 } 66 67 public void write(ObjectOutputStream out) throws IOException 68 { 69 super.write(out); 70 int hasXids = xids != null ? 1 : 0; 71 out.writeByte(hasXids); 72 if (hasXids == 1) 73 out.writeObject(xids); 74 } 75 76 public void read(ObjectInputStream in) throws IOException , ClassNotFoundException 77 { 78 super.read(in); 79 int hasXids = in.readByte(); 80 if (hasXids == 1) 81 xids = (Xid []) in.readObject(); 82 } 83 } 84 | Popular Tags |