Package 

Class AbstractTcpListener

  • All Implemented Interfaces:

    
    public abstract class AbstractTcpListener
    
                        

    An abstract class that binds on a set of sockets and accepts sessions that start with a STUN Binding Request (preceded by an optional fake SSL handshake). The handling of the accepted sessions (e.g. handling in ICE) is left to the implementations. This instance runs two threads: acceptThread and readThread. The 'accept' thread just accepts new Sockets and passes them over to the 'read' thread. The 'read' thread reads a STUN message from an accepted socket and, based on the STUN username, passes it to the appropriate session.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractTcpListener(int port) Initializes a new TcpHarvester, which is to listen on port number port on all IP addresses on all available interfaces.
      AbstractTcpListener(int port, List<NetworkInterface> interfaces) Initializes a new TcpHarvester, which is to listen on port number port on all the IP addresses on the specified NetworkInterfaces.
      AbstractTcpListener(List<TransportAddress> transportAddresses) Initializes a new TcpHarvester, which is to listen on the specified list of TransportAddresses.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void close() Triggers the termination of the threads of this MultiplexingTcpHarvester.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractTcpListener

        AbstractTcpListener(int port)
        Initializes a new TcpHarvester, which is to listen on port number port on all IP addresses on all available interfaces.
        Parameters:
        port - the port to listen on.
      • AbstractTcpListener

        AbstractTcpListener(int port, List<NetworkInterface> interfaces)
        Initializes a new TcpHarvester, which is to listen on port number port on all the IP addresses on the specified NetworkInterfaces.
        Parameters:
        port - the port to listen on.
        interfaces - the interfaces to listen on.
      • AbstractTcpListener

        AbstractTcpListener(List<TransportAddress> transportAddresses)
        Initializes a new TcpHarvester, which is to listen on the specified list of TransportAddresses.
        Parameters:
        transportAddresses - the transport addresses to listen on.
    • Method Detail

      • close

         void close()

        Triggers the termination of the threads of this MultiplexingTcpHarvester.