public class NetworkGuard extends Object implements INetworkGuard
INetworkGuard.| Modifier and Type | Class and Description |
|---|---|
class |
NetworkGuard.ClientHandler |
| Modifier and Type | Field and Description |
|---|---|
protected long |
bindDelay |
protected ScheduledExecutorService |
binderExecutor |
protected io.netty.channel.EventLoopGroup |
bossGroup |
protected List<io.netty.channel.Channel> |
channels |
protected CopyOnWriteArrayList<INetworkConnectionListener> |
listeners |
protected InetAddress[] |
localAddresses |
protected IMessageParser |
parser |
protected int |
port |
protected io.netty.channel.EventLoopGroup |
workerGroup |
| Constructor and Description |
|---|
NetworkGuard(InetAddress[] inetAddress,
int port,
IConcurrentFactory concurrentFactory,
IMessageParser parser,
IMetaData data) |
NetworkGuard(InetAddress inetAddress,
int port,
IConcurrentFactory concurrentFactory,
IMessageParser parser,
IMetaData data) |
NetworkGuard(InetAddress inetAddress,
int port,
IMessageParser parser)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(INetworkConnectionListener listener)
Append new listener
|
void |
destroy()
Release all attached resources (socket and etc)
|
void |
remListener(INetworkConnectionListener listener)
Remove listener
|
String |
toString() |
protected CopyOnWriteArrayList<INetworkConnectionListener> listeners
protected IMessageParser parser
protected int port
protected InetAddress[] localAddresses
protected long bindDelay
protected final io.netty.channel.EventLoopGroup bossGroup
protected final io.netty.channel.EventLoopGroup workerGroup
protected List<io.netty.channel.Channel> channels
protected final ScheduledExecutorService binderExecutor
@Deprecated public NetworkGuard(InetAddress inetAddress, int port, IMessageParser parser) throws Exception
Exceptionpublic NetworkGuard(InetAddress inetAddress, int port, IConcurrentFactory concurrentFactory, IMessageParser parser, IMetaData data) throws Exception
Exceptionpublic NetworkGuard(InetAddress[] inetAddress, int port, IConcurrentFactory concurrentFactory, IMessageParser parser, IMetaData data) throws Exception
Exceptionpublic void addListener(INetworkConnectionListener listener)
INetworkGuardaddListener in interface INetworkGuardlistener - listener instancepublic void remListener(INetworkConnectionListener listener)
INetworkGuardremListener in interface INetworkGuardlistener - listener instancepublic void destroy()
INetworkGuarddestroy in interface INetworkGuardCopyright © 2016. All Rights Reserved.