View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.commons.configuration2.io;
18  
19  import java.util.Map;
20  
21  /**
22   * Some FileSystems allow options to be passed on File operations. Users of commons configuration can implement this
23   * interface and register it with the FileSystem.
24   *
25   * @since 1.7
26   */
27  public interface FileOptionsProvider {
28      /**
29       * Key used to identify the user to be associated with the current file operations. The value associated with this key
30       * is a String identifying the current user.
31       */
32      String CURRENT_USER = "currentUser";
33  
34      /**
35       * Key used to indicate whether WebDAV versioning support should be enabled. The value associated with this key is a
36       * Boolean where True indicates versioning should be enabled.
37       */
38      String VERSIONING = "versioning";
39  
40      /**
41       * Key used to identify the proxy host to connect through. The value associated with this key is a String identifying
42       * the host name of the proxy.
43       */
44      String PROXY_HOST = "proxyHost";
45  
46      /**
47       * Key used to identify the proxy port to connect through. The value associated with this key is an Integer identifying
48       * the port on the proxy.
49       */
50      String PROXY_PORT = "proxyPort";
51  
52      /**
53       * Key used to identify the maximum number of connections allowed to a single host. The value associated with this key
54       * is an Integer identifying the maximum number of connections allowed to a single host.
55       */
56      String MAX_HOST_CONNECTIONS = "maxHostConnections";
57  
58      /**
59       * Key used to identify the maximum number of connections allowed to all hosts. The value associated with this key is an
60       * Integer identifying the maximum number of connections allowed to all hosts.
61       */
62      String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
63  
64      /**
65       *
66       * @return Options to be used for this file.
67       */
68      Map<String, Object> getOptions();
69  }