public interface NetworkManager
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the manager.
|
io.netty.channel.ChannelFuture |
bindDatagramChannel(String address,
int port,
io.netty.channel.ChannelHandler handler)
Binds a channel to the default address and a random port.
|
void |
deactivate()
Deactivates the manager.
|
boolean |
isActive()
Gets whether the manager is active.
|
io.netty.channel.ChannelFuture bindDatagramChannel(String address, int port, io.netty.channel.ChannelHandler handler) throws IllegalStateException
handler - The channel handler.IllegalStateException - If the manager is inactive.void activate()
throws IllegalStateException
Once activated, the manager will allocate an internal scheduler to handle IO operations and will be able to provide channels.
IllegalStateException - If the manager was already activatedvoid deactivate()
throws IllegalStateException
The internal scheduler will elegantly shutdown any active channel and the manager won't be able to provide channels.
IllegalStateException - If the manager is inactive.boolean isActive()
true if the manager is active; false otherwise.Copyright © 2017 TeleStax, Inc.. All Rights Reserved.