XmppSessionConfiguration

Issue #52 wontfix
Soo Han created an issue

defaultResposneTimeout i think belongs better with TcpConnectionConfiguration

JABContext, (belongs better with the XmppServer (pass in Extension as args)

Following comes as default so no need to have builder to define them. XmlInputFactory XmlOutputFactory

More importantly these don't need to referred through XmppSession in creating XmlStreamReader and XmlStreamWriter construction

Comments (4)

  1. Christian Schudt repo owner

    Hi,

    defaultResponseTimeout is the time which is waited for an IQ reply. So this is independent of the underlying connection method and therefore should be in XmppSessionConfiguration.

    JAXBContext: What do you mean?

    Xml(In|Out)putFactory: They once were in XmppStreamReader and XmppStreamWriter. But after some performance measures, I noticed that they were recreated every time a new connection was created. So I put them into XmppSessionConfiguration as package-private, because this is usually only created once. I.e. if you create 100 sessions with the same configuration, it has performance benefits, because the factories aren't recreated.

  2. Soo Han reporter
    • defaultResponseTimeout : it was the name that was misleading for IQ specific it makes sense.

    • JAXBContext, This was a readability/responsibility or separation of concerns. As the name implies I was expecting XmppConfiguration to be configuration. And XmppSession be the run time application of that configuration. Once configured I believe XmppSession would be the source for the values for all its collaborators. I was pointing out that XmppStreamReader//XmppStreamWriter are getting at the at the values through XmppsSession, to ultimately XmppSessionConfiguration.

    I was trying to point out once XmppSessionConfiguration builds the JAXBContext, XML(Input/Output)Factory Session would be the source and not XmppSessionConfiguration. I was trying suggest to remove one less interdependent objects.

  3. Christian Schudt repo owner

    I think your suggestion is to move the creation of XMLInputFactory out of XmppSesionConfiguration (and to XmppStreamReader).

    As described above, this has minor performance implications, because the factories are then recreated for every new connection (even when reconnecting), which isn't desirable.

    Therefore I leave it as is (in the XmppSessionConfiguration).

  4. Log in to comment