added missing interface

This commit is contained in:
Iwein Fuld
2008-08-14 20:16:56 +00:00
parent c02bfd4a49
commit b4ba382404
2 changed files with 44 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed 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.springframework.integration.adapter.ftp;
import org.apache.commons.net.ftp.FTPClient;
/**
* A pool of {@link FTPClient} instances. The pool can be used to control the
* number of open ftp connections and reuse these connections efficiently.
* @author Iwein Fuld
*
*/
public interface FTPClientPool extends FTPClientFactory {
/**
* Releases the client back to the pool. When calling this method the caller
* is no longer responsible for the connection. The pool is free to do with
* it as it sees fit, which means either recycling or disconnecting it most
* probably.
*
* The caller should NOT disconnect the client before calling this method.
*
* The caller is NOT expected to use the client after calling this method.
* Doing so can lead to unexpected behavior.
*
* @param client
*/
void releaseClient(FTPClient client);
}

View File

@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
*
* @author Iwein Fuld
*/
public class QueuedFTPClientPool {
public class QueuedFTPClientPool implements FTPClientPool {
private static final int DEFAULT_POOL_SIZE = 5;