jYMSG
YMSG Java API - Yahoo Instant Messenger Support for Java
Introduction

This API provides a way for Java applications to connect and use the Yahoo Instant Messenger protocol, version 10 (YMSG-10) in a reasonably coder friendly and abstract way. Although methods the API exposes are clearly matched to Yahoo IM features, the API attempts to hide as much of the nitty-gritty as possible, taking responsibility upon itself as far as it possibly can.

Written using J2SE 1.3/1.4 - but will probably work under JDK/JRE 1.1

This is not an application, it is an API which may be employed by an application to create an instant messenger using the Yahoo chat/pager system. As such it is targeted at experienced programmers.

The project has matured quite a bit since it was first released, with a companion support package now providing advanced features like Swing models, spam detection, a chat emote manager, and customisable styled text decoding. I've kept this project described as being in an 'alpha' stage - even though the code has been downloaded by countless Java programmers and has held up quite well - as there is still a lot of work to be done catching up with all the features Yahoo have added over the years.

For more information on jYMSG, consult the FAQ. Beginners note: Kulvir Singh Bhogal has written a rather nice tutorial to jYMSG, explaining how to get started.

This project is released under the GPL.


Features

Connection
Login/Logout - wouldn't be much good without it.
Authentification - protocol version 9, 10 and 11 authentification.
Fallback ports - optionally attempt to connect via different routes.
Login timeouts - configurable login and chat login timeouts.
HTML/SOCKS proxy - connect via SOCKS and HTTP proxies.
HTTP authentication - use proxy username/passwords with HTTP proxy.
Configurable - host/port names accessible via properties.
Foreign chat - use non-English chatroom hierarchies.

Messaging
Instant messages - send messages to other Yahoo users.
Conferences - create, join, and use multi-user private chat.
Chatrooms - find and connect to chatroom, including adult rooms.
File transfer - with easy-to-use file save methods.
Identities - send messages using aliases.

Data and Status
Status - change status, or set custom status messages.
Groups and Friends list - with events when they change.
Adding and removing friends - including automatic group handling.
Identities - all available aliases for current user.
Ignore - for all those users who bore you.
New mail update - be informed of new Yahoo mail.

Mechanics
Typing notification - automatic, if you provide an AWT event source.
Connection pinging - automatic keep alive pinging on open connections.

Support Package
Separate support package - with the following features...
Decoding messages - to plain text, HTML or Swing components.
Encoding messages - build styled text messages and output to Yahoo format.
Colour fade and alt text - fancy text colouring supported.
Emoticons (smileys) - decoded for Swing Document based text components.
Anti-Spam - support class to help block annoying chat behaviour.
Overriding styles - restrict message font sizes, colours, etc.
Swing models - automatically updates user list/tree models.
Emote manager - loads and manages chat Emotes from config files.


Unsupported Features

To Do
P2P file transfer - not implemented, yet.
Avatars - not implemented, yet.
Stealth - not implemented, yet.

Possible
Webcam - relies on JPEG2000.
Voice chat - requires technology not yet available to Java / Open Source.
Games - unlikely to get implemented.

Highly Unlikely
IMvironments - native to PC only (?)
Mobile/cell phone chat via SMS - not part of YMSG protocol.
Other tools, ie calendar, etc - not part of YMSG protocol.


Known Projects That Use This API

Hopefully more to be added :

Eclipse Instant Messenger Plugin, for eclipse.org.
ImTask, keep fellow developers in step with instant messages from Apache Ant.
PlanetaMessenger.org, are using this API to build their Java messenger client.
Y! Messenger for Hiptop, is a Java based messenger available for the Danger Hiptop, using a port of jYMSG to Java's Micro Edition platform.
Gym!, is an Java based messenger client hosted by a SourceForge-like site in India, so internationalization support should be strong. The project also boasts a console based messenger.
Jmsngr, is another IM client in the very early stages of development.
ServerWatcher 2.0, is a novel little application which monitors servers and notifies administrators of downtime via their prefered method of communications.
Orbeon, is apparently using jYMSG to allow web services to interact with instant messaging. You can find out more here.


Credits and Thanks

This project could not have existed without pioneering work done by other coders elsewhere. Although jYMSG is not a port of any other project, I did rely on other Open Source implementations to help fine-tune this Java version, and answer the recuring question "what the hell does this tag do?"

In particular I am indebted to the libyahoo2 project, who's documentation and source code was most useful in getting me started, as well as decyphering the more obscure parts of the protocol. I'd like to think by adding to the pool of documentation myself (as well as publishing details on the workings of YMSG's HTTP proxy scheme) I am in some small way repaying that debt.

A number of other Java coders, too many to list, also contributed comments and suggestions - many of which made it into the package. Special mentions go to J. Morris, who submitted some example code for the support library; Phinaes Gage, who submitted a working SHA-1 implementation after the Java API version could not be used; and Kulvir Singh Bhogal, who wrote a beginner's tutorial for jYMSG.

Naturally thanks must also go to SourceForge, who host this project for free, along with countless other GPL and Open Source efforts.

jYMSG was created entirely without reverse engineering of any Yahoo! software code.

Copyright © S.E.Morris (FISH) 2003-05
(Java Duke © Sun Microsystems; large smiley © Yahoo! Inc.)

SourceForge.net Logo