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

Method Summary
 String find(Context context, PUProtocolRequest protocolRequest)
          Try to determine the TCP protocol used (http, soap, etc.).
 

Method Detail

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 © 2012 Oracle Corporation. All Rights Reserved.