Class ErrorDelegateMulticaster

  • All Implemented Interfaces:
    ErrorDelegate

    public class ErrorDelegateMulticaster
    extends java.lang.Object
    implements ErrorDelegate
    ErrorDelegate that multicasts errors to a set of registered ErrorDelegates. This class takes care of distributing an error to a set of ErrorDelegates so it can be registered as a single instance and registeree classes do not have to take care of distributing to a set of observers themselves.
    • Field Detail

      • delegates

        private final java.util.List<ErrorDelegate> delegates
    • Constructor Detail

      • ErrorDelegateMulticaster

        public ErrorDelegateMulticaster​(ErrorDelegate... errorDelegates)
    • Method Detail

      • registerDelegate

        public void registerDelegate​(ErrorDelegate errorDelegate)
        Adds an ErrorDelegate as registered delegate.
        Parameters:
        errorDelegate - Another ErrorDelegate that will be notified in case of error.