tigase.disteventbus

## Class LocalEventBus

- java.lang.Object
- - tigase.disteventbus.LocalEventBus

- All Implemented Interfaces:
    EventBus

      public class LocalEventBus
      extends Object
      implements EventBus

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LocalEventBus.EventName`
    `static interface` | `LocalEventBus.LocalEventBusListener`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Logger` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalEventBus()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHandler(String name, String xmlns, EventHandler handler)` Registers handler to receive events with given name and namespace.
    `void` | `addListener(LocalEventBus.LocalEventBusListener listener)`
    `protected List<EventHandler>` | `createHandlersList()`
    `protected Map<String,Map<String,List<EventHandler>>>` | `createMainHandlersMap()`
    `protected Map<String,List<EventHandler>>` | `createNamesHandlerMap()`
    `void` | `doFire(String name, String xmlns, tigase.xml.Element event)`
    `void` | `doFire(String name, String xmlns, tigase.xml.Element event, ArrayList<EventHandler> handlersList)`
    `void` | `fire(tigase.xml.Element event)`
    `Set<LocalEventBus.EventName>` | `getAllListenedEvents()`
    `protected Collection<EventHandler>` | `getHandlersList(String name, String xmlns)`
    `void` | `removeHandler(String name, String xmlns, EventHandler handler)`
    `void` | `removeListener(LocalEventBus.LocalEventBusListener listener)`

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

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

- - ### Field Detail

    - #### log

          protected final Logger log

  - ### Constructor Detail

    - #### LocalEventBus

          public LocalEventBus()

  - ### Method Detail

    - #### addHandler

          public void addHandler(String name,
                        String xmlns,
                        EventHandler handler)

      Description copied from interface: `EventBus`
      Registers handler to receive events with given name and namespace.
      Specified by:
        `addHandler` in interface `EventBus`
      Parameters:
        `name` - name of events. Can be `null`, then handler will be received all events with given `xmlns`.
        `xmlns` - namespace of events.
        `handler` - event handler.

    - #### addListener

          public void addListener(LocalEventBus.LocalEventBusListener listener)

    - #### createHandlersList

          protected List<EventHandler> createHandlersList()

    - #### createMainHandlersMap

          protected Map<String,Map<String,List<EventHandler>>> createMainHandlersMap()

    - #### createNamesHandlerMap

          protected Map<String,List<EventHandler>> createNamesHandlerMap()

    - #### doFire

          public void doFire(String name,
                    String xmlns,
                    tigase.xml.Element event)

    - #### doFire

          public void doFire(String name,
                    String xmlns,
                    tigase.xml.Element event,
                    ArrayList<EventHandler> handlersList)

    - #### fire

          public void fire(tigase.xml.Element event)

      Specified by:
        `fire` in interface `EventBus`

    - #### getAllListenedEvents

          public Set<LocalEventBus.EventName> getAllListenedEvents()

    - #### getHandlersList

          protected Collection<EventHandler> getHandlersList(String name,
                                                 String xmlns)

    - #### removeHandler

          public void removeHandler(String name,
                           String xmlns,
                           EventHandler handler)

      Specified by:
        `removeHandler` in interface `EventBus`

    - #### removeListener

          public void removeListener(LocalEventBus.LocalEventBusListener listener)

Copyright © 2015 "Tigase, Inc.". All rights reserved.