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.common; 00020 00021 import org.apache.xmlrpc.XmlRpcConfig; 00022 00023 00028 public abstract class XmlRpcController { 00029 private XmlRpcWorkerFactory workerFactory = getDefaultXmlRpcWorkerFactory(); 00030 private int maxThreads; 00031 private TypeFactory typeFactory = new TypeFactoryImpl(this); 00032 00036 protected abstract XmlRpcWorkerFactory getDefaultXmlRpcWorkerFactory(); 00037 00043 public void setMaxThreads(int pMaxThreads) { 00044 maxThreads = pMaxThreads; 00045 } 00046 00052 public int getMaxThreads() { 00053 return maxThreads; 00054 } 00055 00059 public void setWorkerFactory(XmlRpcWorkerFactory pFactory) { 00060 workerFactory = pFactory; 00061 } 00062 00066 public XmlRpcWorkerFactory getWorkerFactory() { 00067 return workerFactory; 00068 } 00069 00073 public abstract XmlRpcConfig getConfig(); 00074 00078 public void setTypeFactory(TypeFactory pTypeFactory) { 00079 typeFactory = pTypeFactory; 00080 } 00081 00085 public TypeFactory getTypeFactory() { 00086 return typeFactory; 00087 } 00088 }