01: /**
02: * NetFileResponse.java
03: *
04: * Defines the class that holds the response information of NetFile.
05: * It serves as the container for NetFile response info including exceptions.
06: * This class is then sent over the wire from the Servlet to Applet.
07: * It is received by the class implementing NetFileTransport.
08: *
09: * @author Suresh Yellamaraju
10: * @version 6.0
11: * @release Lihue
12: */package com.sun.portal.netfile.transport;
13:
14: import java.io.Serializable;
15: import com.sun.portal.log.common.PortalLogger;
16: import java.util.Vector;
17: import com.sun.portal.netfile.shared.*;
18:
19: public class NetFileResponse implements Serializable {
20: private String requestId, sessionId;
21: private int responseType = 0;
22: private Vector nfResObjects;
23:
24: /**
25: * Construct NetFile response with a reqId and sessionId
26: */
27: public NetFileResponse(String reqId, String sess)
28: throws NetFileException {
29: if ((reqId != null) && (sess != null)) {
30: requestId = reqId;
31: sessionId = sess;
32: } else {
33: throw new NetFileException(
34: NetFileException.NETFILE_NULLVALUE,
35: "Null value in requestid and/or sessionid");
36: }
37: nfResObjects = new Vector(1);
38: }
39:
40: public void setNetFileResponseObject(Object obj) {
41: nfResObjects.add(obj);
42: }
43:
44: public void setNetFileResponseType(int resType) {
45: responseType = resType;
46: }
47:
48: public int getNetFileResponseType() {
49: return responseType;
50: }
51:
52: public Vector getNetFileResponseObject() {
53: return nfResObjects;
54: }
55:
56: public String getNetFileResponseSessionID() {
57: return sessionId;
58: }
59:
60: public String getNetFileResponseRequestID() {
61: return requestId;
62: }
63: }
|