com.sun.grizzly.portunif
Interface ProtocolFinder
- All Known Implementing Classes:
- HttpProtocolFinder
public interface ProtocolFinder
This interface should be used to implement a TCP 'protocol finder'. From the
SelectionKey
, it is possible to get a reference to the
SocketChannel
and read bytes from it. From the bytes read, the
TCP protocol can be derived and stored inside a ProtocolInfo
instance.
- Author:
- Jeanfrancois Arcand
find
String find(Context context,
PUProtocolRequest protocolRequest)
throws IOException
- Try to determine the TCP protocol used (http, soap, etc.).
- Parameters:
selectionKey
- The SelectionKey from which the SocketChannel can
be derived.
- Returns:
- ProtocolInfo An instance that store information about the
protocol, if found.
- Throws:
IOException
Copyright © 2010 SUN Microsystems. All Rights Reserved.