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 java.util.Vector ; 32 33 import org.objectweb.joram.shared.stream.Streamable; 34 import org.objectweb.joram.shared.stream.StreamUtil; 35 36 40 public final class SessAckRequest extends AbstractJmsRequest { 41 42 private Vector ids; 43 44 45 public void setIds(Vector ids) { 46 this.ids = ids; 47 } 48 49 public void addId(String id) { 50 ids.addElement(id); 51 } 52 53 54 public Vector getIds() { 55 return ids; 56 } 57 58 59 private boolean queueMode; 60 61 62 public void setQueueMode(boolean queueMode) { 63 this.queueMode = queueMode; 64 } 65 66 67 public boolean getQueueMode() { 68 return queueMode; 69 } 70 71 protected int getClassId() { 72 return SESS_ACK_REQUEST; 73 } 74 75 83 public SessAckRequest(String targetName, Vector ids, boolean queueMode) { 84 super(targetName); 85 this.ids = ids; 86 this.queueMode = queueMode; 87 } 88 89 92 public SessAckRequest() { 93 ids = new Vector (); 94 } 95 96 99 100 106 public void writeTo(OutputStream os) throws IOException { 107 super.writeTo(os); 108 StreamUtil.writeVectorOfStringTo(ids, os); 109 StreamUtil.writeTo(queueMode, os); 110 } 111 112 118 public void readFrom(InputStream is) throws IOException { 119 super.readFrom(is); 120 ids = StreamUtil.readVectorOfStringFrom(is); 121 queueMode = StreamUtil.readBooleanFrom(is); 122 } 123 } 124 | Popular Tags |