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, hasUnsubscribe
public boolean hasSend()
hasSend
in interface cMsgSubdomainInterface
hasSend
in class cMsgSubdomainAdapter
public boolean hasSendAndGet()
hasSendAndGet
in interface cMsgSubdomainInterface
hasSendAndGet
in class cMsgSubdomainAdapter
public boolean hasSyncSend()
hasSyncSend
in interface cMsgSubdomainInterface
hasSyncSend
in class cMsgSubdomainAdapter
public void setUDLRemainder(java.lang.String UDLRemainder) throws cMsgException
setUDLRemainder
in interface cMsgSubdomainInterface
setUDLRemainder
in class cMsgSubdomainAdapter
UDLRemainder
- last part of the UDL appropriate to the subdomain handlercMsgException
- neverpublic void registerClient(cMsgClientInfo info) throws cMsgException
registerClient
in interface cMsgSubdomainInterface
registerClient
in class cMsgSubdomainAdapter
info
- information about clientcMsgException
- upon bad UDL, cannot create file names or filespublic void handleSendRequest(cMsgMessageFull msg) throws cMsgException
handleSendRequest
in interface cMsgSubdomainInterface
handleSendRequest
in class cMsgSubdomainAdapter
msg
- message from sendercMsgException
- if error writing filepublic int handleSyncSendRequest(cMsgMessageFull msg) throws cMsgException
handleSyncSendRequest
in interface cMsgSubdomainInterface
handleSyncSendRequest
in class cMsgSubdomainAdapter
msg
- message from sendercMsgException
- neverpublic void handleSendAndGetRequest(cMsgMessageFull message) throws cMsgException
handleSendAndGetRequest
in interface cMsgSubdomainInterface
handleSendAndGetRequest
in class cMsgSubdomainAdapter
message
- message to generate sendAndGet response to (contents ignored)cMsgException
- if error reading file or delivering message to client