Class LivelinessToken

  • All Implemented Interfaces:
    io.zenoh.session.SessionDeclaration , java.lang.AutoCloseable

    
    public final class LivelinessToken
     implements SessionDeclaration, AutoCloseable
                        

    A token whose liveliness is tied to the Zenoh io.zenoh.Session.

    A declared liveliness token will be seen as alive by any other Zenoh application in the system that monitors it while the liveliness token is not undeclared or dropped, while the Zenoh application that declared it is alive (didn't stop or crashed) and while the Zenoh application that declared the token has Zenoh connectivity with the Zenoh application that monitors it.

    Liveliness tokens are automatically undeclared when dropped.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit undeclare() Undeclares the token.
      Unit close() Closes the token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • close

         Unit close()

        Closes the token. This function is equivalent to undeclare. When using try-with-resources, this function is called automatically.