org.jdiameter.server.impl.io.tcp
Class NetworkGuard

java.lang.Object
  extended by org.jdiameter.server.impl.io.tcp.NetworkGuard
All Implemented Interfaces:
INetworkGuard

public class NetworkGuard
extends java.lang.Object
implements INetworkGuard

TCP implementation of INetworkGuard.

Author:
Alexandre Mendonca , Bartosz Baranowski

Field Summary
protected  long bindDelay
           
protected  IConcurrentFactory concurrentFactory
           
protected  boolean isWork
           
protected  java.util.concurrent.CopyOnWriteArrayList<INetworkConnectionListener> listeners
           
protected  IMessageParser parser
           
protected  int port
           
 
Constructor Summary
NetworkGuard(java.net.InetAddress[] inetAddress, int port, IConcurrentFactory concurrentFactory, IMessageParser parser, IMetaData data)
           
NetworkGuard(java.net.InetAddress inetAddress, int port, IConcurrentFactory concurrentFactory, IMessageParser parser, IMetaData data)
           
NetworkGuard(java.net.InetAddress inetAddress, int port, IMessageParser parser)
          Deprecated. 
 
Method Summary
 void addListener(INetworkConnectionListener listener)
          Append new listener
 void destroy()
          Release all attached resources (socket and etc)
 void remListener(INetworkConnectionListener listener)
          Remove listener
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parser

protected IMessageParser parser

concurrentFactory

protected IConcurrentFactory concurrentFactory

port

protected int port

bindDelay

protected long bindDelay

listeners

protected java.util.concurrent.CopyOnWriteArrayList<INetworkConnectionListener> listeners

isWork

protected boolean isWork
Constructor Detail

NetworkGuard

@Deprecated
public NetworkGuard(java.net.InetAddress inetAddress,
                               int port,
                               IMessageParser parser)
             throws java.lang.Exception
Deprecated. 

Throws:
java.lang.Exception

NetworkGuard

public NetworkGuard(java.net.InetAddress inetAddress,
                    int port,
                    IConcurrentFactory concurrentFactory,
                    IMessageParser parser,
                    IMetaData data)
             throws java.lang.Exception
Throws:
java.lang.Exception

NetworkGuard

public NetworkGuard(java.net.InetAddress[] inetAddress,
                    int port,
                    IConcurrentFactory concurrentFactory,
                    IMessageParser parser,
                    IMetaData data)
             throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

destroy

public void destroy()
Description copied from interface: INetworkGuard
Release all attached resources (socket and etc)

Specified by:
destroy in interface INetworkGuard


Copyright © 2014. All Rights Reserved.