Home

Awesome

NOTE: Tigase JaXMPP has new home at tigase.dev/tigase/_libraries/jaxmpp - please submit all issues/pull-requests there!

<h1 align="center"> Tigase Java XMPP Client Library </h1>

What it is

Tigase Java XMPP Client Library is an XMPP client library written in a Java programming language. It provides implementation of core of the XMPP standard and processing XML. Additionally it provides support for many popular extensions (XEP's).

This repository contains source files of the library.

Features

JaXMPP implements support for RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core and RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence. Additionally it supports many popular XEPs. Below is a list of some of the supported XEPs:

Compilation

Maven is required tool to compile library:

mvn package

To build Android JaXMPP module just use android profile:

mvn package -Pandroid 

Note, that following requirements has to be met:

Releasing

Simple client

Following snippet (in groovy) creates simple XMPP client, that connects to the server and prints out all incomming messages (waits for 1 minut and disconnects)

import tigase.jaxmpp.core.client.BareJID
import tigase.jaxmpp.core.client.JID
import tigase.jaxmpp.core.client.SessionObject
import tigase.jaxmpp.core.client.exceptions.JaxmppException
import tigase.jaxmpp.core.client.xmpp.modules.chat.Chat
import tigase.jaxmpp.core.client.xmpp.modules.chat.MessageModule
import tigase.jaxmpp.core.client.xmpp.stanzas.Message
import tigase.jaxmpp.j2se.Jaxmpp

final Jaxmpp contact = new Jaxmpp()

tigase.jaxmpp.j2se.Presence.initialize(contact);

contact.getModulesManager().register(new MessageModule());

contact.getProperties().setUserProperty(SessionObject.USER_BARE_JID, BareJID.bareJIDInstance("admin@atlantiscity"))
contact.getProperties().setUserProperty(SessionObject.PASSWORD, "admin")

contact.getEventBus().addHandler(MessageModule.MessageReceivedHandler.MessageReceivedEvent.class,
        new MessageModule.MessageReceivedHandler() {

            @Override
            public void onMessageReceived(SessionObject sessionObject, Chat chat, Message stanza) {
                System.out.println("received message: " + stanza.getBody());
            }
        });

println("Loging in...");

contact.login(true)

if (contact.isConnected()) {
    TimeUnit.MINUTES.sleep(1);
    contact.disconnect()
}

Support

When looking for support, please first search for answers to your question in the available online channels:

If you didn't find an answer in the resources above, feel free to submit your question as new issue on GitHub or, if you have valid support subscription, open new support ticket.

License

<img alt="Tigase Tigase Logo" src="https://github.com/tigase/website-assets/blob/master/tigase/images/tigase-logo.png?raw=true" width="25"/> Official <a href="https://tigase.net/">Tigase</a> repository is available at: https://github.com/tigase/jaxmpp/.

Copyright (c) 2004 Tigase, Inc.

Licensed under AGPL License Version 3. Other licensing options available upon request.