    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 configuration can implement this
    023 * interface and register it with the FileSystem.
    024 *
    025 * @since 1.7
    026 */
    027public interface FileOptionsProvider {
    028    /**
    029     * Key used to identify the user to be associated with the current file operations. The value associated with this key
    030     * 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. The value associated with this key is a
    036     * Boolean where True indicates versioning should be enabled.
    037     */
    038    String VERSIONING = "versioning";
    039
    040    /**
    041     * Key used to identify the proxy host to connect through. The value associated with this key is a String identifying
    042     * the host name of the proxy.
    043     */
    044    String PROXY_HOST = "proxyHost";
    045
    046    /**
    047     * Key used to identify the proxy port to connect through. The value associated with this key is an Integer identifying
    048     * the port on the proxy.
    049     */
    050    String PROXY_PORT = "proxyPort";
    051
    052    /**
    053     * Key used to identify the maximum number of connections allowed to a single host. The value associated with this key
    054     * is an Integer identifying the maximum number of connections allowed to a single host.
    055     */
    056    String MAX_HOST_CONNECTIONS = "maxHostConnections";
    057
    058    /**
    059     * Key used to identify the maximum number of connections allowed to all hosts. The value associated with this key is an
    060     * Integer identifying the maximum number of connections allowed to all hosts.
    061     */
    062    String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
    063
    064    /**
    065     *
    066     * @return Options to be used for this file.
    067     */
    068    Map<String, Object> getOptions();
    069}