com.sun.grizzly.connectioncache.spi.transport
Interface ConnectionFinder<C extends java.io.Closeable>
public interface ConnectionFinder<C extends java.io.Closeable>
An instance of a ConnectionFinder may be supplied to the
OutboundConnectionCache.get method.
|
Method Summary |
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. |
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 connections
exists. May create a new connection and return it.
- Parameters:
cinfo - a ContactInfoidleConnections - a Collection of idle connectionsbusyConnections - a Collection of busy connections
- Returns:
- a "best" connection, may be null if no "best" connection exists
- Throws:
java.io.IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.