Package 

Class TurnDatagramPacketFilter

  • All Implemented Interfaces:
    org.ice4j.socket.DatagramPacketFilter

    
    public class TurnDatagramPacketFilter
    extends StunDatagramPacketFilter
                        

    Implements a DatagramPacketFilter which accepts DatagramPackets which represent TURN messages defined in RFC 5766 "Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)" and which are part of the communication with a specific TURN server. TurnDatagramPacketFilter does not accept TURN ChannelData messages because they require knowledge of the value of the "Channel Number" field.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      TurnDatagramPacketFilter(TransportAddress turnServer) Initializes a new TurnDatagramPacketFilter which will accept DatagramPackets which represent TURN messages and which are part of the communication with a specific TURN server.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean accept(DatagramPacket p) Determines whether a specific DatagramPacket represents a TURN message which is part of the communication with the TURN server associated with this instance.
      • Methods inherited from class org.ice4j.socket.StunDatagramPacketFilter

        equals, hashCode, isStunPacket
      • Methods inherited from class java.lang.Object

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

      • TurnDatagramPacketFilter

        TurnDatagramPacketFilter(TransportAddress turnServer)
        Initializes a new TurnDatagramPacketFilter which will accept DatagramPackets which represent TURN messages and which are part of the communication with a specific TURN server.
        Parameters:
        turnServer - the TransportAddress of the TURN server DatagramPackets representing TURN messages from and to which will be accepted by the new instance
    • Method Detail

      • accept

         boolean accept(DatagramPacket p)

        Determines whether a specific DatagramPacket represents a TURN message which is part of the communication with the TURN server associated with this instance.

        Parameters:
        p - the DatagramPacket to be checked whether it represents a TURN message which is part of the communicator with the TURN server associated with this instance