1 17 package org.apache.geronimo.axis; 18 import java.io.OutputStream ; 19 import java.net.URL ; 20 import java.util.HashMap ; 21 import java.util.Map ; 22 23 import org.apache.geronimo.webservices.WebServiceContainer; 24 25 public class AxisResponse implements WebServiceContainer.Response { 26 private int contentLength; 27 private String contentType; 28 private String host; 29 private OutputStream out; 30 private int method; 31 private Map parameters; 32 private String path; 33 private URL uri; 34 private int port; 35 private Map headers; 36 private int statusCode; 37 private String statusMessage; 38 39 42 public AxisResponse(String contentType, 43 String host, 44 String path, 45 URL uri, 46 int port, 47 OutputStream out) { 48 this.contentType = contentType; 49 this.host = host; 50 this.parameters = new HashMap (); 51 this.path = path; 52 this.uri = uri; 53 this.port = port; 54 this.headers = new HashMap (); 55 this.out = out; 56 } 57 58 public int getContentLength() { 59 return contentLength; 60 } 61 62 63 public String getHeader(String name) { 64 return (String ) headers.get(name); 65 } 66 67 public String getHost() { 68 return host; 69 } 70 71 public OutputStream getOutputStream() { 72 return out; 73 } 74 75 public int getMethod() { 76 return method; 77 } 78 79 public String getParameter(String name) { 80 return (String ) parameters.get(name); 81 } 82 83 public Map getParameters() { 84 return parameters; 85 } 86 87 public String getPath() { 88 return path; 89 } 90 91 public int getPort() { 92 return port; 93 } 94 95 public URL getURI() { 96 return uri; 97 } 98 99 102 public String getContentType() { 103 return contentType; 104 } 105 106 109 public URL getUri() { 110 return uri; 111 } 112 113 116 public void setContentLength(int i) { 117 contentLength = i; 118 } 119 120 123 public void setContentType(String string) { 124 contentType = string; 125 } 126 127 130 public void setHost(String string) { 131 host = string; 132 } 133 134 137 public void setMethod(int i) { 138 method = i; 139 } 140 141 144 public void setParameters(Map map) { 145 parameters = map; 146 } 147 148 151 public void setPath(String string) { 152 path = string; 153 } 154 155 158 public void setPort(int i) { 159 port = i; 160 } 161 162 165 public void setUri(URL url) { 166 uri = url; 167 } 168 169 public int getStatusCode() { 170 return statusCode; 171 } 172 173 public void setStatusCode(int code) { 174 statusCode = code; 175 176 } 177 178 public void setStatusMessage(String responseString) { 179 statusMessage = responseString; 180 181 } 182 183 public void setHeader(String name, String value) { 184 headers.put(name,value); 185 186 } 187 188 } 189 | Popular Tags |