public class FileQueue extends cMsgSubdomainAdapter
UDL: cMsg:cMsg://host:port/FileQueue/myQueueName?dir=myDirName.
e.g. cMsg:cMsg://ollie/FileQueue/ejw?dir=/home/wolin/qdir.
Stores/retrieves cMsgMessageFull messages from file-based queue.
| Constructor and Description |
|---|
FileQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleSendAndGetRequest(cMsgMessageFull message)
Returns message at head of queue.
|
void |
handleSendRequest(cMsgMessageFull msg)
Write message to queue file.
|
int |
handleSyncSendRequest(cMsgMessageFull msg)
Write message to queue file.
|
boolean |
hasSend()
Method to tell if the "send" cMsg API function is implemented
by this interface implementation in the "handleSendRequest"
method.
|
boolean |
hasSendAndGet()
Method to tell if the "sendAndGet" cMsg API function is implemented
by this interface implementation in the "handleSendAndGetRequest"
method.
|
boolean |
hasSyncSend()
Method to tell if the "syncSend" cMsg API function is implemented
by this interface implementation in the "handleSyncSendRequest"
method.
|
void |
registerClient(cMsgClientInfo info)
Creates files to store messages in.
|
void |
setUDLRemainder(java.lang.String UDLRemainder)
Method to give the subdomain handler the appropriate part
of the UDL the client used to talk to the domain server.
|
handleClientShutdown, handleShutdownClientsRequest, handleSubscribeAndGetRequest, handleSubscribeRequest, handleUnSendAndGetRequest, handleUnsubscribeAndGetRequest, handleUnsubscribeRequest, hasShutdown, hasSubscribe, hasSubscribeAndGet, hasUnsubscribepublic boolean hasSend()
hasSend in interface cMsgSubdomainInterfacehasSend in class cMsgSubdomainAdapterpublic boolean hasSendAndGet()
hasSendAndGet in interface cMsgSubdomainInterfacehasSendAndGet in class cMsgSubdomainAdapterpublic boolean hasSyncSend()
hasSyncSend in interface cMsgSubdomainInterfacehasSyncSend in class cMsgSubdomainAdapterpublic void setUDLRemainder(java.lang.String UDLRemainder)
throws cMsgException
setUDLRemainder in interface cMsgSubdomainInterfacesetUDLRemainder in class cMsgSubdomainAdapterUDLRemainder - last part of the UDL appropriate to the subdomain handlercMsgException - neverpublic void registerClient(cMsgClientInfo info) throws cMsgException
registerClient in interface cMsgSubdomainInterfaceregisterClient in class cMsgSubdomainAdapterinfo - information about clientcMsgException - upon bad UDL, cannot create file names or filespublic void handleSendRequest(cMsgMessageFull msg) throws cMsgException
handleSendRequest in interface cMsgSubdomainInterfacehandleSendRequest in class cMsgSubdomainAdaptermsg - message from sendercMsgException - if error writing filepublic int handleSyncSendRequest(cMsgMessageFull msg) throws cMsgException
handleSyncSendRequest in interface cMsgSubdomainInterfacehandleSyncSendRequest in class cMsgSubdomainAdaptermsg - message from sendercMsgException - neverpublic void handleSendAndGetRequest(cMsgMessageFull message) throws cMsgException
handleSendAndGetRequest in interface cMsgSubdomainInterfacehandleSendAndGetRequest in class cMsgSubdomainAdaptermessage - message to generate sendAndGet response to (contents ignored)cMsgException - if error reading file or delivering message to client