Interface ConnectionFinder<C extends Connection>
-
public interface ConnectionFinder<C extends Connection>
An instance of a ConnectionFinder may be supplied to the OutboundConnectionCache.get method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description C
find(ContactInfo<C> cinfo, java.util.Collection<C> idleConnections, java.util.Collection<C> busyConnections)
Method that searches idleConnections and busyConnections for the best connection.
-
-
-
Method Detail
-
find
C find(ContactInfo<C> cinfo, java.util.Collection<C> idleConnections, java.util.Collection<C> busyConnections) throws java.io.IOException
Method that searches idleConnections and busyConnections for the best connection. May return null if no best connection exists. May create a new connection and return it.- Parameters:
cinfo
- info to match in the searchidleConnections
- idle connections to searchbusyConnections
- busy connections to search- Returns:
- the best connection
- Throws:
java.io.IOException
- if an error occurred
-
-