public class SocketChannelFrameHandler extends Object implements FrameHandler
| Constructor and Description |
|---|
SocketChannelFrameHandler(SocketChannelFrameHandlerState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying data connection (complaint not permitted).
|
void |
flush()
Flush the underlying data connection.
|
InetAddress |
getAddress()
Retrieve address of peer.
|
InetAddress |
getLocalAddress()
Retrieve the local host.
|
int |
getLocalPort()
Retrieve the local port number.
|
int |
getPort()
Retrieve port number of peer.
|
SocketChannelFrameHandlerState |
getState() |
int |
getTimeout()
Get the underlying socket's read timeout in milliseconds.
|
void |
initialize(AMQConnection connection) |
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 |
setTimeout(int timeoutMs)
Set the underlying socket's read timeout in milliseconds, if applicable.
|
void |
writeFrame(Frame frame)
Write a
Frame to the underlying data connection. |
public SocketChannelFrameHandler(SocketChannelFrameHandlerState state)
public InetAddress getLocalAddress()
NetworkConnectiongetLocalAddress in interface NetworkConnectionpublic int getLocalPort()
NetworkConnectiongetLocalPort in interface NetworkConnectionpublic InetAddress getAddress()
NetworkConnectiongetAddress in interface NetworkConnectionpublic int getPort()
NetworkConnectiongetPort in interface NetworkConnectionpublic void setTimeout(int timeoutMs)
throws SocketException
FrameHandlersetTimeout in interface FrameHandlertimeoutMs - The timeout in millisecondsSocketExceptionpublic int getTimeout()
throws SocketException
FrameHandlergetTimeout in interface FrameHandlerSocketExceptionpublic void sendHeader()
throws IOException
FrameHandlersendHeader in interface FrameHandlerIOException - if there is a problem accessing the connectionpublic void initialize(AMQConnection connection)
initialize in interface FrameHandlerpublic Frame readFrame() throws IOException
FrameHandlerFrame from the underlying data connection.readFrame in interface FrameHandlerIOException - if there is a problem accessing the connectionSocketTimeoutException - if the underlying read times outpublic void writeFrame(Frame frame) throws IOException
FrameHandlerFrame to the underlying data connection.writeFrame in interface FrameHandlerframe - the Frame to transmitIOException - if there is a problem accessing the connectionpublic void flush()
throws IOException
FrameHandlerflush in interface FrameHandlerIOException - if there is a problem accessing the connectionpublic void close()
FrameHandlerclose in interface FrameHandlerpublic SocketChannelFrameHandlerState getState()
Copyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.