+ /**
+ * Ignore the outbound signal type from the specified source.
+ * One can ignore all signals by passing TmfSignal.class as the signal class.
+ *
+ * @param source
+ * The source object
+ * @param signal
+ * The signal class to ignore
+ * @since 2.2
+ */
+ @NonNullByDefault
+ public static synchronized void addIgnoredOutboundSignal(Object source, Class<? extends TmfSignal> signal) {
+ fOutboundSignalBlacklist.put(source, signal);
+ }
+
+ /**
+ * Ignore the inbound signal type for the specified listener.
+ * All signals can be ignored by passing TmfSignal.class.
+ *
+ * @param listener
+ * The listener object for which the signal must be ignored
+ * @param signal
+ * The signal class to ignore
+ * @since 2.2
+ */
+ @NonNullByDefault
+ public static synchronized void addIgnoredInboundSignal(Object listener, Class<? extends TmfSignal> signal) {
+ fInboundSignalBlacklist.put(listener, signal);
+ }
+
+ /**
+ * Remove the signal from the list of ignored outbound signal for the
+ * specified source if present.
+ *
+ * @param source
+ * The source object
+ * @param signal
+ * The signal class to remove from the ignore list
+ * @since 2.2
+ */
+ public static synchronized void removeIgnoredOutboundSignal(Object source, Class<? extends TmfSignal> signal) {
+ fOutboundSignalBlacklist.remove(source, signal);
+ }
+
+ /**
+ * Remove the signal from the list of inbound ignored signals for the
+ * specified listener if present.
+ *
+ * @param listener
+ * The listener object
+ * @param signal
+ * The signal class to remove from the ignore list
+ * @since 2.2
+ */
+ public static synchronized void removeIgnoredInboundSignal(Object listener, Class<? extends TmfSignal> signal) {
+ fInboundSignalBlacklist.remove(listener, signal);
+ }
+
+
+ /**
+ * Clear the list of ignored outbound signals for the source.
+ *
+ * @param source
+ * The source object
+ * @since 2.2
+ */
+ public static synchronized void clearIgnoredOutboundSignalList(Object source) {
+ fOutboundSignalBlacklist.removeAll(source);
+ }
+
+ /**
+ * Clear the list of ignored inbound signals for the listener.
+ *
+ * @param listener
+ * The listener object
+ * @since 2.2
+ */
+ public static synchronized void clearIgnoredInboundSignalList(Object listener) {
+ fInboundSignalBlacklist.removeAll(listener);
+ }
+