Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.rsdn.patterns.behavioral.observer
Class MultiPublisher

    java.lang.Object
      ru.rsdn.patterns.behavioral.observer.MultiPublisher

Direct Known Subclasses:
  ConcreteMultiPublisherTest

    public abstract class MultiPublisher

extends java.lang.Object

Множественный издатель

Field Summary
`private java.util.Map<java.lang.Class,java.util.Collection<java.lang.ref.WeakReference<java.lang.Object>>>` | `subscribers`

Constructor Summary
`MultiPublisher()`

Method Summary
`protected
`<S> java.util.Collection<S>`
` | `getSubscribers(java.lang.Class<? super S> _class)`
`protected
`<S> void`
` | `subscribe(java.lang.Class<? super S> _class, S subscriber)` Подписаться
`protected
`<S> void`
` | `unsubscribe(java.lang.Class<? super S> _class, S subscriber)` Отписаться

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### subscribers

    private final java.util.Map<java.lang.Class,java.util.Collection<java.lang.ref.WeakReference<java.lang.Object>>> subscribers

Constructor Detail

### MultiPublisher

    public MultiPublisher()

Method Detail

### subscribe

    protected <S> void subscribe(java.lang.Class<? super S> _class,
                                 S subscriber)

  Подписаться

  Type Parameters:
    `S` - тип подписчика
  Parameters:
    `_class` - интерфейс подписки
    `subscriber` - подписчик

### unsubscribe

    protected <S> void unsubscribe(java.lang.Class<? super S> _class,
                                   S subscriber)

  Отписаться

  Type Parameters:
    `S` - тип подписчика
  Parameters:
    `_class` - интерфейс подписки
    `subscriber` - подписчик

### getSubscribers

    protected <S> java.util.Collection<S> getSubscribers(java.lang.Class<? super S> _class)

  Type Parameters:
    `S` - тип подписчиков
  Parameters:
    `_class` - интерфейс подписки
  Returns:
    подписчики

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD