net.i2p.sam

## Class SAMHandlerFactory

- java.lang.Object
- - net.i2p.sam.SAMHandlerFactory

-     class SAMHandlerFactory
      extends Object

  SAM handler factory class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAMHandlerFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SAMHandler` | `createSAMHandler(SocketChannel s, Properties i2cpProps, SAMBridge parent)` Return the right SAM handler depending on the protocol version required by the client.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SAMHandlerFactory

          SAMHandlerFactory()

  - ### Method Detail

    - #### createSAMHandler

          public static SAMHandler createSAMHandler(SocketChannel s,
                                                    Properties i2cpProps,
                                                    SAMBridge parent)
                                             throws SAMException

      Return the right SAM handler depending on the protocol version required by the client.
      Parameters:
        `s` - Socket attached to SAM client
        `i2cpProps` - config options for our i2cp connection
      Returns:
        A SAM protocol handler, or null if the client closed before the handshake
      Throws:
        `SAMException` - if the connection handshake (HELLO message) was malformed