Interface Broadcaster
-
- All Known Implementing Classes:
InMemoryBroadcaster
public interface BroadcasterA broadcast mechanism that is able to send and receive commands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBroadcaster.ListenerA listener for new messages.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(Broadcaster.Listener listener)Add a listener for new messages.voidclose()Close the broadcaster.voidremoveListener(Broadcaster.Listener listener)Remove a listener.voidsend(ByteBuffer buff)Send a message.voidsetBroadcastConfig(DynamicBroadcastConfig broadcastConfig)Change the dynamic broadcasting configuration.
-
-
-
Method Detail
-
setBroadcastConfig
void setBroadcastConfig(DynamicBroadcastConfig broadcastConfig)
Change the dynamic broadcasting configuration.- Parameters:
broadcastConfig- the new configuration
-
send
void send(ByteBuffer buff)
Send a message.- Parameters:
buff- the buffer
-
addListener
void addListener(Broadcaster.Listener listener)
Add a listener for new messages.- Parameters:
listener- the listener
-
removeListener
void removeListener(Broadcaster.Listener listener)
Remove a listener.- Parameters:
listener- the listener
-
close
void close()
Close the broadcaster.
-
-