Class DatagramSocketFactory.PrDatagramSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    DatagramSocketFactory

    class DatagramSocketFactory.PrDatagramSocket
    extends java.net.DatagramSocket
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.net.DatagramSocket socket  
    • Constructor Summary

      Constructors 
      Constructor Description
      PrDatagramSocket​(java.net.DatagramSocket socket)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void connect​(java.net.InetAddress address, int port)  
      void disconnect()  
      java.net.InetAddress getInetAddress()  
      java.net.InetAddress getLocalAddress()  
      int getLocalPort()  
      int getPort()  
      int getReceiveBufferSize()  
      int getSendBufferSize()  
      int getSoTimeout()  
      void receive​(java.net.DatagramPacket p)  
      void send​(java.net.DatagramPacket p)  
      void setReceiveBufferSize​(int size)  
      void setSendBufferSize​(int size)  
      void setSoTimeout​(int timeout)  
      • Methods inherited from class java.net.DatagramSocket

        bind, connect, getBroadcast, getChannel, getLocalSocketAddress, getOption, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, setBroadcast, setDatagramSocketImplFactory, setOption, setReuseAddress, setTrafficClass, supportedOptions
      • Methods inherited from class java.lang.Object

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

      • socket

        private java.net.DatagramSocket socket
    • Constructor Detail

      • PrDatagramSocket

        public PrDatagramSocket​(java.net.DatagramSocket socket)
                         throws java.net.SocketException
        Throws:
        java.net.SocketException
    • Method Detail

      • connect

        public void connect​(java.net.InetAddress address,
                            int port)
        Overrides:
        connect in class java.net.DatagramSocket
      • disconnect

        public void disconnect()
        Overrides:
        disconnect in class java.net.DatagramSocket
      • getInetAddress

        public java.net.InetAddress getInetAddress()
        Overrides:
        getInetAddress in class java.net.DatagramSocket
      • getPort

        public int getPort()
        Overrides:
        getPort in class java.net.DatagramSocket
      • send

        public void send​(java.net.DatagramPacket p)
                  throws java.io.IOException
        Overrides:
        send in class java.net.DatagramSocket
        Throws:
        java.io.IOException
      • receive

        public void receive​(java.net.DatagramPacket p)
                     throws java.io.IOException
        Overrides:
        receive in class java.net.DatagramSocket
        Throws:
        java.io.IOException
      • getLocalAddress

        public java.net.InetAddress getLocalAddress()
        Overrides:
        getLocalAddress in class java.net.DatagramSocket
      • getLocalPort

        public int getLocalPort()
        Overrides:
        getLocalPort in class java.net.DatagramSocket
      • setSoTimeout

        public void setSoTimeout​(int timeout)
                          throws java.net.SocketException
        Overrides:
        setSoTimeout in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • getSoTimeout

        public int getSoTimeout()
                         throws java.net.SocketException
        Overrides:
        getSoTimeout in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • setSendBufferSize

        public void setSendBufferSize​(int size)
                               throws java.net.SocketException
        Overrides:
        setSendBufferSize in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • getSendBufferSize

        public int getSendBufferSize()
                              throws java.net.SocketException
        Overrides:
        getSendBufferSize in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • setReceiveBufferSize

        public void setReceiveBufferSize​(int size)
                                  throws java.net.SocketException
        Overrides:
        setReceiveBufferSize in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • getReceiveBufferSize

        public int getReceiveBufferSize()
                                 throws java.net.SocketException
        Overrides:
        getReceiveBufferSize in class java.net.DatagramSocket
        Throws:
        java.net.SocketException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.net.DatagramSocket