Package com.mongodb.event
Class CommandEventMulticaster
- java.lang.Object
-
- com.mongodb.event.CommandEventMulticaster
-
- All Implemented Interfaces:
CommandListener
Deprecated.register multiple command listeners instead
@Immutable @Deprecated public final class CommandEventMulticaster extends Object implements CommandListener
A multicaster for command events. Any exception thrown by one of the listeners will be caught and not re-thrown, but may be logged.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description CommandEventMulticaster(List<CommandListener> commandListeners)Deprecated.Construct an instance with the given list of command listeners
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcommandFailed(CommandFailedEvent event)Deprecated.Listener for command failure eventsvoidcommandStarted(CommandStartedEvent event)Deprecated.Listener for command started events.voidcommandSucceeded(CommandSucceededEvent event)Deprecated.Listener for command completed eventsList<CommandListener>getCommandListeners()Deprecated.Gets the command listeners.
-
-
-
Constructor Detail
-
CommandEventMulticaster
public CommandEventMulticaster(List<CommandListener> commandListeners)
Deprecated.Construct an instance with the given list of command listeners- Parameters:
commandListeners- the non-null list of command listeners, none of which may be null
-
-
Method Detail
-
getCommandListeners
public List<CommandListener> getCommandListeners()
Deprecated.Gets the command listeners.- Returns:
- the unmodifiable set of command listeners
-
commandStarted
public void commandStarted(CommandStartedEvent event)
Deprecated.Description copied from interface:CommandListenerListener for command started events.- Specified by:
commandStartedin interfaceCommandListener- Parameters:
event- the event
-
commandSucceeded
public void commandSucceeded(CommandSucceededEvent event)
Deprecated.Description copied from interface:CommandListenerListener for command completed events- Specified by:
commandSucceededin interfaceCommandListener- Parameters:
event- the event
-
commandFailed
public void commandFailed(CommandFailedEvent event)
Deprecated.Description copied from interface:CommandListenerListener for command failure events- Specified by:
commandFailedin interfaceCommandListener- Parameters:
event- the event
-
-