Class NrpeClient

    • Constructor Detail

      • NrpeClient

        public NrpeClient()
    • Method Detail

      • close

        public void close()

        close

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Client<NrpeRequest,​NrpePacket>
        Specified by:
        close in interface java.io.Closeable
      • connect

        public void connect​(java.net.InetAddress address,
                            int port,
                            int timeout)
                     throws java.io.IOException,
                            java.lang.Exception

        connect

        Specified by:
        connect in interface Client<NrpeRequest,​NrpePacket>
        Parameters:
        address - a InetAddress object.
        port - a int.
        timeout - a int.
        Throws:
        java.io.IOException - if any.
        java.lang.Exception - if any.
      • getWrappedSocket

        protected java.net.Socket getWrappedSocket​(java.net.InetAddress address,
                                                   int port,
                                                   int timeout)
                                            throws java.io.IOException

        getWrappedSocket

        Parameters:
        address - a InetAddress object.
        port - a int.
        timeout - a int.
        Returns:
        a Socket object.
        Throws:
        java.io.IOException - if any.
      • wrapSocket

        public java.net.Socket wrapSocket​(java.net.Socket socket)
                                   throws java.io.IOException

        wrapSocket

        Specified by:
        wrapSocket in interface SocketWrapper
        Parameters:
        socket - a Socket object.
        hostAddress - a String object.
        port - a int.
        Returns:
        a Socket object.
        Throws:
        java.lang.Exception - if any.
        java.io.IOException
      • setPadding

        public void setPadding​(int padding)

        setPadding

        Parameters:
        padding - a int.
      • getPadding

        public int getPadding()

        getPadding

        Returns:
        a int.
      • setUseSsl

        public void setUseSsl​(boolean useSsl)

        setUseSsl

        Parameters:
        useSsl - a boolean.
      • isUseSsl

        public boolean isUseSsl()

        isUseSsl

        Returns:
        a boolean.
      • setOutput

        public void setOutput​(java.io.OutputStream out)

        setOutput

        Parameters:
        out - a OutputStream object.
      • getOutput

        public java.io.OutputStream getOutput()

        getOutput

        Returns:
        a OutputStream object.
      • setInput

        public void setInput​(java.io.InputStream in)

        setInput

        Parameters:
        in - a InputStream object.
      • getInput

        public java.io.InputStream getInput()

        getInput

        Returns:
        a InputStream object.