|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectorg.zeromq.ZFrame
public class ZFrame
ZFrame The ZFrame class provides methods to send and receive single message frames across 0MQ sockets. A 'frame' corresponds to one underlying zmq_msg_t in the libzmq code. When you read a frame from a socket, the more() method indicates if the frame is part of an unfinished multipart message. The send() method normally destroys the frame, but with the ZFRAME_REUSE flag, you can send the same frame many times. Frames are binary, and this class has no special support for text data. Based on zframe.c in
| 构造方法摘要 | |
|---|---|
ZFrame()
|
|
ZFrame(byte[] data)
|
|
ZFrame(java.nio.ByteBuffer buffer)
|
|
ZFrame(java.lang.String data)
|
|
| 方法摘要 | |
|---|---|
int |
capacity()
|
void |
destroy()
Destructor. |
ZFrame |
duplicate()
Creates a new frame that duplicates an existing frame |
boolean |
equals(java.lang.Object o)
|
byte[] |
getData()
|
boolean |
hasData()
Convenience method to ascertain if this frame contains some message data |
int |
hashCode()
|
boolean |
hasMore()
|
static ZFrame |
recvFrame(ZMQ.Socket socket)
Receives single frame from socket, returns the received frame object, or null if the recv was interrupted. |
static ZFrame |
recvFrame(ZMQ.Socket socket,
int flags)
Receive a new frame off the socket, Returns newly-allocated frame, or null if there was no input waiting, or if the read was interrupted. |
void |
reset(byte[] data)
Sets new contents for frame |
void |
reset(java.lang.String data)
Sets new contents for frame |
boolean |
send(ZMQ.Socket socket,
int flags)
Method to call org.zeromq.Socket send() method. |
int |
size()
Returns byte size of frame, if set, else 0 |
boolean |
streq(java.lang.String str)
String equals. |
java.lang.String |
strhex()
Returns frame data as a printable hex string |
java.lang.String |
toString()
Returns a human - readable representation of frame's data |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ZFrame()
public ZFrame(byte[] data)
public ZFrame(java.nio.ByteBuffer buffer)
public ZFrame(java.lang.String data)
| 方法详细信息 |
|---|
public int capacity()
public void destroy()
public byte[] getData()
public boolean hasMore()
public int size()
public boolean hasData()
public boolean send(ZMQ.Socket socket,
int flags)
socket - 0MQ socket to send onflags - Valid send() method flags, defined in org.zeromq.ZMQ class
public ZFrame duplicate()
public void reset(byte[] data)
data - New byte array contents for framepublic void reset(java.lang.String data)
data - String contents for framepublic java.lang.String strhex()
public boolean streq(java.lang.String str)
str - String to compare with frame data
public boolean equals(java.lang.Object o)
java.lang.Object 中的 equalspublic int hashCode()
java.lang.Object 中的 hashCodepublic java.lang.String toString()
java.lang.Object 中的 toStringpublic static ZFrame recvFrame(ZMQ.Socket socket)
socket - Socket to read from
public static ZFrame recvFrame(ZMQ.Socket socket,
int flags)
socket - Socket to read fromflags - Pass flags to 0MQ socket.recv call
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||