00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 package org.objectweb.joram.shared.client;
00025
00026 import java.io.InputStream;
00027 import java.io.OutputStream;
00028 import java.io.IOException;
00029
00030 import org.objectweb.joram.shared.stream.StreamUtil;
00031
00037 public final class CnxConnectReply extends AbstractJmsReply {
00039 private static final long serialVersionUID = 1L;
00040
00042 private int cnxKey;
00043
00045 public void setCnxKey(int cnxKey) {
00046 this.cnxKey = cnxKey;
00047 }
00048
00050 public int getCnxKey() {
00051 return cnxKey;
00052 }
00053
00055 private String proxyId;
00056
00058 public void setProxyId(String proxyId) {
00059 this.proxyId = proxyId;
00060 }
00061
00063 public String getProxyId() {
00064 return proxyId;
00065 }
00066
00067 protected int getClassId() {
00068 return CNX_CONNECT_REPLY;
00069 }
00070
00078 public CnxConnectReply(CnxConnectRequest req, int cnxKey, String proxyId) {
00079 super(req.getRequestId());
00080 this.cnxKey = cnxKey;
00081 this.proxyId = proxyId;
00082 }
00083
00087 public CnxConnectReply() {}
00088
00089
00090
00091
00092
00099 public void writeTo(OutputStream os) throws IOException {
00100 super.writeTo(os);
00101 StreamUtil.writeTo(cnxKey, os);
00102 StreamUtil.writeTo(proxyId, os);
00103 }
00104
00111 public void readFrom(InputStream is) throws IOException {
00112 super.readFrom(is);
00113 cnxKey = StreamUtil.readIntFrom(is);
00114 proxyId = StreamUtil.readStringFrom(is);
00115 }
00116 }