00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the 00007 * "License"); you may not use this file except in compliance 00008 * with the License. You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, 00013 * software distributed under the License is distributed on an 00014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00015 * KIND, either express or implied. See the License for the 00016 * specific language governing permissions and limitations 00017 * under the License. 00018 */ 00019 package org.apache.xmlrpc.webserver; 00020 00021 import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl; 00022 00023 00028 public class RequestData extends XmlRpcHttpRequestConfigImpl { 00029 private final Connection connection; 00030 private boolean keepAlive; 00031 private String method, httpVersion; 00032 private int contentLength = -1; 00033 private boolean success; 00034 00038 public RequestData(Connection pConnection) { 00039 connection = pConnection; 00040 } 00041 00045 public Connection getConnection() { return connection; } 00046 00051 public boolean isKeepAlive() { return keepAlive; } 00052 00057 public void setKeepAlive(boolean pKeepAlive) { 00058 keepAlive = pKeepAlive; 00059 } 00060 00064 public String getHttpVersion() { return httpVersion; } 00065 00069 public void setHttpVersion(String pHttpVersion) { 00070 httpVersion = pHttpVersion; 00071 } 00072 00076 public int getContentLength() { return contentLength; } 00077 00081 public void setContentLength(int pContentLength) { 00082 contentLength = pContentLength; 00083 } 00084 00089 public boolean isByteArrayRequired() { 00090 return isKeepAlive() || !isEnabledForExtensions() || !isContentLengthOptional(); 00091 } 00092 00096 public String getMethod() { return method; } 00097 00101 public void setMethod(String pMethod) { 00102 method = pMethod; 00103 } 00104 00108 public boolean isSuccess() { return success; } 00109 00113 public void setSuccess(boolean pSuccess) { 00114 success = pSuccess; 00115 } 00116 }