This content has been marked as final. Show 2 replies
Several messages, e.g. acknowledge or cancel etc, can be sent wither oneWay or blocking depending on the particular use case.
Currently when such is processed on the server, there is currently no generic way to know whether a response is required to be sent.
SendMessage currently does this by checking whether the message is durable.
I think we need some generic way of a packet knowing whether a response is required (e.g. a oneway flag in AbstractPacket) rather than having to rely on application semantics to determine whether a response should be sent.
I'll add a oneWay boolean attribute to AbstractPacket.
In the packet handler, before leaving the handle() method, I check if there is a response to send or if the oneWay boolean is set to false on the request.
If the boolean is set to false, I'll send a NullPacket() to "unblock" the client side.
One more thing - if a packet can be sent one way or blocking, it doesn't really make sense to call the packets XXXRequest any more.
We should probably rename all the XXRequest and XXResponse classes just to XXXMessage