A Jabber Instant Messaging Client: Written in Java - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

A Jabber Instant Messaging Client: Written in Java

Description:

A Jabber Instant Messaging Client: Written in Java. Master's Project ... Growth of the Internet has caused a push for ... ICQ/AIM. ICQ created by ... – PowerPoint PPT presentation

Number of Views:311
Avg rating:3.0/5.0
Slides: 29
Provided by: nathan97
Category:

less

Transcript and Presenter's Notes

Title: A Jabber Instant Messaging Client: Written in Java


1
A Jabber Instant Messaging Client Written in Java
  • Masters Project Presentation by
  • Nathan Harmon

2
Presentation Goals
  • Why the Jabber protocol was created
  • How the Jabber protocol works
  • How the Jabber client works

3
Overview
  • Introduction
  • History of Instant Messaging
  • The Jabber Protocol
  • Client Application Design
  • Demo

4
Project Purpose
  • Growth of the Internet has caused a push for many
    new standards
  • Net created many interoperability problems
  • Data
  • Operating System
  • Instant Messaging clients
  • Standards solutions
  • eXtensible Markup Language (XML)
  • Java
  • Jabber

5
Project Scope
  • Client in Java
  • Features
  • User registration
  • User login/logoff
  • Roster Management
  • Normal messages
  • Chat messages

6
Technologies Used
  • Jabber
  • Created by Jeremie Miller
  • Released as Open Source in 1999
  • XML
  • W3C Recommendation in Feb. 1998
  • Based on HTML
  • Two main APIs
  • SAX
  • DOM
  • Java
  • Created by Sun in 1995

7
Overview
  • Introduction
  • History of Instant Messaging
  • The Jabber Protocol
  • Client Application Design
  • Demo

8
Original Instant Messaging Applications
  • PLANET
  • Created in 1973 by Jacques Vallee
  • First chat program designed for ARPANET
  • Unix talk
  • Released with 4.2BSD
  • Internet Relay Chat (IRC)
  • Created by Jarkko Oikarinen in 1989
  • Ability to join chat rooms (channels)

9
ICQ/AIM
  • ICQ created by Mirabilis, Ltd. in 1996
  • AOL and Netscape release AOL Instant Messenger
    (AIM) in 1997
  • Similar applications created by other portal
    companies
  • MSN
  • Yahoo!

10
Client Interoperability
  • Free to download Profits come from advertising
  • AOL has consistently blocked connections from
    other clients
  • IETF formed the Instant Messaging and Presence
    Protocol (IMPP) Working Group

11
Other Jabber Clients
  • Jabber Instant Messenger Jabber, Inc.
  • WinJab Open Source

12
Overview
  • Introduction
  • History of Instant Messaging
  • The Jabber Protocol
  • Client Application Design
  • Demo

13
Main Elements
  • ltstream/gt, ltiq/gt, ltpresence/gt, and ltmessage/gt
  • Common attributes
  • to
  • from
  • type
  • id
  • To and from attributes use Jabber ID (JID)
  • username_at_hostname/resource

14
The ltstream/gt Element
  • Client/Server sessions use the jabberclient
    namespace
  • One session is two full XML documents
  • ltstreamstream xmlnsstreamhttp//etherx.jabber.
    org/streams
  • tojabber.org
  • xmlnsjabberclientgt
  •  
  • other XML elements here
  •  
  • lt/streamstreamgt
  • ltstreamerror/gt used for invalid XML

15
The ltiq/gt Element
  • IQ Info/Query
  • Pairs of request/response elements
  • get gt result
  • set gt result
  • Contain ltquery/gt subelement with namespace
  • jabberiqagents
  • jabberiqauth
  • jabberiqregister
  • jabberiqroster
  • jabberiqversion

16
ltiq/gt Examples
  • Retrieve Roster
  • Client ltiq typeget idgetRoster_0gt
  • ltquery xmlnsjabberiqroster/gt
  • lt/iqgt
  •  
  • Server ltiq typeresult idgetRoster_0gt
  • ltquery xmlnsjabberiqrostergt
  • ltitem jidpinkert_at_jabber.org
    subscriptionboth nameDr. Pinkertgt
  • ltgroupgtCommitteelt/groupgt
  • lt/itemgt
  • ltitem jidamk_at_jabber.org
    subscriptionboth nameDr. Keunekegt
  • ltgroupgtCommitteelt/groupgt
  • lt/itemgt
  • lt/querygt
  • lt/iqgt

17
ltiq/gt Examples Contd.
  • Add to Roster
  • Client ltiq typeset idsetRoster_0gt
  • ltquery xmlnsjabberiqrostergt
  • ltitem jidbrian_at_jabber.org nameBrian
    Tebbsgt
  • ltgroupgtVaulterslt/groupgt
  • lt/itemgt
  • lt/querygt
  • lt/iqgt
  • Server ltiq typeresult idsetRoster_0
    fromnate_at_jabber.org tonate_at_jabber.org/
    gt

18
The ltpresence/gt Element
  • Used to send and receive entity availability
    information
  • Types
  • Available
  • Unavailable
  • Subscribe
  • Unsubscribe
  • Subscribed
  • Unsubscribed

19
The ltpresence/gt Element Contd.
  • Available type subelements
  • Show
  • Status
  • Priority
  • X

20
ltpresence/gt Examples
  • Presence subscription
  • Client ltpresence typesubscribe
    topinkert_at_jabber.org/gt
  •  
  • Server ltpresence typesubscribed
    frompinkert_at_jabber.org tonate_at_jabber
    .org/home/gt
  • Setting presence
  • Client ltpresence typeavailable
    fromnate_at_jabber.org/home
  • topinkert_at_jabber.orggt
  • ltshowgtchatlt/showgt
  • ltstatusgtIm ready to chat!lt/statusgt
  • ltprioritygt5lt/prioritygt
  • ltx xmlnsjabberxdelay
    fromnate_at_jabber.org/home
  • stamp20020424T110000/gt
  • lt/presencegt

21
The ltmessage/gt Element
  • Used to send messages to other entities
  • Message types
  • Normal
  • Chat
  • Groupchat
  • Headline
  • Error

22
ltmessage/gt Examples
  • Normal Message
  • ltmessage typenormal topinkert_at_jabber.orggt
  • ltsubjectgtNew Chapterlt/subjectgt
  • ltbodygt
  • Ive finished another chapter. Please let me
    know what you think.
  • lt/bodygt
  • lt/messagegt
  • Chat Message
  • ltmessage typechat tonate_at_jabber.orggt
  • ltthreadgt1234567890ABCDEF1234567890ABCDEFABlt/threa
    dgt
  • ltbodygtWhen is your defense?lt/bodygt
  • lt/messagegt

23
Overview
  • Introduction
  • History of Instant Messaging
  • The Jabber Protocol
  • Client Application Design
  • Demo

24
XML Parser
  • Streaming XML SAX
  • Took suggestions from Brett McLaughlins Java
    XML
  • Apache Xerces2 Java Parser was chosen

25
Event-based Programming
  • Messages are asynchronous
  • Use callbacks to handle each message

26
User Registration and Authentication
  • Each Jabber server may require different
    Registration information
  • There are three types of authentication
  • Plain text
  • SHA Digest
  • Zero-knowledge

27
Synchronization
  • Multiple threads in the Jabber client
  • Synchronization is done using the critical object
  • synchronized(roster)
  • // check if the user already exists in the
    roster
  • if(getUserByJID(user.getJID()) ! null)
  • roster.remove(user)
  • roster.add(user)
  • else
  • roster.add(user)

28
Overview
  • Introduction
  • History of Instant Messaging
  • The Jabber Protocol
  • Client Application Design
  • Demo
Write a Comment
User Comments (0)
About PowerShow.com