Mike,
Below is a proposal for a few API level additions/changes.
1) Add methods hamsam.protocol.Protocol.setConnectionDetails(Properties)
and
hamsam.protocol.Protocol.isConnectionDetailsRequired().
This is an optional method that should be invoked just before the
connect method. For open protocols like
Jabber we need to specify the server host and port to connect to, these
methods help for that. We will document the data to be passed as
properties in the tutorial. The convention is to use something like
hamsam.protocol.jabber.host (this helps to avoid namespace collisions).
For proprietary protocols also, we may give the users a chance to
specify an alternate server/port (or any other data). However, for them
this method call will be optional. Whether it is mandatory or optional
is determined by isConnectionDetailsRequired().
2) Like hamsam.api.Conference class, we will introduce the
hamsam.api.IMSession class, that represents a chat session with a single
buddy.
This helps to model protocols that inherently support an IM session in a
better fashion. However, this needs the method
hamsam.protocol.Protocol.sendInstantMessage(Buddy, Message) to be
changed to sendInstantMessage(IMSession, Message). And we will introduce
two new methods in hamsam.protocol.Protocol class -
startIMSession(IMSession) and quitIMSession(IMSession).
3) Add method hamsam.api.Conference.inviteBuddy(Buddy, String) to invite
a buddy to a conference that is already going on.
This needs addition of a new method to hamsam.protocol.Protocol class -
inviteBuddyToConference(Conference, Buddy, String).
Let me know what you think about these changes.
--Raghu
|