Class NotificationListener
java.lang.Object
civitas.celestis.listener.notification.NotificationListener
- All Implemented Interfaces:
Listener
A listener which exclusively listens to
NotificationEvents,
and prints them to the specified print stream.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new notification listener.NotificationListener(PrintStream printStream) Creates a new notification listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidonNotification(NotificationEvent event) Prints the notification's message to the specified print stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface civitas.celestis.event.Listener
getHandlerReferences
-
Constructor Details
-
NotificationListener
public NotificationListener()Creates a new notification listener. The print stream is designated toSystem.outby default. -
NotificationListener
Creates a new notification listener.- Parameters:
printStream- The print stream to print messages to
-
-
Method Details
-
onNotification
Prints the notification's message to the specified print stream.- Parameters:
event- The event which was called
-