    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 */
    017package org.apache.commons.configuration2.io;
    018
    019import 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 */
    026public interface FileOptionsProvider
    027{
    028    /**
    029     * Key used to identify the user to be associated with the current file operations.
    030     * The value associated with this key is a String identifying the current user.
    031     */
    032    String CURRENT_USER = "currentUser";
    033
    034    /**
    035     * Key used to indicate whether Webdav versioning support should be enabled.
    036     * The value associated with this key is a Boolean where True indicates versioning should
    037     * be enabled.
    038     */
    039    String VERSIONING = "versioning";
    040
    041    /**
    042     * Key used to identify the proxy host to connect through.
    043     * The value associated with this key is a String identifying the host name of the proxy.
    044     */
    045    String PROXY_HOST = "proxyHost";
    046
    047    /**
    048     * Key used to identify the proxy port to connect through.
    049     * The value associated with this key is an Integer identifying the port on the proxy.
    050     */
    051    String PROXY_PORT = "proxyPort";
    052
    053    /**
    054     * Key used to identify the maximum number of connections allowed to a single host.
    055     * The value associated with this key is an Integer identifying the maximum number of
    056     * connections allowed to a single host.
    057     */
    058    String MAX_HOST_CONNECTIONS = "maxHostConnections";
    059
    060    /**
    061     * Key used to identify the maximum number of connections allowed to all hosts.
    062     * The value associated with this key is an Integer identifying the maximum number of
    063     * connections allowed to all hosts.
    064     */
    065    String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
    066
    067    /**
    068     *
    069     * @return Options to be used for this file.
    070     */
    071    Map<String, Object> getOptions();
    072}