Interface UpgradeHandler<T>

Type Parameters:
T -
All Known Implementing Classes:
WebSocketUpgradeHandler

public interface UpgradeHandler<T>
Invoked when an AsyncHandler.STATE.UPGRADE is returned. Currently the library only support WebSocket as type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    If the upgrade fail.
    void
    If the HTTP Upgrade succeed (response's status code equals 101), the AsyncHttpProvider will invoke that method
  • Method Details

    • onSuccess

      void onSuccess(T t)
      If the HTTP Upgrade succeed (response's status code equals 101), the AsyncHttpProvider will invoke that method
      Parameters:
      t - an Upgradable entity
    • onFailure

      void onFailure(Throwable t)
      If the upgrade fail.
      Parameters:
      t - a Throwable