public class DefaultThreadContextListenerChain extends Object implements ThreadContextListenerChain
Constructor and Description |
---|
DefaultThreadContextListenerChain() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ThreadContextListener listener)
Adds a
ThreadContextListener . |
static List<ThreadContextListener> |
getDefaultListeners()
Returns all registered default listeners by priority.
|
List<ThreadContextListener> |
getListenersOrderedByPriority()
Returns all listeners (including default listeners) by priority.
|
static void |
registerDefaultListener(ThreadContextListener listener)
Registers a default
ThreadContextListener . |
void |
removeDefaultListeners()
Removes the default listeners from this chain.
|
void |
removeListener(int listenerPriority)
Removes a
ThreadContextListener by its priority. |
static void |
unregisterDefaultListener(int listenerPriority)
Unregisters a default
ThreadContextListener by its priority. |
public static void registerDefaultListener(@Nonnull ThreadContextListener listener)
ThreadContextListener
.listener
- The default listener to be added.public static void unregisterDefaultListener(int listenerPriority)
ThreadContextListener
by its priority.listenerPriority
- The priority of the listener to be removed.public static List<ThreadContextListener> getDefaultListeners()
public void addListener(@Nonnull ThreadContextListener listener)
ThreadContextListener
.addListener
in interface ThreadContextListenerChain
listener
- The default listener to be added.public void removeListener(int listenerPriority)
ThreadContextListener
by its priority.removeListener
in interface ThreadContextListenerChain
listenerPriority
- The priority of the listeners to be removed.public void removeDefaultListeners()
@Nonnull public List<ThreadContextListener> getListenersOrderedByPriority()
getListenersOrderedByPriority
in interface ThreadContextListenerChain
Copyright © 2019 SAP SE. All rights reserved.