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     */
017    package org.apache.commons.configuration;
018    
019    import java.util.Map;
020    
021    /**
022     * Some FileSystems allow options to be passed on File operations. Users of commons
023     * configuration can implement this interface and register it with the FileSystem.
024     * @since 1.7
025     * @author <a
026     * href="http://commons.apache.org/configuration/team-list.html">Commons Configuration team</a>
027     */
028    public interface FileOptionsProvider
029    {
030        /**
031         * Key used to identify the user to be associated with the current file operations.
032         * The value associated with this key is a String identifying the current user.
033         */
034        String CURRENT_USER = "currentUser";
035    
036        /**
037         * Key used to indicate whether Webdav versioning support should be enabled.
038         * The value associated with this key is a Boolean where True indicates versioning should
039         * be enabled.
040         */
041        String VERSIONING = "versioning";
042    
043        /**
044         * Key used to identify the proxy host to connect through.
045         * The value associated with this key is a String identifying the host name of the proxy.
046         */
047        String PROXY_HOST = "proxyHost";
048    
049        /**
050         * Key used to identify the proxy port to connect through.
051         * The value associated with this key is an Integer identifying the port on the proxy.
052         */
053        String PROXY_PORT = "proxyPort";
054    
055        /**
056         * Key used to identify the maximum number of connections allowed to a single host.
057         * The value associated with this key is an Integer identifying the maximum number of
058         * connections allowed to a single host.
059         */
060        String MAX_HOST_CONNECTIONS = "maxHostConnections";
061    
062        /**
063         * Key used to identify the maximum number of connections allowed to all hosts.
064         * The value associated with this key is an Integer identifying the maximum number of
065         * connections allowed to all hosts.
066         */
067        String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
068    
069        /**
070         *
071         * @return Options to be used for this file.
072         */
073        Map getOptions();
074    }