接口 Modbus4JInputStreamCallback


public interface Modbus4JInputStreamCallback
A callback interface for input streams. NOTE: if the InputStreamEPoll instance is terminated, any running processes will be destroyed without any notification to this callback.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Called when the closure of the input stream is detected.
    void
    input(byte[] buf, int len)
    Called when content is read from the input stream.
    void
    Called if there is an IOException while reading input stream.
    void
    Called if the InputStreamEPoll instance was terminated while the input stream was still registered.
  • 方法详细资料

    • input

      void input(byte[] buf, int len)
      Called when content is read from the input stream.
      参数:
      buf - the content that was read. This is a shared byte array. Contents can be manipulated within this call, but the array itself should not be stored beyond the call since the contents will be changed.
      len - the length of content that was read.
    • closed

      void closed()
      Called when the closure of the input stream is detected.
    • ioException

      void ioException(IOException e)
      Called if there is an IOException while reading input stream.
      参数:
      e - the exception that was received
    • terminated

      void terminated()
      Called if the InputStreamEPoll instance was terminated while the input stream was still registered.