cdac.medinfo.sdk.hl7282.hl7net.commons

## Interface INetworkAgent

- All Known Implementing Classes:
    ClientSideNetworkAgent, ServerSideNetworkAgent

      public interface INetworkAgent

  The INetworkAgent interface should be implemented by any class whose instances are intended to read and write purpose.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `read()` Reads Data From Input Stream of Underlying Socket with Packet Size of 1MB.
    `void` | `setConnectionListener(IConnectionListener objIConnectionListener)` Sets ConnectionListener.
    `void` | `write(byte[] buffer)` Writes data on Output Stream of Underlying Socket.

- - ### Method Detail

    - #### read

          void read()
                    throws java.lang.InterruptedException,
                           java.io.IOException

      Reads Data From Input Stream of Underlying Socket with Packet Size of 1MB.
      Throws:
        `java.lang.InterruptedException`
        `java.io.IOException` - Signals that an IO Exception has occurred.

    - #### write

          void write(byte[] buffer)
                     throws java.io.IOException

      Writes data on Output Stream of Underlying Socket.
      Parameters:
        `buffer` - the buffer to be written
      Throws:
        `java.io.IOException` - Signals that an IO Exception has occurred.

    - #### setConnectionListener

          void setConnectionListener(IConnectionListener objIConnectionListener)

      Sets ConnectionListener.
      Parameters:
        `IConnectionListener` -