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 SessCreateTDReply extends AbstractJmsReply { 39 40 private String agentId; 41 42 43 public void setAgentId(String agentId) { 44 this.agentId = agentId; 45 } 46 47 48 public String getAgentId() { 49 return agentId; 50 } 51 52 protected int getClassId() { 53 return SESS_CREATE_TDREPLY; 54 } 55 56 62 public SessCreateTDReply(AbstractJmsRequest request, String agentId) { 63 super(request.getRequestId()); 64 this.agentId = agentId; 65 } 66 67 70 public SessCreateTDReply() {} 71 72 75 76 82 public void writeTo(OutputStream os) throws IOException { 83 super.writeTo(os); 84 StreamUtil.writeTo(agentId, os); 85 } 86 87 93 public void readFrom(InputStream is) throws IOException { 94 super.readFrom(is); 95 agentId = StreamUtil.readStringFrom(is); 96 } 97 } 98 | Popular Tags |