1 24 package org.objectweb.joram.shared.client; 25 26 import java.io.InputStream ; 27 import java.io.OutputStream ; 28 import java.io.IOException ; 29 30 import org.objectweb.joram.shared.stream.StreamUtil; 31 32 public final class ActivateConsumerRequest extends AbstractJmsRequest { 33 private boolean activate; 34 35 public boolean getActivate() { 36 return activate; 37 } 38 39 protected int getClassId() { 40 return ACTIVATE_CONSUMER_REQUEST; 41 } 42 43 public ActivateConsumerRequest(String targetName, boolean activate) { 44 super(targetName); 45 this.activate = activate; 46 } 47 48 51 public ActivateConsumerRequest() {} 52 53 56 57 63 public void writeTo(OutputStream os) throws IOException { 64 super.writeTo(os); 65 StreamUtil.writeTo(activate, os); 66 } 67 68 74 public void readFrom(InputStream is) throws IOException { 75 super.readFrom(is); 76 activate = StreamUtil.readBooleanFrom(is); 77 } 78 } 79 | Popular Tags |