001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.geronimo.axis;
017:
018: import java.io.IOException;
019: import java.io.InputStream;
020: import java.net.URI;
021: import java.util.Map;
022: import java.util.HashMap;
023:
024: import org.apache.geronimo.webservices.WebServiceContainer;
025:
026: public class AxisRequest implements WebServiceContainer.Request {
027: private int contentLength;
028: private String contentType;
029: private InputStream in;
030: private int method;
031: private Map parameters;
032: private URI uri;
033: private Map headers;
034: private Map attributes;
035: private String remoteAddress;
036:
037: /**
038: *
039: */
040: public AxisRequest(int contentLength, String contentType,
041: InputStream in, int method, Map parameters, URI uri,
042: Map headers, String remoteAddress) {
043: this .contentType = contentType;
044: this .in = in;
045: this .method = method;
046: this .parameters = parameters;
047: this .uri = uri;
048: this .headers = headers;
049: this .attributes = new HashMap();
050: this .remoteAddress = remoteAddress;
051: }
052:
053: public int getContentLength() {
054: return contentLength;
055: }
056:
057: public String getContentType() {
058: return contentType;
059: }
060:
061: public String getHeader(String name) {
062: return (String) headers.get(name);
063: }
064:
065: public InputStream getInputStream() throws IOException {
066: return in;
067: }
068:
069: public int getMethod() {
070: return method;
071: }
072:
073: public String getParameter(String name) {
074: return (String) parameters.get(name);
075: }
076:
077: public Map getParameters() {
078: return parameters;
079: }
080:
081: public URI getURI() {
082: return uri;
083: }
084:
085: public Object getAttribute(String name) {
086: return attributes.get(name);
087: }
088:
089: public void setAttribute(String name, Object value) {
090: attributes.put(name, value);
091: }
092:
093: public String getRemoteAddr() {
094: return remoteAddress;
095: }
096:
097: public String getContextPath() {
098: return "/axis2/";
099: }
100: }
|