Interface Receiver

    • Method Detail

      • setDefaultHandler

        void setDefaultHandler​(EventHandler<?> defaultHandler)
        Sets the default EventHandler, used when no other handler is registered for a certain event type
        Parameters:
        defaultHandler - the default EventHandler to use
      • configure

        Receiver configure​(Serializer eventDeserializer)
        Configures the receiver
        Parameters:
        eventDeserializer - the Serializer for this receiver
        Returns:
        the configured receiver
      • createSender

        Sender createSender()
        Creates and returns a Sender capable of sending Events that can be received by this type of receiver.
        Returns:
        the Sender
      • runWith

        void runWith​(ExecutorService executorService)
        Since a receiver runs as a thread, the given ExecutorService should be used to run this thread.
        Parameters:
        executorService - the ExecutorService to run this receiver with