Custom configuration
Once we’ve dealt with the (optional or implied)
<host/>
tag hostname filters and the component connection method, all
that is left is the custom configuration for the component instance
itself. This will look different for different components, but there
is still a pattern that you can recognize. The configuration always appears
in a “wrapper” tag that, like the
<host/>
and
<load/>
tags earlier, appears as an immediate child of the component type tag
(that’s
<service/>
in our c2s example):
<service id="c2s">
...
<pthcsock xmlns='jabber:config:pth-csock'>
... [configuration here] ...
</pthcsock>
</service>
There are two things to note here:
The tag name (
<pthcsock/>)The namespace declaration (
xmlns='jabber:config:pth-csock')
The important part of the configuration wrapper tag is the namespace declaration:
xmlns="jabber:config:pth-csock"
because that is what the component actually uses to search for and retrieve the configuration.
As for the actual configuration elements for the c2s component instance
that we see here
(<authtime/> and
<karma/>),
we’ll take a look at them in Section 4.6.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access