public interface FrameHandler extends NetworkConnection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying data connection (complaint not permitted).
|
void |
finishConnectionNegotiation()
Callback to signal the end of the negotiation phase.
|
void |
flush(WriteListener listener)
Flush the underlying data connection and notify the listener when the write completes.
|
int |
getTimeout()
Get the underlying socket's read timeout in milliseconds.
|
void |
initialize(AMQConnection connection) |
default boolean |
internalHearbeat() |
Frame |
readFrame()
Read a
Frame from the underlying data connection. |
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.
|
void |
setFrameMax(int frameMax)
Cap inbound frame payloads, applied once frame_max is negotiated.
|
void |
setTimeout(int timeoutMs)
Set the underlying socket's read timeout in milliseconds, if applicable.
|
void |
startProcessing()
Start processing incoming frames, once the connection header has been sent.
|
void |
writeFrame(Frame frame)
Write a
Frame to the underlying data connection. |
getAddress, getLocalAddress, getLocalPort, getPortdefault boolean internalHearbeat()
void setTimeout(int timeoutMs)
throws SocketException
timeoutMs - The timeout in millisecondsSocketExceptionint getTimeout()
throws SocketException
SocketExceptionvoid sendHeader()
throws IOException
IOException - if there is a problem accessing the connectionvoid initialize(AMQConnection connection)
void startProcessing()
initialize(AMQConnection) runs.
Frame handlers with their own dedicated reader thread should wait for this call before
starting it, so that thread does not race sendHeader() over the TLS handshake.void finishConnectionNegotiation()
void setFrameMax(int frameMax)
Frame readFrame() throws IOException
Frame from the underlying data connection.IOException - if there is a problem accessing the connectionSocketTimeoutException - if the underlying read times outvoid writeFrame(Frame frame) throws IOException
Frame to the underlying data connection.frame - the Frame to transmitIOException - if there is a problem accessing the connectionvoid flush(WriteListener listener) throws IOException
listener - called when the flush completes, may be nullIOException - if there is a problem accessing the connectionvoid close()
Copyright © 2026 Broadcom Inc. and its subsidiaries.. All rights reserved.