Class ZooKeeperUpdatingListener

  • All Implemented Interfaces:
    com.linecorp.armeria.server.ServerListener

    public class ZooKeeperUpdatingListener
    extends com.linecorp.armeria.server.ServerListenerAdapter
    A ZooKeeper Server Listener. When you add this listener, server will be automatically registered into the ZooKeeper.
    • Constructor Detail

      • ZooKeeperUpdatingListener

        @Deprecated
        public ZooKeeperUpdatingListener​(String zkConnectionStr,
                                         String zNodePath,
                                         int sessionTimeout,
                                         @Nullable
                                         com.linecorp.armeria.client.Endpoint endpoint)
        A ZooKeeper server listener, which registers server into ZooKeeper.
        Parameters:
        zkConnectionStr - ZooKeeper connection string
        zNodePath - ZooKeeper node path(under which this server will be registered)
        sessionTimeout - session timeout
        endpoint - the endpoint of the server being registered
      • ZooKeeperUpdatingListener

        @Deprecated
        public ZooKeeperUpdatingListener​(String zkConnectionStr,
                                         String zNodePath,
                                         int sessionTimeout)
        A ZooKeeper server listener, which registers server into ZooKeeper.
        Parameters:
        zkConnectionStr - ZooKeeper connection string
        zNodePath - ZooKeeper node path(under which this server will be registered)
        sessionTimeout - session timeout
    • Method Detail

      • serverStarted

        public void serverStarted​(com.linecorp.armeria.server.Server server)
                           throws Exception
        Specified by:
        serverStarted in interface com.linecorp.armeria.server.ServerListener
        Overrides:
        serverStarted in class com.linecorp.armeria.server.ServerListenerAdapter
        Throws:
        Exception
      • serverStopping

        public void serverStopping​(com.linecorp.armeria.server.Server server)
        Specified by:
        serverStopping in interface com.linecorp.armeria.server.ServerListener
        Overrides:
        serverStopping in class com.linecorp.armeria.server.ServerListenerAdapter