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 * https://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 /** 030 * Key used to identify the user to be associated with the current file operations. The value associated with this key 031 * is a String identifying the current user. 032 */ 033 String CURRENT_USER = "currentUser"; 034 035 /** 036 * Key used to indicate whether WebDAV versioning support should be enabled. The value associated with this key is a 037 * Boolean where True indicates versioning should be enabled. 038 */ 039 String VERSIONING = "versioning"; 040 041 /** 042 * Key used to identify the proxy host to connect through. The value associated with this key is a String identifying 043 * 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. The value associated with this key is an Integer identifying 049 * 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. The value associated with this key 055 * is an Integer identifying the maximum number of connections allowed to a single host. 056 */ 057 String MAX_HOST_CONNECTIONS = "maxHostConnections"; 058 059 /** 060 * Key used to identify the maximum number of connections allowed to all hosts. The value associated with this key is an 061 * Integer identifying the maximum number of connections allowed to all hosts. 062 */ 063 String MAX_TOTAL_CONNECTIONS = "maxTotalConnections"; 064 065 /** 066 * Gets the options to be used for this file. 067 * 068 * @return Options to be used for this file. 069 */ 070 Map<String, Object> getOptions(); 071}