Class BlinkSession<M>

java.lang.Object
com.kosdev.kos.commons.core.service.blink.BlinkSession<M>
Direct Known Subclasses:
BinaryMsgSession

public abstract class BlinkSession<M> extends Object
Session that sits on top of a connection and implements a particular protocol as well as the api used to interact with the protocol.
Since:
1
Version:
1
  • Constructor Details

    • BlinkSession

      public BlinkSession()
  • Method Details

    • getIdentity

      public <T> T getIdentity(Class<T> clazz) throws Exception
      Convert identity data to the specified type. Useful if the identity json payload contains additional data for a given interface.
      Parameters:
      clazz - the class to convert json data to
      Returns:
      instance of identity data
      Throws:
      Exception
      Since:
      1
    • getRemoteAddr

      public InetSocketAddress getRemoteAddr()
      Return the remote address of the connection.
      Since:
      1