The service components

The service components handle the three main building blocks on which the Jabber functionality is based (the <message/>, <presence/>, and <iq/> packets). You can find out more about these building blocks in Chapter 5.

In addition, service components also handle the <route/> packets, which are used internally by jabberd to move packets around between components. For example, the Session Management component is the component that usually handles client authentication. It receives any incoming authorization requests received by and passed on from the Client (to Server) Connections component. However, it may be that the administrator has configured the Jabber server to use a different (third-party) component, developed by another group or company, to handle the authorizations. In this case, the request is routed from one component (Session Management) to another (the third-party authorization component).

So unlike the log and xdb components, which handle data packets whose element names match the component type (<log/> and <xdb/>), the service component is an umbrella component designed to handle packets with different element names (<iq/>, <message/>, <presence/>, and <route/>). Example 4-3 shows two typical service packets.

Example 4-3. Two service packets

<route to='dj@yak/81F2220' from='15@c2s/80EE868'> <presence> <status>Online</status> </presence> </route> <message id="jim_id_7" to="sabine@merlix" type="chat"> <x xmlns="jabber:x:event"> <composing/> ...

Get Programming Jabber now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.