org.nuiton.wikitty.services
Class XMPPNotifierTransporter

java.lang.Object
  extended by org.nuiton.wikitty.services.XMPPNotifierTransporter
All Implemented Interfaces:
org.jivesoftware.smack.PacketListener, WikittyServiceNotifier.RemoteNotifierTransporter

public class XMPPNotifierTransporter
extends Object
implements org.jivesoftware.smack.PacketListener, WikittyServiceNotifier.RemoteNotifierTransporter

Transporter d'event via xmpp. Pour que ca fonctionne il faut un serveur xmpp avec une room

Configuration

  • wikitty.xmpp.server = adresse du serveur (ex: im.codelutin.com)
  • wikitty.xmpp.room = adresse de la room (ex: wikitty-event@im.codelutin.com)

    Version:
    $Revision: 1136 $ Last update: $Date: 2011-08-12 16:24:03 +0200 (ven, 12 aoĆ» 2011) $ by : $Author: tchemit $
    Author:
    poussin

    Field Summary
    protected  org.jivesoftware.smack.XMPPConnection connection
               
    protected  boolean listenEvent
              Indique si les events sont ecoutes (true) via le transporter
    protected  org.jivesoftware.smackx.muc.MultiUserChat muc
               
    protected  boolean propagateEvent
              Indique si les events sont propages (true) via le transporter
    static String PROPERTY_EVENT_NAME
               
    protected  String pseudo
               
    protected  String room
               
    protected  WikittyServiceNotifier ws
              Notifier service reference reference.
     
    Constructor Summary
    XMPPNotifierTransporter(org.nuiton.util.ApplicationConfig config)
               
     
    Method Summary
     WikittyServiceNotifier getWikittyServiceNotifier()
               
    protected  void initXMPP(org.nuiton.util.ApplicationConfig config)
              Si persistent est vrai alors il faut toujours utilise le meme user id
     void processPacket(org.jivesoftware.smack.packet.Packet packet)
              used for MUC message
     void sendMessage(WikittyEvent event)
              Send a jgroup message to all other channel member.
     void setWikittyServiceNotifier(WikittyServiceNotifier ws)
              this method must be call before RemoteNotifierTransporter utilisation to indicate which service use it
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PROPERTY_EVENT_NAME

    public static final String PROPERTY_EVENT_NAME
    See Also:
    Constant Field Values

    propagateEvent

    protected boolean propagateEvent
    Indique si les events sont propages (true) via le transporter


    listenEvent

    protected boolean listenEvent
    Indique si les events sont ecoutes (true) via le transporter


    ws

    protected WikittyServiceNotifier ws
    Notifier service reference reference.


    room

    protected String room

    pseudo

    protected String pseudo

    connection

    protected org.jivesoftware.smack.XMPPConnection connection

    muc

    protected org.jivesoftware.smackx.muc.MultiUserChat muc
    Constructor Detail

    XMPPNotifierTransporter

    public XMPPNotifierTransporter(org.nuiton.util.ApplicationConfig config)
    Parameters:
    ws -
    props -
    Method Detail

    getWikittyServiceNotifier

    public WikittyServiceNotifier getWikittyServiceNotifier()

    setWikittyServiceNotifier

    public void setWikittyServiceNotifier(WikittyServiceNotifier ws)
    Description copied from interface: WikittyServiceNotifier.RemoteNotifierTransporter
    this method must be call before RemoteNotifierTransporter utilisation to indicate which service use it

    Specified by:
    setWikittyServiceNotifier in interface WikittyServiceNotifier.RemoteNotifierTransporter

    initXMPP

    protected void initXMPP(org.nuiton.util.ApplicationConfig config)
    Si persistent est vrai alors il faut toujours utilise le meme user id

    Parameters:
    props -

    sendMessage

    public void sendMessage(WikittyEvent event)
                     throws Exception
    Description copied from interface: WikittyServiceNotifier.RemoteNotifierTransporter
    Send a jgroup message to all other channel member.

    Specified by:
    sendMessage in interface WikittyServiceNotifier.RemoteNotifierTransporter
    Parameters:
    event - message to send
    Throws:
    Exception

    processPacket

    public void processPacket(org.jivesoftware.smack.packet.Packet packet)
    used for MUC message

    Specified by:
    processPacket in interface org.jivesoftware.smack.PacketListener
    Parameters:
    packet -


    Copyright © 2009-2012 CodeLutin. All Rights Reserved.