Friday, July 26, 2013

Introduction to XMPP / Jabber






What is Xmpp?

The Extensible Messaging and Presence Protocol (XMPP - originally named Jabber) is an open technology for real-time communication, using the Extensible Markup Language (XML) as the base format for exchanging information. In essence, XMPP provides a way to send small pieces of XML from one entity to another in close to real time.


Xmpp and Jabber, what is the difference?

Xmpp protocol was originally named Jabber. That's all.


ConnectionConfiguration:

Configuration to use while establishing the connection to the server.
Here you can set the Host, Port and Service details:

Google Hangout (talk) configuration for example:

public static final String HOST = "talk.google.com";
public static final int PORT = 5222;
public static final String SERVICE = "gmail.com";

ConnectionConfiguration connectionConfiguration = 
    new ConnectionConfiguration(HOST, PORT, SERVICE);


XmppConnection

Creates a socket connection to a XMPP server.
Gets connectionConfiguration in the constructor.
XmppConnection xmppConnection =
    new XMPPConnection(connectionConfiguration);


3 comments: