com.h3c.util.event

## Class DefaultEventSinkBroker

- java.lang.Object
- - com.h3c.util.event.DefaultEventSinkBroker

- All Implemented Interfaces:
    EventSinkBroker

      public class DefaultEventSinkBroker
      extends Object
      implements EventSinkBroker

  Base implementation of `EventSinkBroker`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEventSinkBroker()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSink(Class<? extends Event> eventClass, EventSink sink)` Adds a new event sink associated with the specified event class.
    `EventSink` | `get(Class<? extends Event> eventClass)` Get the event sink associated with the given event class.
    `void` | `removeSink(Class<? extends Event> eventClass)` Removes a previously added event sink.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEventSinkBroker

          public DefaultEventSinkBroker()

  - ### Method Detail

    - #### addSink

          public void addSink(Class<? extends Event> eventClass,
                     EventSink sink)

      Description copied from interface: `EventSinkBroker`
      Adds a new event sink associated with the specified event class.
      Specified by:
        `addSink` in interface `EventSinkBroker`
      Parameters:
        `eventClass` - class of events handled by the sink
        `sink` - event sink

    - #### removeSink

          public void removeSink(Class<? extends Event> eventClass)

      Description copied from interface: `EventSinkBroker`
      Removes a previously added event sink.
      Specified by:
        `removeSink` in interface `EventSinkBroker`
      Parameters:
        `eventClass` - class of events handled by the sink

    - #### get

          public EventSink get(Class<? extends Event> eventClass)

      Description copied from interface: `EventSinkBroker`
      Get the event sink associated with the given event class.
      Specified by:
        `get` in interface `EventSinkBroker`
      Parameters:
        `eventClass` - class of events
      Returns:
        event sink; null if no sink has been registered for the class

Copyright © 2014. All Rights Reserved.