|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectposix.IPC
posix.MsgQ
public class MsgQ
Represent a posix message queue.
| Nested Class Summary | |
|---|---|
static class |
MsgQ.msqid_ds
|
| Nested classes/interfaces inherited from class posix.IPC |
|---|
IPC.Perm |
| Field Summary | |
|---|---|
static int |
MSG_NOERROR
|
| Fields inherited from class posix.IPC |
|---|
egid, euid, id, IPC_ALLOC, IPC_CI, IPC_CREAT, IPC_EXCL, IPC_NOCLEAR, IPC_NOWAIT, IPC_PHYS, IPC_PRIVATE, owner, pid |
| Constructor Summary | |
|---|---|
MsgQ(int qid)
|
|
MsgQ(int key,
int flag)
|
|
MsgQ(String path,
int id)
Attach to an existing message queue. |
|
| Method Summary | |
|---|---|
MsgQ.msqid_ds |
getStatus()
Return the permissions for this IPC data structure. |
static int |
msgget(int key,
int flag)
|
int |
recv(CPtr msg,
int type,
int flag)
Receive a message into a CPtr. |
int |
recv(int[] type,
byte[] msg,
int mtype,
int flag)
Receive a message in a byte array. |
void |
remove()
Remove the message queue from the system. |
int |
send(CPtr msg,
int size,
int flag)
Send a message contained in a CPtr. |
int |
send(int type,
byte[] msg,
int size,
int flag)
Send a message contained in a byte array. |
void |
setPerm(IPC.Perm st)
Set the uid, gid, mode, qbytes for this IPC data structure. |
| Methods inherited from class posix.IPC |
|---|
dispose, finalize, ftok, getId, getPerm, isPidValid, setPerm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MSG_NOERROR
| Constructor Detail |
|---|
public MsgQ(int key,
int flag)
throws IPCException
IPCExceptionpublic MsgQ(int qid)
public MsgQ(String path,
int id)
throws IPCException
IPCException| Method Detail |
|---|
public static int msgget(int key,
int flag)
public int send(int type,
byte[] msg,
int size,
int flag)
public int recv(int[] type,
byte[] msg,
int mtype,
int flag)
mtype - selects which messages to receivetype - returns the mtype of the message received
public int send(CPtr msg,
int size,
int flag)
throws IPCException
msg - The message to send in native format.size - The message size including the type.flag - Options.
IPCException
public int recv(CPtr msg,
int type,
int flag)
throws IPCException
Errno
class before any further I/O takes place in this Thread.
IPCExceptionpublic void remove()
remove in class IPC
public MsgQ.msqid_ds getStatus()
throws IPCException
IPC
getStatus in class IPCIPCException
public void setPerm(IPC.Perm st)
throws IPCException
setPerm in class IPCst - a current msqid_ds obtained from getStatus()
IPCException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||