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 ConsumerUnsetListRequest extends AbstractJmsRequest { 39 40 private boolean queueMode; 41 42 43 public void setQueueMode(boolean queueMode) { 44 this.queueMode = queueMode; 45 } 46 47 48 public boolean getQueueMode() { 49 return queueMode; 50 } 51 52 56 private int cancelledRequestId = -1; 57 58 62 public void setCancelledRequestId(int cancelledRequestId) { 63 this.cancelledRequestId = cancelledRequestId; 64 } 65 66 70 public int getCancelledRequestId() { 71 return cancelledRequestId; 72 } 73 74 protected int getClassId() { 75 return CONSUMER_UNSET_LIST_REQUEST; 76 } 77 78 84 public ConsumerUnsetListRequest(boolean queueMode) { 85 this.queueMode = queueMode; 86 } 87 88 91 public ConsumerUnsetListRequest() {} 92 93 public void toString(StringBuffer strbuf) { 94 super.toString(strbuf); 95 strbuf.append(",queueMode=").append(queueMode); 96 strbuf.append(",cancelledRequestId=").append(cancelledRequestId); 97 strbuf.append(')'); 98 } 99 100 103 104 110 public void writeTo(OutputStream os) throws IOException { 111 super.writeTo(os); 112 StreamUtil.writeTo(queueMode, os); 113 StreamUtil.writeTo(cancelledRequestId, os); 114 } 115 116 122 public void readFrom(InputStream is) throws IOException { 123 super.readFrom(is); 124 queueMode = StreamUtil.readBooleanFrom(is); 125 cancelledRequestId = StreamUtil.readIntFrom(is); 126 } 127 } 128 | Popular Tags |