org.jdiameter.server.impl.io.tcp
Class NetWorkGuard
java.lang.Object
org.jdiameter.server.impl.io.tcp.NetWorkGuard
- All Implemented Interfaces:
- java.lang.Runnable, INetWorkGuard
public class NetWorkGuard
- extends java.lang.Object
- implements INetWorkGuard, java.lang.Runnable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
protected IMessageParser parser
port
protected int port
logger
protected java.util.logging.Logger logger
listeners
protected java.util.concurrent.CopyOnWriteArrayList<INetWorkConnectionListener> listeners
isWork
protected boolean isWork
selector
protected java.nio.channels.Selector selector
serverSocket
protected java.net.ServerSocket serverSocket
NetWorkGuard
public NetWorkGuard(java.net.InetAddress inetAddress,
int port,
IMessageParser parser)
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public void run()
- Specified by:
run in interface java.lang.Runnable
addListener
public void addListener(INetWorkConnectionListener listener)
- Description copied from interface:
INetWorkGuard
- Append new listener
- Specified by:
addListener in interface INetWorkGuard
- Parameters:
listener - listener instance
remListener
public void remListener(INetWorkConnectionListener listener)
- Description copied from interface:
INetWorkGuard
- Remove listener
- Specified by:
remListener in interface INetWorkGuard
- Parameters:
listener - listener instance
destroy
public void destroy()
- Description copied from interface:
INetWorkGuard
- Release all attached resources (socket and etc)
- Specified by:
destroy in interface INetWorkGuard
Copyright © 2008. All Rights Reserved.