Package ru.bitel.bgbilling.kernel.event

# Class PoolEventPublisher<E extends ru.bitel.bgbilling.kernel.event.common.Event>

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.kernel.event.PoolEventPublisher<E>

All Implemented Interfaces:
  `AutoCloseable`, `Runnable`

Direct Known Subclasses:
  `PoolQueueEventPublisher`, `PoolTopicEventPublisher`

public abstract class PoolEventPublisher<E extends ru.bitel.bgbilling.kernel.event.common.Event> extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger implements Runnable, AutoCloseable

See Also:
  - `PoolEvent`
  - `EventProcessor.newPoolEventPublisher(Class, int)`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected MessageHandler`
  `messageHandler`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `int`
  `getModuleId()`
  `int`
  `getPluginId()`
  `void`
  `publish(E e)`
  `protected abstract void`
  `publish(EventProcessor eventProcessor, Class<E> clazz, List<E> list)`
  `void`
  `publishAfterCommit(E e)`
  Публикует событие при вызове commit текущего ThreadContext.
  `void`
  `publishAfterCommit(ru.bitel.common.worker.CommitableHandler context, E e)`
  Публикует событие при вызове commit у context
  `void`
  `run()`
  `void`
  `setMessageHandler(MessageHandler messageHandler)`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError, warn`

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

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

- ## Field Details

  - ### messageHandler

    protected MessageHandler messageHandler

- ## Method Details

  - ### setMessageHandler

    public void setMessageHandler(MessageHandler messageHandler)

  - ### publish

    public void publish(E e) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### run

    public void run()
    Specified by:
      `run` in interface `Runnable`

  - ### publish

    protected abstract void publish(EventProcessor eventProcessor, Class<E> clazz, List<E> list) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`

  - ### publishAfterCommit

    public void publishAfterCommit(ru.bitel.common.worker.CommitableHandler context, E e)
    Публикует событие при вызове commit у context
    Parameters:
      `context` -
      `e` -

  - ### publishAfterCommit

    public void publishAfterCommit(E e)
    Публикует событие при вызове commit текущего ThreadContext.
    Parameters:
      `e` -

  - ### getModuleId

    public int getModuleId()

  - ### getPluginId

    public int getPluginId()