|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rabbitmq.client.impl.SocketFrameHandler
public class SocketFrameHandler
A socket-based frame handler.
| Field Summary | |
|---|---|
static int |
SOCKET_CLOSING_TIMEOUT
Time to linger before closing the socket forcefully. |
| Constructor Summary | |
|---|---|
SocketFrameHandler(java.net.Socket socket)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the underlying data connection (complaint not permitted). |
void |
flush()
Flush the underlying data connection. |
java.net.InetAddress |
getAddress()
Retrieve address of peer. |
java.io.DataInputStream |
getInputStream()
|
int |
getPort()
Retrieve port number of peer. |
int |
getTimeout()
Get the underlying socket's read timeout in milliseconds. |
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 |
sendHeader(int major,
int minor)
Write a 0-8-style connection header to the underlying socket, containing the specified version information, kickstarting the AMQP protocol version negotiation process. |
void |
sendHeader(int major,
int minor,
int revision)
Write a 0-9-1-style connection header to the underlying socket, containing the specified version information, kickstarting the AMQP protocol version negotiation process. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SOCKET_CLOSING_TIMEOUT
| Constructor Detail |
|---|
public SocketFrameHandler(java.net.Socket socket)
throws java.io.IOException
socket - the socket to use
java.io.IOException| Method Detail |
|---|
public java.net.InetAddress getAddress()
FrameHandler
getAddress in interface FrameHandlerpublic java.io.DataInputStream getInputStream()
public int getPort()
FrameHandler
getPort in interface FrameHandler
public void setTimeout(int timeoutMs)
throws java.net.SocketException
FrameHandler
setTimeout in interface FrameHandlertimeoutMs - The timeout in milliseconds
java.net.SocketException
public int getTimeout()
throws java.net.SocketException
FrameHandler
getTimeout in interface FrameHandlerjava.net.SocketException
public void sendHeader(int major,
int minor)
throws java.io.IOException
major - major protocol version numberminor - minor protocol version number
java.io.IOException - if there is a problem accessing the connectionsendHeader()
public void sendHeader(int major,
int minor,
int revision)
throws java.io.IOException
major - major protocol version numberminor - minor protocol version numberrevision - protocol revision number
java.io.IOException - if there is a problem accessing the connectionsendHeader()
public void sendHeader()
throws java.io.IOException
FrameHandler
sendHeader in interface FrameHandlerjava.io.IOException - if there is a problem accessing the connection
public Frame readFrame()
throws java.io.IOException
FrameHandlerFrame from the underlying data connection.
readFrame in interface FrameHandlerjava.io.IOException - if there is a problem accessing the connection
java.net.SocketTimeoutException - if the underlying read times out
public void writeFrame(Frame frame)
throws java.io.IOException
FrameHandlerFrame to the underlying data connection.
writeFrame in interface FrameHandlerframe - the Frame to transmit
java.io.IOException - if there is a problem accessing the connection
public void flush()
throws java.io.IOException
FrameHandler
flush in interface FrameHandlerjava.io.IOException - if there is a problem accessing the connectionpublic void close()
FrameHandler
close in interface FrameHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||