public class FiberForAllSessions extends Object implements NewSessionHandler, ClientPublisher
| Constructor and Description |
|---|
FiberForAllSessions(NewFiberSessionHandler fact,
org.jetlang.fibers.Fiber fiber,
BufferedSerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
Collection<JetlangFiberSession> |
getAllSessions() |
void |
onNewSession(ClientPublisher unused,
JetlangSession jetlangSession) |
void |
publishToAllSubscribedClients(String topic,
Object msg)
Should be invoked from the single fiber that maintains the sessions.
|
public FiberForAllSessions(NewFiberSessionHandler fact, org.jetlang.fibers.Fiber fiber, BufferedSerializer serializer)
public void onNewSession(ClientPublisher unused, JetlangSession jetlangSession)
onNewSession in interface NewSessionHandlerpublic Collection<JetlangFiberSession> getAllSessions()
public void publishToAllSubscribedClients(String topic, Object msg)
publishToAllSubscribedClients in interface ClientPublisherCopyright © 2016. All Rights Reserved.