public interface

FrameHandler

com.rabbitmq.client.impl.FrameHandler
Known Indirect Subclasses

Class Overview

Interface to a frame handler.

Concurrency
Implementations must be thread-safe, and not allow frames to be interleaved, either while reading or writing.

Summary

Public Methods
abstract void close()
Close the underlying data connection (complaint not permitted).
abstract InetAddress getAddress()
Retrieve address of peer.
abstract int getPort()
Retrieve port number of peer.
abstract int getTimeout()
Get the underlying socket's read timeout in milliseconds.
abstract Frame readFrame()
Read a Frame from the underlying data connection.
abstract void sendHeader()
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.
abstract void setTimeout(int timeoutMs)
Set the underlying socket's read timeout in milliseconds, if applicable.
abstract void writeFrame(Frame frame)
Write a Frame to the underlying data connection.

Public Methods

public abstract void close ()

Close the underlying data connection (complaint not permitted).

public abstract InetAddress getAddress ()

Retrieve address of peer.

public abstract int getPort ()

Retrieve port number of peer.

public abstract int getTimeout ()

Get the underlying socket's read timeout in milliseconds.

Returns
  • The timeout in milliseconds

public abstract Frame readFrame ()

Read a Frame from the underlying data connection.

Returns
  • an incoming Frame, or null if there is none
Throws
IOException if there is a problem accessing the connection
SocketTimeoutException if the underlying read times out

public abstract void sendHeader ()

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.

Throws
IOException if there is a problem accessing the connection

public abstract void setTimeout (int timeoutMs)

Set the underlying socket's read timeout in milliseconds, if applicable.

Parameters
timeoutMs The timeout in milliseconds

public abstract void writeFrame (Frame frame)

Write a Frame to the underlying data connection.

Parameters
frame the Frame to transmit
Throws
IOException if there is a problem accessing the connection