Home » geronimo-2.2-source-release » org.apache.geronimo.axis » [javadoc | source]

    1   package org.apache.geronimo.axis;
    2   import java.io.OutputStream;
    3   import java.net.URL;
    4   import java.util.HashMap;
    5   import java.util.Map;
    6   
    7   import org.apache.geronimo.webservices.WebServiceContainer;
    8   
    9   public class AxisResponse implements WebServiceContainer.Response {
   10       private int contentLength;
   11       private String contentType;
   12       private String host;
   13       private OutputStream out;
   14       private int method;
   15       private Map parameters;
   16       private String path;
   17       private URL uri;
   18       private int port;
   19       private Map headers;
   20       private int statusCode;
   21       private String statusMessage;
   22   
   23       /**
   24        * 
   25        */
   26       public AxisResponse(String contentType,
   27           String host,
   28           String path,
   29           URL uri,
   30           int port,
   31           OutputStream out) {
   32           this.contentType = contentType;
   33           this.host = host;
   34           this.parameters = new HashMap();
   35           this.path = path;
   36           this.uri = uri;
   37           this.port = port;
   38           this.headers = new HashMap();
   39           this.out = out;
   40       }
   41   
   42       public int getContentLength() {
   43           return contentLength;
   44       }
   45   
   46   
   47       public String getHeader(String name) {
   48           return (String) headers.get(name);
   49       }
   50   
   51       public String getHost() {
   52           return host;
   53       }
   54   
   55       public OutputStream getOutputStream()  {
   56           return out;
   57       }
   58   
   59       public int getMethod() {
   60           return method;
   61       }
   62   
   63       public String getParameter(String name) {
   64           return (String) parameters.get(name);
   65       }
   66   
   67       public Map getParameters() {
   68           return parameters;
   69       }
   70   
   71       public String getPath() {
   72           return path;
   73       }
   74   
   75       public int getPort() {
   76           return port;
   77       }
   78   
   79       public URL getURI() {
   80           return uri;
   81       }
   82   
   83       /**
   84        * @return
   85        */
   86       public String getContentType() {
   87           return contentType;
   88       }
   89   
   90       /**
   91        * @return
   92        */
   93       public URL getUri() {
   94           return uri;
   95       }
   96   
   97       /**
   98        * @param i
   99        */
  100       public void setContentLength(int i) {
  101           contentLength = i;
  102       }
  103   
  104       /**
  105        * @param string
  106        */
  107       public void setContentType(String string) {
  108           contentType = string;
  109       }
  110   
  111       /**
  112        * @param string
  113        */
  114       public void setHost(String string) {
  115           host = string;
  116       }
  117   
  118       /**
  119        * @param i
  120        */
  121       public void setMethod(int i) {
  122           method = i;
  123       }
  124   
  125       /**
  126        * @param map
  127        */
  128       public void setParameters(Map map) {
  129           parameters = map;
  130       }
  131   
  132       /**
  133        * @param string
  134        */
  135       public void setPath(String string) {
  136           path = string;
  137       }
  138   
  139       /**
  140        * @param i
  141        */
  142       public void setPort(int i) {
  143           port = i;
  144       }
  145   
  146       /**
  147        * @param url
  148        */
  149       public void setUri(URL url) {
  150           uri = url;
  151       }
  152   
  153       public int getStatusCode() {
  154           return statusCode;
  155       }
  156   
  157       public void setStatusCode(int code) {
  158           statusCode = code; 
  159   
  160       }
  161   
  162       public void setStatusMessage(String responseString) {
  163           statusMessage = responseString;
  164   
  165       }
  166   
  167       public void setHeader(String name, String value) {
  168           headers.put(name,value);
  169   
  170       }
  171   
  172   }

Home » geronimo-2.2-source-release » org.apache.geronimo.axis » [javadoc | source]