Spark 帮助文档(官方也有).docVIP

  • 89
  • 0
  • 约2.73万字
  • 约 21页
  • 2018-06-26 发布于江西
  • 举报
Spark 帮助文档(官方也有).doc

Overview of the Spark Client The Spark client is designed with the idea that most users find the different aspects of a chat client familiar and easy to use. All components you see below are either accessible from the Workspace or ChatRoom object and can be manipulated based on your needs. Overview of the Spark API The Spark API provides a framework for adding extensions on top of the protocol and/or UI of the Spark client. For example, you could write your own message filter or add a button to a chat room and send files using the File Transfer API. The Spark API has the following characteristics: Several event listeners to either intercept, be informed of, or execute custom code in response to a particular IM event. Thorough tie-ins to the UI to allow for customization from simple icon changes, to adding buttons, to adding your own menu items. Ability to add your own XMPP functions using the SMACK API. Managers - Managers allow for better (lazy) loading of particular areas within the Spark client as well as providing access points to the system. Some of the more relevant managers are: SparkManager -- Acts as the central manager for all of Spark. You use this manager to get instances of ChatManager, SessionManager, SoundManager, and UserManager. ChatManager -- Handles registration of most chat listeners and filters, as well as creation and retrieval of chat rooms. It is also used to retrieve the UI of the ChatFrame. SessionManager -- Contains the information about the current session, such as the server connected to, the handling of connection errors and notification of personal presence changes. SoundManager -- Used to play sounds. Event Handlers -- Spark contains numerous listeners and handlers to allow more pluggability into the Spark client. Some of the more common listeners and handlers are: ChatRoomListener (and ChatRoomListenerAdapter) -- Allows the plugin to listen for chat rooms being opened, closed and activated. You would generally use this to

文档评论(0)

1亿VIP精品文档

相关文档