KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xmlrpc > XmlRpcTransportFactory


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

16
17
18 package org.apache.xmlrpc;
19
20 import java.util.Properties JavaDoc;
21
22 /**
23  * Interface from XML-RPC to an underlying transport, most likely base on HTTP.
24  *
25  * @author <a HREF="mailto:andrew@kungfoocoder.org">Andrew Evers</a>
26  * @version $Id: XmlRpcTransportFactory.java,v 1.5 2005/04/22 10:25:57 hgomez Exp $
27  * @since 1.2
28  *
29  * Constructors for SSL implementations of XmlRpcTransportFactory should have a constructor
30  * with a signature defined by CONSTRUCTOR_SIGNATURE:
31  * <code>
32  * ClassName(Properties properties)
33  * </code>
34  *
35  * and use the default properties defined in this interface.
36  */

37 public interface XmlRpcTransportFactory
38 {
39     public static final String JavaDoc TRANSPORT_URL = "url"; // Name of property containing URL
40
public static final String JavaDoc TRANSPORT_AUTH = "auth"; // Name of property containing Basic Authentication information
41

42     public static final Class JavaDoc [] CONSTRUCTOR_SIGNATURE = new Class JavaDoc [] { Properties JavaDoc.class };
43     public static final String JavaDoc CONSTRUCTOR_SIGNATURE_STRING = "(java.util.Properties properties)";
44
45     /**
46      * Create a new XML-RPC transport.
47      *
48      * @return XmlRpcTransport an instance created according to the rules
49      * specified to the constructor.
50      */

51     public XmlRpcTransport createTransport()
52     throws XmlRpcClientException;
53
54     /**
55      * Set a property for all newly created transports.
56      *
57      * @param propertyName the property to set.
58      * @param value the value to set it to.
59      */

60     public void setProperty(String JavaDoc propertyName, Object JavaDoc value);
61 }
62
Popular Tags