Package tigase.server.amp.db

## Class MsgBroadcastRepository<T,​S extends DataSource>

- java.lang.Object
- - tigase.server.amp.db.MsgBroadcastRepository<T,​S>

- All Implemented Interfaces:
    `DataSourceAware<S>`
  Direct Known Subclasses:
    `JDBCMsgBroadcastRepository`

      public abstract class MsgBroadcastRepository<T,​S extends DataSource>
      extends java.lang.Object
      implements DataSourceAware<S>

  Created by andrzej on 15.03.2016.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `MsgBroadcastRepository.BroadcastMsg<T>` |
    `static class` | `MsgBroadcastRepository.MsgBroadcastRepositoryBean` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.Map<java.lang.String,​MsgBroadcastRepository.BroadcastMsg>` | `broadcastMessages` |
    `protected long` | `broadcastMessagesLastCleanup` |
    `protected SimpleParser` | `parser` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `dumpBroadcastMessageKeys()` |
    `protected abstract void` | `ensureBroadcastMessageRecipient​(java.lang.String id, BareJID recipient)` |
    `java.util.Collection<MsgBroadcastRepository.BroadcastMsg>` | `getBroadcastMessages()` |
    `MsgBroadcastRepository.BroadcastMsg` | `getBroadcastMsg​(java.lang.String id)` |
    `protected abstract void` | `insertBroadcastMessage​(java.lang.String id, Element msg, java.util.Date expire, BareJID recipient)` |
    `abstract void` | `loadMessagesToBroadcast()` |
    `boolean` | `updateBroadcastMessage​(java.lang.String id, Element msg, java.util.Date expire, BareJID recipient)` |

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

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

    - ### Methods inherited from interface tigase.db.DataSourceAware

      `setDataSource`

- - ### Field Detail

    - #### broadcastMessages

          protected java.util.Map<java.lang.String,​MsgBroadcastRepository.BroadcastMsg> broadcastMessages

    - #### broadcastMessagesLastCleanup

          protected long broadcastMessagesLastCleanup

    - #### parser

          protected SimpleParser parser

  - ### Constructor Detail

    - #### MsgBroadcastRepository

          public MsgBroadcastRepository()

  - ### Method Detail

    - #### loadMessagesToBroadcast

          public abstract void loadMessagesToBroadcast()

    - #### getBroadcastMsg

          public MsgBroadcastRepository.BroadcastMsg getBroadcastMsg​(java.lang.String id)

    - #### dumpBroadcastMessageKeys

          public java.lang.String dumpBroadcastMessageKeys()

    - #### getBroadcastMessages

          public java.util.Collection<MsgBroadcastRepository.BroadcastMsg> getBroadcastMessages()

    - #### updateBroadcastMessage

          public boolean updateBroadcastMessage​(java.lang.String id,
                                                Element msg,
                                                java.util.Date expire,
                                                BareJID recipient)

    - #### ensureBroadcastMessageRecipient

          protected abstract void ensureBroadcastMessageRecipient​(java.lang.String id,
                                                                  BareJID recipient)

    - #### insertBroadcastMessage

          protected abstract void insertBroadcastMessage​(java.lang.String id,
                                                         Element msg,
                                                         java.util.Date expire,
                                                         BareJID recipient)