## com.sun.grizzly.connectioncache.spi.transport
Interface ConnectionFinder<C extends Closeable>

    public interface ConnectionFinder<C extends Closeable>

An instance of a ConnectionFinder may be supplied to the OutboundConnectionCache.get method.

Method Summary
`C` `find(ContactInfo<C> cinfo, Collection<C> idleConnections, Collection<C> busyConnections)` Method that searches idleConnections and busyConnections for the best connection.

Method Detail

### find

    C find(ContactInfo<C> cinfo,
           Collection<C> idleConnections,
           Collection<C> busyConnections)
                             throws 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 `ContactInfo`
    `idleConnections` - a `Collection` of idle connections
    `busyConnections` - a `Collection` of busy connections
  Returns:
    a "best" connection, may be null if no "best" connection exists
  Throws:
    `IOException`

Copyright © 2008 SUN Microsystems. All Rights Reserved.