Package org.kiwiproject.curator.listener
Class CuratorListeners
- java.lang.Object
-
- org.kiwiproject.curator.listener.CuratorListeners
-
public class CuratorListeners extends Object
Utilities related to Curator listener classes.
-
-
Constructor Summary
Constructors Constructor Description CuratorListeners()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddLoggingConnectionStateListener(org.apache.curator.framework.CuratorFramework client, String myName)Add aConnectionStateListenerto the given client that logs state changes at INFO level.static voidaddLoggingCuratorListener(org.apache.curator.framework.CuratorFramework client, String myName)Add aCuratorListenerto the given client that logs receipt of Curator events at INFO level.static voidaddLoggingUnhandledErrorListener(org.apache.curator.framework.CuratorFramework client, String myName)Add anUnhandledErrorListenerto the given client that logs unhandled errors at WARN level.static StringdescriptionOf(org.apache.curator.framework.api.CuratorEvent event)Provide a human-readable description of a Curator event.
-
-
-
Method Detail
-
addLoggingCuratorListener
public static void addLoggingCuratorListener(org.apache.curator.framework.CuratorFramework client, String myName)Add aCuratorListenerto the given client that logs receipt of Curator events at INFO level.- Parameters:
client- the Curator clientmyName- the name for the logging listener, used in log messages- See Also:
CuratorListener,CuratorEvent
-
addLoggingConnectionStateListener
public static void addLoggingConnectionStateListener(org.apache.curator.framework.CuratorFramework client, String myName)Add aConnectionStateListenerto the given client that logs state changes at INFO level.- Parameters:
client- the Curator clientmyName- the name for the logging listener, used in log messages- See Also:
ConnectionStateListener
-
addLoggingUnhandledErrorListener
public static void addLoggingUnhandledErrorListener(org.apache.curator.framework.CuratorFramework client, String myName)Add anUnhandledErrorListenerto the given client that logs unhandled errors at WARN level.- Parameters:
client- the Curator clientmyName- the name for the logging listener, used in log messages- See Also:
UnhandledErrorListener
-
descriptionOf
public static String descriptionOf(org.apache.curator.framework.api.CuratorEvent event)
Provide a human-readable description of a Curator event.- Parameters:
event- the Curator event to describe- Returns:
- event description
-
-