📄 dataconnectionconfiguration.java
字号:
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */package org.apache.ftpserver;import java.net.InetAddress;import org.apache.ftpserver.ssl.SslConfiguration;/** * Data connection configuration interface. * * @author The Apache MINA Project (dev@mina.apache.org) * @version $Rev: 729474 $, $Date: 2008-12-26 11:09:07 +0100 (Fri, 26 Dec 2008) $ */public interface DataConnectionConfiguration { /** * Get the maximum idle time in seconds. * @return The maximum idle time */ int getIdleTime(); /** * Is active data connection enabled? * @return true if active data connections are enabled */ boolean isActiveEnabled(); /** * Check the PORT IP with the client IP? * @return true if the PORT IP is verified */ boolean isActiveIpCheck(); /** * Get the active data connection local host. * @return The {@link InetAddress} for active connections */ String getActiveLocalAddress(); /** * Get the active data connection local port. * @return The active data connection local port */ int getActiveLocalPort(); /** * Get passive server address. null, if not set in the configuration. * @return The {@link InetAddress} used for passive connections */ String getPassiveAddress(); /** * Get the passive address that will be returned to clients on the PASV * command. * * @return The passive address to be returned to clients, null if not * configured. */ String getPassiveExernalAddress(); /** * Get the passive ports to be used for data connections. Ports can be * defined as single ports, closed or open ranges. Multiple definitions can * be separated by commas, for example: * <ul> * <li>2300 : only use port 2300 as the passive port</li> * <li>2300-2399 : use all ports in the range</li> * <li>2300- : use all ports larger than 2300</li> * <li>2300, 2305, 2400- : use 2300 or 2305 or any port larger than 2400</li> * </ul> * * Defaults to using any available port * * @return The passive ports string */ String getPassivePorts(); /** * Request a passive port. Will block until a port is available * @return A free passive part */ int requestPassivePort(); /** * Release passive port. * @param port The port to be released */ void releasePassivePort(int port); /** * Get SSL configuration for this data connection. * @return The {@link SslConfiguration} */ SslConfiguration getSslConfiguration(); /** * @return True if SSL is mandatory for the data channel */ boolean isImplicitSsl();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -