KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > axis > AxisRequest


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.axis;
18 import java.io.IOException JavaDoc;
19 import java.io.InputStream JavaDoc;
20 import java.net.URI JavaDoc;
21 import java.util.Map JavaDoc;
22 import java.util.HashMap JavaDoc;
23
24 import org.apache.geronimo.webservices.WebServiceContainer;
25
26 public class AxisRequest implements WebServiceContainer.Request {
27     private int contentLength;
28     private String JavaDoc contentType;
29     private InputStream JavaDoc in;
30     private int method;
31     private Map JavaDoc parameters;
32     private URI JavaDoc uri;
33     private Map JavaDoc headers;
34     private Map JavaDoc attributes;
35
36     /**
37      *
38      */

39     public AxisRequest(
40         int contentLength,
41         String JavaDoc contentType,
42         InputStream JavaDoc in,
43         int method,
44         Map JavaDoc parameters,
45         URI JavaDoc uri,
46         Map JavaDoc headers) {
47         this.contentType = contentType;
48         this.in = in;
49         this.method = method;
50         this.parameters = parameters;
51         this.uri = uri;
52         this.headers = headers;
53         this.attributes = new HashMap JavaDoc();
54     }
55
56     public int getContentLength() {
57         return contentLength;
58     }
59
60     public String JavaDoc getContentType() {
61         return contentType;
62     }
63
64     public String JavaDoc getHeader(String JavaDoc name) {
65         return (String JavaDoc) headers.get(name);
66     }
67
68     public InputStream JavaDoc getInputStream() throws IOException JavaDoc {
69         return in;
70     }
71
72     public int getMethod() {
73         return method;
74     }
75
76     public String JavaDoc getParameter(String JavaDoc name) {
77         return (String JavaDoc) parameters.get(name);
78     }
79
80     public Map JavaDoc getParameters() {
81         return parameters;
82     }
83
84     public URI JavaDoc getURI() {
85         return uri;
86     }
87
88     public Object JavaDoc getAttribute(String JavaDoc name) {
89         return attributes.get(name);
90     }
91
92     public void setAttribute(String JavaDoc name, Object JavaDoc value){
93         attributes.put(name, value);
94     }
95 }
96
Popular Tags