-
API & Extension -
jChatBox is opened to Designers and
Programmers.
Designers can customize JSP files to provide
their own HTML/CSS/JavaScript skin. They should
use a provided skin (Multilanguage, mIRC, Classic, j-TV) as
a starting point. They could easily modify colors, layout,
fonts, labels, ...
Designers
can modify jcbskin.xml to provide their
own Applet skin. They should use a provided
skin (Multilanguage, eXtremeSUN, Manga, Comics) as a starting
point. They could easily modify colors, images, layout, fonts,
labels, ...
[Learn
more about Applet skins]
Designers
can rely on FLASH5 script and API
to write their own FLASH5&6MX
client. Thanks to the XMLConnector service
jChatBox is now ready for FLASH5+ clients. Designers can write
one using our script that provides the communication layer
with any jChatBox server.[Learn
more FLASH5 Script]
Programmers
can extend jChatBox : |
- They
can add more languages
and support to jChatBox through XML resources files
under $JCHATBOX_HOME/WEB-INF/conf/
folder. New resources files have to be declared in
jchatbox.xml to be loaded on Runtime.
<element> tags could be added (but not removed)
and used in custom skins :
"login.test.label" key could
be added in resources_en.xml (and all others XML resources
files) :
<element>
<name>login.test.label</name>
<value>A label for testing</value>
</element>
and used in custom login.jsp based on multilanguage
skin only through :
<%= chatroomBundle.getString("login.test.label")
%>
ChinesePack
(simplified and traditional) and CyrillizationPack(russian)
are available in jChatBox
Add-ons section.
- They
can implement their own client
(HTML/JavaScript, Applet, Flash, Java Application).
They only need API (JavaDoc) to know how to interact
with jChatBox server-side. HTML/JavaScript skins are
also a good starting point. XML Connector service
should be used for remote clients (Applets, ...).
- They
can implement additional
filters by extending jChatBox.Chat.Filter.Filter
abstract class. Filters are declared in jchatbox.xml
(inside
<FILTERS> tag) and
loaded at Runtime. Filter API allows to modify an
incoming message before displaying it to end-user
(e.g. HTML filter, URL filter, Emoticons filter, Censor
filter ...).
Filters must implement Serializable.
Developers have to implement process(String input),
init() and optionnaly eprocess(String input, Msg cMsg,
ChatroomUser cUser) method. _id, _name and _description
fields should be filled in in this constructor with
no arguments.
See Emoticons open source filter
sample in jChatBox
Add-Ons section.
- They
can implement additional
Transcript by extending jChatBox.Chat.Transcript.Dump
abstract class. Transcript implementation is declared
in jchatbox.xml (inside <TRANSCRIPT> tag) and
loaded at Runtime. Transcript API allows to modify
chatrooms transcript format.
Developers have to implement process(Chatroom
room, String filename) and init method. _id, _name
and _description fields should be filled in in this
constructor with no arguments.
See
XMLTranscriptor open source implementation sample
in jChatBox
Add-Ons section.
- They
can plug listeners
by implementing jChatBox.Chat.Event.ChatroomListener
or jChatBox.Chat.Event.ChatroomListener
interfaces. Listeners are declared
in jchatbox.xml (inside
<LISTENERS> tag) and
loaded at Runtime. Listeners allow to be notified
on chatroom events such as : chatroom opened, chatroom
closed, new user has joined the chatroom, new message,
user blacklisted ... A time-based event is available
too. Listener API could be used to develop plugins
such as : users activity tracking (login, logout,
IP address, ...), self closing for empty chatrooms,
enhanced message filter, alert, ...
A listener has only one instance in
the JVM and it's identified by an ID (through getID()
method). init() method is called after the instanciation
to allow parameters loading. A listener could be enabled
on chatroom opening, then it will be notified on chatroom
events. The same listener could be enabled for multiple
chatroooms.
See Self Opening&Closing
(CustomListener.java only) open source sample in
jChatBox
Add-Ons section.
[Browse
jChatBox JavaDoc]
|
jChatBox
provides XML formated content
:
jChatbox is now opened to XML through the XMLConnector
service. Anyone can communicate to a jChatBox server to get
chatroom's info and content as XML. That's way it's easy to
create remote clients like FLASH5+, APPLETS or anything
that could "speak" XML. Thanks to the XMLConnector
service you can also create XSL skins, so plugged to
an XSLT processor you can transform chatroom's content into
documents viewable for many devices (PC, Mobile, PDA ...).
[Learn
more about XMLConnector]
|