com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class CompositeNotificationReceiver

  • All Implemented Interfaces:
    INotificationReceiver


    public class CompositeNotificationReceiver
    extends Object
    implements INotificationReceiver

    Provides the functionality to combine notification receivers.

    This code shows how to create CompositeNotificationReceiver and send a message:

     // Create a receiver which prints notifications in UI
     INotificationReceiver receiver1 = new UINotificationReceiver1();
     // Create a receiver which writes notifications in the log file
     INotificationReceiver receiver2 = new LoggerNotificationReceiver2();
     // Create a notification message
     NotificationMessage message = NotificationMessage.createInformationMessage("test");
     // Create a composite receiver
     INotificationReceiver compositeReceiver = new CompositeNotificationReceiver(receiver1, receiver2);
     // Send a message to the receiver
     compositeReceiver.processMessage(message); // message sends to receiver1 AND receiver2
      
    • Constructor Detail

      • CompositeNotificationReceiver

        public CompositeNotificationReceiver(INotificationReceiver... receivers)

        Initializes a new instance of the CompositeNotificationReceiver class.

        Parameters:
        receivers - A collection of notification receivers to combine.