org.figure8.join.services.notification.im
Class GoogleTalkNotifier

java.lang.Object
  extended by org.figure8.join.services.notification.im.XMPPNotifier
      extended by org.figure8.join.services.notification.im.GoogleTalkNotifier
All Implemented Interfaces:
Configurable, Notifier, SubscribersNotifier

public class GoogleTalkNotifier
extends XMPPNotifier

This is an implementation of SubscribersNotifier using the Instant Messenger as notification media. This implementation uses the GoogleTalk protocol for message sending. It uses the Smack libray for that (see http://www.jivesoftware.org/smack for details)

Version:
$Revision: 1.1 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.figure8.join.services.notification.im.XMPPNotifier
parameters, PASSWORD_PARAM, passwordParam, PORT_PARAM, portParam, PSEUDO_PARAM, pseudoParam, ROOM_PARAM, roomParam, SERVER_PARAM, serverParam, USER_PARAM, userParam
 
Constructor Summary
GoogleTalkNotifier()
           
 
Method Summary
protected  XMPPConnection connect()
          Create a new connection and log in.
 java.lang.String[] extractRecipients(RemoteSubscriber[] subscribers)
          Extract mail addresses for subscribers to provide recipients.
 java.util.List getParameterDefinitionsAsList()
          Get this object parameters definitions as a list.
 
Methods inherited from class org.figure8.join.services.notification.im.XMPPNotifier
getChatRoom, getParameterDefinitions, getPassword, getPort, getPseudo, getServer, getUsername, notify, notify, setChatRoom, setParameter, setParameter, setParameters, setPassword, setPort, setPseudo, setServer, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleTalkNotifier

public GoogleTalkNotifier()
Method Detail

extractRecipients

public java.lang.String[] extractRecipients(RemoteSubscriber[] subscribers)
Extract mail addresses for subscribers to provide recipients. Use mail address for the moment : RemoteSubscriber do not have an IM identifier

Specified by:
extractRecipients in interface SubscribersNotifier
Overrides:
extractRecipients in class XMPPNotifier
Parameters:
subscribers - The subscribers to get recipients for
Returns:
The list of corresponding recipients.

getParameterDefinitionsAsList

public java.util.List getParameterDefinitionsAsList()
Get this object parameters definitions as a list. Remove server and port parameters from parent list : we don't need them for GoogleTalk.

Specified by:
getParameterDefinitionsAsList in interface Configurable
Overrides:
getParameterDefinitionsAsList in class XMPPNotifier
Returns:
A list of ParameterDefinition objects

connect

protected XMPPConnection connect()
                          throws NotificationException
Create a new connection and log in.

Overrides:
connect in class XMPPNotifier
Returns:
A new GoogleTalkConnection with user logged in
Throws:
NotificationException - if an exception occurs while creating exception.


Copyright © 2005-2008 Join. All Rights Reserved.