Le 4/17/13 5:17 PM, Max Larsson a écrit :
> Hi,
Hi,
>
> I'm using MINA to develop a client for a mainly XML based protocol.
Not the simplest kind of protocol to decode ...

>
> And i have some problems to figure out how to realize it in the best
> way. The cause of the problem is that the Protocol has upon
> a successful connection to the IP/Port a initial procedure to select
> the desired protocol and version is performed, before the actual XML
> Protocol starts.
>
> Up on now i created a StateMachine (similar to the TapeDeck Example on
> the website) which models the initial procedure. That seems to work.
> What i now wanted to do is, when this StateMachine has reached it
> connect state (and the actually XML protocol starts), to forward
> all message to another StateMaschine which works upon the first one.
> Alternative i thought about to implement a custom IOConnector,
> which uses the first StateMachine to establish a connection.
There is a big problem with this approach : you won't know when the XML
data will be fully received before having parsed it...

Unless your encapsulating protocol gives you the size of the XML data !

Is it the case ?


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to