net.i2p.sam

## Class SAMStreamSession.SAMStreamSessionSocketReader

- java.lang.Object
- - net.i2p.sam.SAMStreamSession.SAMStreamSessionSocketReader

- All Implemented Interfaces:
    Runnable
  Direct Known Subclasses:
    SAMStreamSession.SAMv1StreamSessionSocketReader
  Enclosing class:
    SAMStreamSession

      public class SAMStreamSession.SAMStreamSessionSocketReader
      extends Object
      implements Runnable

  SAM STREAM socket reader, running in its own thread. It forwards forward data to/from an I2P socket.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected I2PSocket` | `i2pSocket`
    `protected int` | `id`
    `protected Object` | `runningLock`
    `protected boolean` | `stillRunning`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAMStreamSessionSocketReader(I2PSocket s, int id)` Create a new SAM STREAM session socket reader

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()`
    `void` | `stopRunning()` Stop a SAM STREAM session socket reader thread immediately.

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

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

- - ### Field Detail

    - #### i2pSocket

          protected final I2PSocket i2pSocket

    - #### id

          protected final int id

    - #### runningLock

          protected final Object runningLock

    - #### stillRunning

          protected volatile boolean stillRunning

  - ### Constructor Detail

    - #### SAMStreamSessionSocketReader

          public SAMStreamSessionSocketReader(I2PSocket s,
                                              int id)
                                       throws IOException

      Create a new SAM STREAM session socket reader
      Parameters:
        `s` - Socket to be handled
        `id` - Unique id assigned to the handler
      Throws:
        `IOException`

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### stopRunning

          public void stopRunning()

      Stop a SAM STREAM session socket reader thread immediately.