Class SocketChannelFrameHandler

    • Method Detail

      • setTimeout

        public void setTimeout​(int timeoutMs)
                        throws java.net.SocketException
        Description copied from interface: FrameHandler
        Set the underlying socket's read timeout in milliseconds, if applicable.
        Specified by:
        setTimeout in interface FrameHandler
        Parameters:
        timeoutMs - The timeout in milliseconds
        Throws:
        java.net.SocketException
      • getTimeout

        public int getTimeout()
                       throws java.net.SocketException
        Description copied from interface: FrameHandler
        Get the underlying socket's read timeout in milliseconds.
        Specified by:
        getTimeout in interface FrameHandler
        Returns:
        The timeout in milliseconds
        Throws:
        java.net.SocketException
      • sendHeader

        public void sendHeader()
                        throws java.io.IOException
        Description copied from interface: FrameHandler
        Send the initial connection header, thus kickstarting the AMQP protocol version negotiation process and putting the underlying connection in a state such that the next layer of startup can proceed.
        Specified by:
        sendHeader in interface FrameHandler
        Throws:
        java.io.IOException - if there is a problem accessing the connection
      • readFrame

        public Frame readFrame()
                        throws java.io.IOException
        Description copied from interface: FrameHandler
        Read a Frame from the underlying data connection.
        Specified by:
        readFrame in interface FrameHandler
        Returns:
        an incoming Frame, or null if there is none
        Throws:
        java.io.IOException - if there is a problem accessing the connection
        java.net.SocketTimeoutException - if the underlying read times out
      • writeFrame

        public void writeFrame​(Frame frame)
                        throws java.io.IOException
        Description copied from interface: FrameHandler
        Write a Frame to the underlying data connection.
        Specified by:
        writeFrame in interface FrameHandler
        Parameters:
        frame - the Frame to transmit
        Throws:
        java.io.IOException - if there is a problem accessing the connection
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from interface: FrameHandler
        Flush the underlying data connection.
        Specified by:
        flush in interface FrameHandler
        Throws:
        java.io.IOException - if there is a problem accessing the connection
      • close

        public void close()
        Description copied from interface: FrameHandler
        Close the underlying data connection (complaint not permitted).
        Specified by:
        close in interface FrameHandler