Package tigase.component.modules

# Class AbstractModule

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

All Implemented Interfaces:
  `Module`

Direct Known Subclasses:
  `AbstractEventBusModule`, `AdHocCommandModule`, `DiscoveryModule`, `JabberVersionModule`, `RTBLEventModule`, `RTBLIqModule`, `TestGeneratorModule`, `TestSpamModule`, `XmppPingModule`

public abstract class AbstractModule extends 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 final Logger`
  `log`
  `protected PacketWriter`
  `writer`

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

  `EMPTY_FEATURES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractModule()`

- ## Method Summary

  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 Details

  - ### log

    protected final Logger log

  - ### eventBus

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

  - ### writer

    @Inject protected PacketWriter writer

- ## Constructor Details

  - ### AbstractModule

    public AbstractModule()

- ## Method Details

  - ### 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)