Package tigase.component.modules

## Class AbstractModule

- java.lang.Object
- - tigase.component.modules.AbstractModule

- All Implemented Interfaces:
    `Module`
  Direct Known Subclasses:
    `AbstractEventBusModule`, `AdHocCommandModule`, `DiscoveryModule`, `JabberVersionModule`, `TestGeneratorModule`, `TestSpamModule`, `XmppPingModule`

      public abstract class AbstractModule
      extends java.lang.Object
      implements Module

  Abstract class for help building a module. It has implemented few default methods from `Module`, `ContextAware` and `InitializingModule`.
  Author:
    bmalkow

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected EventBus` | `eventBus` |
    `protected java.util.logging.Logger` | `log` |
    `protected PacketWriter` | `writer` |

    - ### Fields inherited from interface tigase.component.modules.Module

      `EMPTY_FEATURES`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractModule()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `fireEvent​(Element event)` | Fires event.
    `EventBus` | `getEventBus()` |
    `PacketWriter` | `getWriter()` |
    `void` | `setEventBus​(EventBus eventBus)` |
    `void` | `setWriter​(PacketWriter writer)` |
    `protected void` | `write​(Packet packet)` |
    `protected void` | `write​(Packet packet, AsyncCallback asyncCallback)` |

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

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

    - ### Methods inherited from interface tigase.component.modules.Module

      `canHandle, getFeatures, getModuleCriteria, process`

- - ### Field Detail

    - #### log

          protected final java.util.logging.Logger log

    - #### eventBus

          @Inject(bean="eventBus")
          protected EventBus eventBus

    - #### writer

          @Inject
          protected PacketWriter writer

  - ### Constructor Detail

    - #### AbstractModule

          public AbstractModule()

  - ### Method Detail

    - #### getEventBus

          public EventBus getEventBus()

    - #### setEventBus

          public void setEventBus​(EventBus eventBus)

    - #### getWriter

          public PacketWriter getWriter()

    - #### setWriter

          public void setWriter​(PacketWriter writer)

    - #### fireEvent

          protected void fireEvent​(Element event)

      Fires event.
      Parameters:
        `event` - event to fire.

    - #### write

          protected void write​(Packet packet)

    - #### write

          protected void write​(Packet packet,
                               AsyncCallback asyncCallback)