Difference between revisions of "XMPP Resources"

Jump to navigation Jump to search
1,600 bytes removed ,  21:22, 27 March 2018
Remove outdated information about priorities and selecting human readable resources.
 
(Remove outdated information about priorities and selecting human readable resources.)
Line 1: Line 1:
In Jabber you are able to log in several client programs simultaneously. You don't need to have different Jabber accounts for work and for home. You can chat at home, then go to work, log in again with the same JID and your home Jabber client will not go offline after that.
In Jabber you are able to log in several client programs simultaneously. You don't need to have different Jabber accounts for work and for home. You can chat at home, then go to work, log in again with the same JID and your home Jabber client will not go offline after that. This is because Jabber Addresses (JIDs) have a component called the "resource part" which allows multiple clients to share the same bare JID (as long as they have unique resource parts).


This is because Jabber has a thing named resources. When you log in, you are usually asked for for
Resources allow individual clients to be addressable on the network, this way the server can send messages to all of your online clients or address a particular client (for instance, to send a file only to your phone).
the Resource Name. For example, you could have a resource "Home" at your home Jabber client and "Work" at you work client. Some programs like to use their names as a resource name, for example: "iChat", "GAIM".
Clients can request a specific, human readable, resource such as "Home" or "Work", but this is generally discouraged because resources are often overriden by the server. Because servers may override resources with random routing data, if you must display individual clients to the user (for example, to ask if they want to send a file to a friends phone or laptop), information about the device type from XEP-0030: Service Discovery or software version information from XEP-0092: Software Version should be displayed instead.
 
When other people look at "you" in their rosters, they usually see a list of resources you are available through. They could send a message to your particular resource, using these JIDs: ''you@jabber.org/Home'' or ''you@jabber.org/Work''. You could even log in twice at the same computer through different Jabber clients and chat between different incarnations of yourself!
 
But when Romeo sends a message to Juliet using her usual JID ''juliet@capulet.com'', how she will actually receive a message - through ''juliet@capulet.com/balcony'' or through ''juliet@capulet.com/bedroom''?
 
User can set different priorities for his/her resources. A priority of resource shows user's availability through this resource. When you are at home, you have "Available" status in your home Jabber client and high priority for it. When you are at work, your home Jabber client probably have status "Extended away" and low priority, while your work client is "Available". So all messages for you are coming to your work client.
 
=Example=
 
Let's imagine you working at your office. At 2:00 PM you decide to go to lunch. You lock your computer causing your Jabber client to fall into "Away" status. But on your way to a restaurant you could start small J2ME Jabber application at your cellphone (for example, [http://mobber.gryf.info/ mobber] or [http://bombus-im.org/ Bombus]). So now you are "Available" again, and all messages will be delivered to your phone while you are out of the office. You come to a restaurant and make an order. Wow, there is a free Wi-Fi service at the restaurant! So you load your PDA and connect. One more of your Jabber client starts, and now you already have at least three available resources at your resource list: "work" (office PC), "cellphone" and "pda". Both "cellphone" and "pda" have "Available" status. You probably prefer chatting through PDA because it has larger screen, easier
text input and free Wi-Fi access. So PDA should have higher priority than cellphone for the same status.
 
Most Jabber clients allow you to tune priority values for every status. Cellphone clients often have predefined priority values that are lower than usual. Check some Additional Settings at your Jabber client!


{{Technical Page}}
{{Technical Page}}
183

edits

Navigation menu