Interface MessagingConnectionUpCallback


public interface MessagingConnectionUpCallback
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the messaging connection allowing the server to send messages to the client is established - whether that's the result of an initial connect() or a re-establishment after it is severed.
  • Method Details

    • execute

      void execute()
      Called when the messaging connection allowing the server to send messages to the client is established - whether that's the result of an initial connect() or a re-establishment after it is severed. A new connection is stablished each time you subscribe() to a new channel, and it remains alive until you explicitly call unsubscribe(), disconnect(), or until it is automatically re-created. Connections are re-created every 2 minutes by default because intervening firewalls or web proxies will often sever connections that have been open too long, as will the browser itself. You can configure the time between the connection is re-created setting the messaging.connectionTTL property in server.properties