Package xyz.cofe.trambda.tcp
Class Publisher<T extends Serializable>
- java.lang.Object
-
- xyz.cofe.trambda.tcp.Publisher<T>
-
public class Publisher<T extends Serializable> extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePublisher.Subscriber<T>
-
Constructor Summary
Constructors Constructor Description Publisher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoCloseablelisten(Publisher.Subscriber<T> subscriber)voidpublish(T msg)voidremoveListener(Publisher.Subscriber<T> subscriber)
-
-
-
Method Detail
-
publish
public void publish(T msg)
-
listen
public AutoCloseable listen(Publisher.Subscriber<T> subscriber)
-
removeListener
public void removeListener(Publisher.Subscriber<T> subscriber)
-
-