|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.zeromq.ZFrame
public class ZFrame
ZFrame
| Constructor Summary | |
|---|---|
protected |
ZFrame()
Class Constructor Creates an empty frame. |
|
ZFrame(byte[] data)
Class Constructor Copies message data into ZFrame object |
|
ZFrame(String data)
Class Constructor Copies String into frame data |
| Method Summary | |
|---|---|
void |
destroy()
Destructor. |
ZFrame |
duplicate()
Creates a new frame that duplicates an existing frame |
boolean |
equals(Object o)
|
byte[] |
getData()
|
boolean |
hasData()
Convenience method to ascertain if this frame contains some message data |
int |
hashCode()
|
boolean |
hasMore()
|
boolean |
hasSameData(ZFrame other)
Returns true if both frames have byte - for byte identical data |
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 |
boolean |
sendAndDestroy(ZMQ.Socket socket)
Sends frame to socket if it contains data. |
boolean |
sendAndDestroy(ZMQ.Socket socket,
int flags)
Sends frame to socket if it contains data. |
boolean |
sendAndKeep(ZMQ.Socket socket)
Sends frame to socket if it contains any data. |
boolean |
sendAndKeep(ZMQ.Socket socket,
int flags)
Sends frame to socket if it contains any data. |
int |
size()
Returns byte size of frame, if set, else 0 |
boolean |
streq(String str)
String equals. |
String |
strhex()
Returns frame data as a printable hex string |
String |
toString()
Returns a human - readable representation of frame's data |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ZFrame()
public ZFrame(byte[] data)
data - Data to copy into ZFrame objectpublic ZFrame(String data)
data - | Method Detail |
|---|
public void destroy()
public byte[] getData()
public boolean hasMore()
public int size()
public boolean hasData()
public boolean sendAndKeep(ZMQ.Socket socket,
int flags)
socket - 0MQ socket to send frameflags - Valid send() method flags, defined in org.zeromq.ZMQ class
public boolean sendAndKeep(ZMQ.Socket socket)
socket - 0MQ socket to send frame
public boolean sendAndDestroy(ZMQ.Socket socket,
int flags)
socket - 0MQ socket to send frameflags - Valid send() method flags, defined in org.zeromq.ZMQ class
public boolean sendAndDestroy(ZMQ.Socket socket)
socket - 0MQ socket to send frame
public ZFrame duplicate()
public boolean hasSameData(ZFrame other)
other - The other ZFrame to compare
public void reset(byte[] data)
data - New byte array contents for framepublic String strhex()
public boolean streq(String str)
str - String to compare with frame data
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||