程序包 web_tools

接口 TransmissionListener<T extends Serializable>

类型参数:
T - The class type of the message you want to receive.

public interface TransmissionListener<T extends Serializable>
A listener that can be used to listen to the transmission of the proxy class TransmissionController. Use template to make the class more flexible, and easy to use.
版本:
beta1.1
  • 方法详细资料

    • onTransmissionStart

      void onTransmissionStart()
      If the message begin to send, this method will be called.
    • onTransmissionEnd

      void onTransmissionEnd()
      If the message has been sent successfully, the method will be called.
    • onTransmissionError

      void onTransmissionError(String message, TransmissionListener.ErrorType errorType)
      When an error happens in the proxy class TransmissionController, this method will be called.
      参数:
      message - The message from the proxy.
      errorType - ErrorType.
    • onTransmissionProgress

      void onTransmissionProgress(T messages)
      The most important method in the interface TransmissionListener. When the proxy class TransmissionController receives a message, this method will be called.
      参数:
      messages - The messages from the proxy. Should be serialised!
      另请参阅:
    • alertError

      @Deprecated void alertError(String error)
      已过时。
      A temp method similar to onTransmissionError.
      参数:
      error - A string that contains the error message.