|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.cMsg.cMsgDomain.server.cMsgMessageDeliverer
public class cMsgMessageDeliverer
This class delivers messages from the subdomain handler objects in the cMsg domain to a particular client.
Various types of messages may be sent. These are defined to be:
cMsgConstants.msgGetResponse
for a message sent in
response to a cMsg.sendAndGet(org.jlab.coda.cMsg.cMsgMessage, int)
cMsgConstants.msgServerGetResponse
for a message sent in
response to a cMsgServerClient.serverSendAndGet(org.jlab.coda.cMsg.cMsgMessage, java.lang.String, org.jlab.coda.cMsg.cMsgCallbackInterface)
with a return acknowlegment
cMsgConstants.msgSubscribeResponse
for a message sent in
response to a cMsg.subscribe(java.lang.String, java.lang.String, org.jlab.coda.cMsg.cMsgCallbackInterface, java.lang.Object)
with a return acknowlegment
cMsgConstants.msgShutdownClients
for a message to shutdown
the receiving client
Constructor Summary | |
---|---|
cMsgMessageDeliverer(cMsgClientInfo info)
Create a message delivering object for use with one specific client. |
Method Summary | |
---|---|
void |
close()
Method to close all streams and sockets. |
void |
createClientConnection(cMsgClientInfo info)
Creates a socket communication channel to a client. |
void |
deliverMessage(cMsgMessage msg,
int msgType)
Method to deliver a message from a domain server's subdomain handler to a client. |
boolean |
deliverMessageAndAcknowledge(cMsgMessage msg,
int msgType)
Method to deliver a message from a domain server's subdomain handler to a client and receive acknowledgment that the message was received. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public cMsgMessageDeliverer(cMsgClientInfo info) throws java.io.IOException
info
- information object about client to talk to
java.io.IOException
- if cannot establish communication with clientMethod Detail |
---|
public void close()
close
in interface cMsgDeliverMessageInterface
public void deliverMessage(cMsgMessage msg, int msgType) throws java.io.IOException, cMsgException
deliverMessage
in interface cMsgDeliverMessageInterface
msg
- message to sent to clientmsgType
- type of communication with the client
java.io.IOException
- if the message cannot be sent over the channel
or client returns an error
cMsgException
- if connection to client has not been establishedpublic boolean deliverMessageAndAcknowledge(cMsgMessage msg, int msgType) throws java.io.IOException, cMsgException
deliverMessageAndAcknowledge
in interface cMsgDeliverMessageInterface
msg
- message to sent to clientmsgType
- type of communication with the client
java.io.IOException
- if the message cannot be sent over the channel
or client returns an error
cMsgException
- if connection to client has not been establishedpublic void createClientConnection(cMsgClientInfo info) throws java.io.IOException
info
- client information object
java.io.IOException
- if socket cannot be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |