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 NewSessionHandler
public Collection<JetlangFiberSession> getAllSessions()
public void publishToAllSubscribedClients(String topic, Object msg)
publishToAllSubscribedClients
in interface ClientPublisher
Copyright © 2016. All Rights Reserved.