[beep4j-user] Frames vs. Messages
Status: Alpha
Brought to you by:
rasss
From: Simon <co...@gm...> - 2008-01-22 20:49:59
|
I've had some time to think through the discussions we've recently had on the list. Here now the changes I propose. I'll change the whole internals of beep4j so that it works only on BEEP frames on the receiving side. Of course, this also has some impact on the public API: ChannelHandler +receivedMSG(message:Object,reply:Reply) ReplyHandler +receivedRPY(message:Object) +receivedERR(message:Object) +receivedANS(message:Object) +receivedNUL(message:Object) You may have noticed that I've implemented channel filters (trunk). I'll implement two filters. One I'll call MessageAssemblingFilter that converts the stream of frames into Message objects and passes those Message objects down the filter chain (ultimately to the ChannelHandler / ReplyHandler). The other I'll call MessageSizeLimittingFilter that should be used before the MessageAssemblingFilter to limit the size of BEEP messages. Of course, this filter would have to be configured with a strategy how to handle oversized messages. One note on the type (java.lang.Object) of the message parameter in the interfaces above: the general object type leaves it open to implement channel filters that convert to any type the application desires. The default (without filters) is a Frame object. What do you think? Simon |