亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sparkplug_dev_guide.html.svn-base

?? 開源項目openfire的完整源程序
?? SVN-BASE
?? 第 1 頁 / 共 3 頁
字號:
<html>
<head>
    <title>Sparkplug Development Guide</title>
    <link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="bannerbox">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tbody>
        <tr>
            <td width="99%" class="spring" title="Spark"></td>
            <td width="1%"><a href="spark" title="Developing Sparkplugs"><img src="images/banner-spark.gif" border="0" alt="Spark" /></a></td>
        </tr>
      </table>
</div>
<br/>
<h3>What Are Sparkplugs?</h3>

<p>Sparkplugs dynamically extend the features of the <a href="http://www.jivesoftware.org/spark">Spark</a> instant messaging client.
Use Sparkplugs to customize Spark for your business or organization or to add an innovative twist to instant messaging. The
extensive plugin API allows for complete client flexibility but is still simple and (we hope!) fun to use.</p>

<p>This guide provides a high level overview of the Sparkplug API and examples of several common client customizations. Or, jump
directly into the <a href="api/index.html">Javadocs</a>.
</p>

<h3>Once I Build It, Then What?</h3>
<p>After you've built your amazingly cool Sparkplug, it's easy to rollout to your users. Just have them drop it in the plugins directory of
their Spark installation. If your Sparkplug is generally useful, we hope you'll share it with the whole Spark community! To make your Sparkplug 
available via the <a href="http://www.jivesoftware.org/spark/sparkplugs">public repository</a> at jivesoftware.org, submit it to 
<a href="mailto:plugins@jivesoftware.org">plugins@jivesoftware.org</a>.</p>


<h3>Contents</h3>

This document contains the following information:
<ul>
<li><a href="#clientOverview">Overview of the Spark Client</a>
<li><a href="#overview">Overview of the Sparkplug API</a>
<li><a href="api/index.html">Sparkplug Javadocs</a>
<li><a href="#plugins">Structure Of A Plugin</a></li>
<li><a href="#gettingStarted">Getting started writing your first plugin</a></li>
<li><a href="#examples">Spark Examples and How-To's. Many examples of the most commonly asked questions when developing with Spark.</a>
</ul>

<h3><a id="clientOverview">Overview of the Spark Client</a></h3>
<p>
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.
</p>

<img src="images/contact-list.png" >
<br/>
<img src="images/chat-room.png">



<h3><a id="overview">Overview of the Spark API</a></h3>

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:
<ul>
<li>Several event listeners to either intercept, be informed of, or execute custom code in response to a particular IM event.
<li>Thorough tie-ins to the UI to allow for customization from simple icon changes, to adding buttons, to adding your own menu items.
<li>Ability to add your own XMPP functions using the SMACK API.
<li>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:
<ul>
<li> <a href="api/com/jivesoftware/spark/SparkManager.html">SparkManager</a> -- Acts as the central manager for all of Spark.  You use this manager to get instances of ChatManager, SessionManager, SoundManager, and UserManager.
<li> <a href="api/com/jivesoftware/spark/ChatManager.html">ChatManager</a> -- 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.
<li> <a href="api/com/jivesoftware/spark/SessionManager.html">SessionManager</a> -- Contains the information about the current session, such as the server connected to, the handling of connection errors and notification of personal presence changes.
<li> <a href="api/com/jivesoftware/spark/SoundManager.html">SoundManager</a> -- Used to play sounds.
</ul>
<li> 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:
<ul>
<li> <a href="api/com/jivesoftware/spark/ui/ChatRoomListener.html">ChatRoomListener</a> (and ChatRoomListenerAdapter) -- Allows the plugin to listen for chat rooms being opened, closed and activated. You would generally use this to customize individual chat rooms.


<li> <a href="api/com/jivesoftware/spark/ui/MessageListener.html">MessageListener</a> -- Allows for notification when a message has been received or sent.
<li> <a href="api/com/jivesoftware/spark/ui/ContactGroupListener.html">ContactGroupListener</a> -- Allows for notification of changes to a Contact Group.
<li> <a href="api/com/jivesoftware/spark/ui/ContactListListener.html">ContactListListener</a> -- Allows for notification of changes to the Contact List.
<li> <a href="api/com/jivesoftware/spark/plugin/impl/filetransfer/transfer/TransferListener.html">TransferListener</a> -- Allows you to intercept File transfers.
<li> <a href="api/com/jivesoftware/spark/plugin/ContextMenuListener.html">ContextMenuListener</a> -- Allows for the addition or removal of actions or menu items to right-click (context menu) popups.
<li> <a href="api/com/jivesoftware/spark/ui/PresenceListener.html">PresenceListener</a> -- Allows for notification when Spark presence changes.
<li> <a href="api/com/jivesoftware/spark/ui/ContactItemHandler.html">ContactItemHandler</a> -- Allows the plugin to control the effects of presence changes within a ContactItem and the associated invoke call.
</ul>
<li> Components -- Spark contains many Swing components that will regularly be used during the creation of your plugin.  Some of the more commonly used components are :
<ul>
<li> <a href="api/com/jivesoftware/MainWindow.html">MainWindow</a> -- The frame containing the Contact List. You use MainWindow to add new tabs, menu items, or force focus.
<li> <a href="api/com/jivesoftware/spark/ui/ChatRoom.html">ChatRoom</a> -- The base abstract class of all chat rooms within Spark. Known implementations are ChatRoomImpl and GroupChatRoom.
<li> <a href="api/com/jivesoftware/spark/ui/ChatArea.html">ChatArea</a> -- The base chat viewer for both the TranscriptWindow and ChatInputEditor.
<li> <a href="api/com/jivesoftware/spark/ui/ContactList.html">ContactList</a> -- The ContactList UI in Spark.
<li> <a href="api/com/jivesoftware/spark/ui/ChatRoomButton.html">ChatRoomButton</a> -- The button that should be used to conform to the look and feel of other buttons within a ChatRoom.
</ul>
</ul>

<h3><a id="plugins">Structure of a Plugin</a></h3>

<p>Plugins are shipped as compressed JAR (Java Archive) files. The files in a plugin archive are as follows:</p>

<fieldset>
    <legend>Plugin Structure</legend>
<pre>myplugin.jar!/
 |- plugin.xml     &lt;- Plugin definition file
 |- libs/          &lt;- Contains all the class archives needed to run this plugin.

</pre>
</fieldset>

<p>
The <tt>plugin.xml</tt> file specifies the main Plugin class. A sample
file might look like the following:
</p>

<fieldset>
    <legend>Sample plugin.xml</legend>
<pre class="xml">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

  <span class="comment">&lt;!-- Google Plugin Structure --&gt;</span>
      &lt;plugin&gt;
        &lt;name&gt;Google Desktop Plugin&lt;/name&gt;
        &lt;class&gt;com.examples.plugins.GooglePlugin&lt;/class&gt;
        &lt;author&gt;Derek DeMoro&lt;/author&gt;
        &lt;version&gt;1.0&lt;/version&gt;
        &lt;description&gt;Enables users to find files and emails relating to users using Google Desktop technology.&lt;/description&gt;
        &lt;email&gt;ddman@jivesoftware.com&lt;/email&gt;
      &lt;/plugin&gt;
</pre>
</fieldset>

<h3>Installing your Plugin</h3>

<p>
You only need to drop your newly created <tt>jar file</tt> into the plugins directory of your Spark client install.

</p>

<fieldset>
    <legend>Directory Structure</legend>
<pre>Spark/
 |- plugins/     &lt;- Put your Sparkplug jar file here
 |- lib/       &lt;- The main classes and libraries needed to run Live Assistant
 |- resources/ &lt;- Contains other supportive documents and libraries
 |- docs/ &lt;- Help Manuals and the JavaDoc to help you develop your own plugins.
</pre>
</fieldset>


<p>Your plugin class must implement the
<tt><a href="api/com/jivesoftware/spark/plugin/plugin.html">Plugin</a></tt>

interface from the <a href="api/index.html">Spark Client API</a>. The Plugin interface has
methods for initializing and shutting down the plugin.
</p>

<h2><a id="gettingStarted">Getting Started Writing Sparkplugs</a></h2>
<p>
In order to build your own Sparkplugs, you will need to setup your project properly to have all items in your classpath. 

With the Sparkplug.zip or Sparplug.tar.gz you have just extracted, you should see the following contents:

<fieldset>
    <legend>Directory Structure</legend> 
<pre>Sparkplugs/
 |- build/     &lt;- Simple structure to allow you to easily build your plugins using ANT.
 |- images/       &lt;-  Images used in this guide.
 |- plugin_development_guide.html/ &lt;- The complete development guide (this document).
 |- api/  &lt;- Contains the Sparkplug Javadocs.
 |- spark/ &lt;- The spark build structure you will need for classpath purposes
    |-bin    &lt;- Contacts the startup.bat which starts up Spark for testing.
    |-lib    &lt;- Contains all the archives needed to run Spark.
    |-logs   &lt;- Where all logs are stored.
    |-plugins &lt;- Location where all plugins should be deployed to.
    |-resources &lt;- Contains native libraries for running OS specific operations.
</pre>
</fieldset>

<p>
To setup a project to run Spark within your IDE, you will need to the following:
</p>

<ul>
<li>It is required that you use the <b>1.4 JRE</b> to build Spark. 
<li>Add all *.jar files in the Sparkplugs/spark/lib and Sparkplugs/spark/lib/windows directories to your classpath.
<li>Add the resource directory (Sparkplugins/spark/resource) to your classpath for the native libraries.</li>
<li>Main Class - com.jivesoftware.Spark
<li>VM Parameters - -Dplugin=path_to_your_plugin.xml file.  This allows you to run your plugins within your IDE without deploying.
<li>That's it. 

</ul>
<p>We have also provided a build structure to easily build and deploy your own plugins directly into your Spark test bed. To use, read the <a href="builder/how-to-build.txt">how-to-build.txt</a> file in the builder/ directory.</p>


<h3><a id="examples">Spark How-To's</a></h3>

<p>
All code samples can be found in the <a href="examples.jar">examples.jar</a> file located here.
</p>

<ul>
<li><a href="#simplePlugin">How do I create a simple plugin?</a>
<li><a href="#addTab">How do I add my own Tab to the Spark Workspace?</a>
<li><a href="#addContactListContextListener">How do I add a context menu listener to the contact list?</a>
<li><a href="#addChatRoomContextListener">How do I add my own ContextMenu Listener to a ChatRoom?</a>
<li><a href="#addMenu">How do I add my own Menu to Spark?</a>
<li><a href="#addButton">How do I add a button to a Chat Room?</a>
<li><a href="#addSearch">How do I add my own searching feature in Spark like the User Search or Google Search in Firefox?</a>
<li><a href="#interceptFile">How can I intercept a File Transfer request?</a>
<li><a href="#sendFile">How can I send a file to another user?</a>
<li><a href="#contactUI">How can I control the UI and event handling of a ContactItem?</a>
<li><a href="#changePresence">How can I be notified when the Spark user changes their presence?</a>
<li><a href="#messageFilter">How can I add a message filter?</a>
<li><a href="#createChatRoom">How can I create a person-to-person Chat Room?</a>
<li><a href="#createConferenceRoom">How can I create a public Conference room?</a>
<li><a href="#addPreferences">How can I add my own Preferences?</a>
<li><a href="#showAlert">How can I flash the chat frame, like when a new message comes in?</a>
</ul>

<h3 id="simplePlugin">How do I create a simple plugin?</h3>

<ol>
  <li>Implement Plugin.
</ol>

<fieldset>

    <legend>Simple Plugin</legend>
<pre class="java">
package com.jivesoftware.spark.examples;

import com.jivesoftware.spark.plugin.Plugin;

/**
 * Implements the Spark Plugin framework to display the different possibilities using
 * Spark.
 */
public class ExamplePlugin implements Plugin {

    /**
     * Called after Spark is loaded to initialize the new plugin.
     */
    public void initialize() {
        System.out.println("Welcome To Spark");

    }

    /**
     * Called when Spark is shutting down to allow for persistence of information
     * or releasing of resources.
     */
    public void shutdown() {

    }

    /**
     * Return true if the Spark can shutdown on users request.
     * @return true if Spark can shutdown on users request.
     */
    public boolean canShutDown() {
        return true;
    }

    /**
    * Is called when a user explicitly asked to uninstall this plugin.
    * The plugin owner is responsible to clean up any resources and
    * remove any components install in Spark.
    */
    public void uninstall(){
       // Remove all resources belonging to this plugin.
    }
}

</pre>
</fieldset>

<h3 id="addTab">How to add your own Tab to the Spark Workspace?</h3>

<ol>
  <li>Implement Plugin.
  <li>Retrieve the Workspace which is the UI for Spark.
  <li>Retrieve the WorkspacePane which is the Tabbed Pane used by Spark.
  <li>Add your own tab.
</ol>

<fieldset>

    <legend>Add a Tab to Spark</legend>
<pre class="java">
public class ExamplePlugin implements Plugin {
.
.
.
    /**
     * Adds a tab to Spark
     */
    private void addTabToSpark(){
         // Get Workspace UI from SparkManager
        Workspace workspace = SparkManager.getWorkspace();

        // Retrieve the Tabbed Pane from the WorkspaceUI.
        JTabbedPane tabbedPane = workspace.getWorkspacePane();

        // Add own Tab.
        tabbedPane.addTab("My Plugin", new JButton("Hello"));
    }
.
.
.
}
</pre>
</fieldset>

<h3 id="addContactListContextListener">How do I add a context menu listener to the contact list?</h3>

<ol>
  <li>Implement Plugin.
  <li>Retrieve the ContactList which is part of Spark's Workspace.
  <li>Add ContactListListener.
</ol>

<fieldset>

    <legend>Add a ContextMenu Listener to ContactList</legend>
<pre class="java">
  private void addContactListListener(){
         // Get Workspace UI from SparkManager
        Workspace workspace = SparkManager.getWorkspace();

        // Retrieve the ContactList from the Workspace
        ContactList contactList = workspace.getContactList();

        // Create an action to add to the Context Menu
        final Action sayHelloAction = new AbstractAction() {
            public void actionPerformed(ActionEvent actionEvent) {
                JOptionPane.showMessageDialog(SparkManager.getMainWindow(), "Welcome to Spark");
            }
        };

        sayHelloAction.putValue(Action.NAME, "Say Hello To Me");


        // Add own Tab.
        contactList.addContextMenuListener(new ContextMenuListener() {
            public void poppingUp(Object object, JPopupMenu popup) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕二三区不卡| 亚洲一区在线观看网站| 精品蜜桃在线看| 91精品国产综合久久精品app| 色猫猫国产区一区二在线视频| 成人激情黄色小说| 成人app下载| 不卡在线观看av| 99精品热视频| 91高清在线观看| 欧美人牲a欧美精品| 欧美一级一区二区| 精品国产一区二区三区四区四| 久久久一区二区| 国产精品麻豆欧美日韩ww| 国产精品成人免费| 亚洲色图.com| 亚洲第一狼人社区| 蜜桃精品视频在线| 国产精品自在在线| 成人动漫一区二区在线| 色琪琪一区二区三区亚洲区| 欧美在线观看你懂的| 337p亚洲精品色噜噜| 精品盗摄一区二区三区| 国产喂奶挤奶一区二区三区| 亚洲欧洲三级电影| 亚洲精品视频观看| 日本sm残虐另类| 国产高清视频一区| 色婷婷精品大视频在线蜜桃视频| 欧美综合在线视频| 欧美草草影院在线视频| 国产精品视频观看| 亚洲一区二区三区国产| 精品一区二区三区视频| 99热国产精品| 91麻豆精品国产综合久久久久久| 精品国产乱码久久久久久老虎| 国产精品视频你懂的| 亚洲成人综合视频| 国产成人精品免费网站| 欧美亚州韩日在线看免费版国语版| 91精品福利在线一区二区三区| 国产欧美精品在线观看| 亚洲大片精品永久免费| 国产日韩欧美麻豆| 欧美大片日本大片免费观看| 亚洲国产岛国毛片在线| 亚洲成人av在线电影| 国产一区二区三区综合| 日本韩国欧美国产| 久久综合久久久久88| 一区二区在线看| 国精品**一区二区三区在线蜜桃| 在线一区二区观看| 久久先锋资源网| 亚洲国产成人porn| 成人激情动漫在线观看| 欧美大尺度电影在线| 一区二区三区视频在线看| 国产一区不卡视频| 在线不卡欧美精品一区二区三区| 国产农村妇女精品| 美女视频黄频大全不卡视频在线播放| 91色porny在线视频| 26uuu国产电影一区二区| 亚洲电影一级黄| 91美女片黄在线观看91美女| 久久亚洲免费视频| 日韩**一区毛片| 在线视频国内自拍亚洲视频| 亚洲国产成人在线| 国产专区欧美精品| 欧美一区二区三级| 亚洲一区av在线| 99re热这里只有精品视频| 久久综合五月天婷婷伊人| 日本中文字幕一区| 欧美性猛交xxxxxx富婆| 亚洲女同一区二区| 成人动漫一区二区三区| 精品免费视频.| 人人爽香蕉精品| 欧美午夜一区二区三区免费大片| 欧美韩国一区二区| 国产一区二区三区在线观看免费视频| 91麻豆精品国产无毒不卡在线观看 | 美女精品自拍一二三四| 欧美色网站导航| 亚洲综合免费观看高清完整版 | 精品va天堂亚洲国产| 日韩精品一二三| 欧美三级电影网| 亚洲一区二区在线免费看| 99在线精品观看| 亚洲欧洲日产国产综合网| 国产乱码一区二区三区| 日韩欧美激情四射| 亚洲成人免费影院| 欧洲亚洲精品在线| 亚洲精选在线视频| 99视频一区二区三区| 中文一区二区在线观看| 国产成人一级电影| 精品少妇一区二区| 久久成人久久鬼色| 欧美一区二区女人| 麻豆成人久久精品二区三区红 | 日本韩国一区二区| 一区二区国产视频| 色视频欧美一区二区三区| 亚洲午夜久久久久久久久电影网 | 亚洲自拍偷拍图区| 欧美日韩高清在线播放| 人人狠狠综合久久亚洲| 欧美成人精精品一区二区频| 国产乱码精品一区二区三区五月婷| 久久这里只精品最新地址| 丁香桃色午夜亚洲一区二区三区| 国产精品蜜臀av| 91日韩在线专区| 视频一区国产视频| 精品国产成人系列| 丁香婷婷深情五月亚洲| 亚洲男人的天堂av| 欧美高清hd18日本| 国产一区二区在线免费观看| 国产欧美日韩三级| 色婷婷香蕉在线一区二区| 亚洲电影中文字幕在线观看| 日韩欧美国产高清| 成人午夜视频在线观看| 亚洲一区在线观看免费| 日韩精品一区二区三区四区视频 | 色哟哟一区二区三区| 日本怡春院一区二区| 久久精品欧美一区二区三区不卡 | 在线免费av一区| 麻豆国产欧美一区二区三区| 国产欧美一区视频| 欧美三级韩国三级日本三斤| 老司机午夜精品| 亚洲视频综合在线| 欧美一区二区三区思思人| 国产成人在线视频网站| 亚洲午夜电影网| 久久久精品tv| 欧美日韩黄色一区二区| 国产成人av影院| 一区二区日韩av| 久久精品视频在线免费观看| 欧美日韩一区二区三区高清| 国产一区二区美女诱惑| 一级精品视频在线观看宜春院| 日韩亚洲欧美一区| 色呦呦日韩精品| 国产在线播放一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了 | 日本在线不卡视频| 18涩涩午夜精品.www| 日韩一级精品视频在线观看| 91丝袜美腿高跟国产极品老师| 另类小说欧美激情| 亚洲国产中文字幕在线视频综合| 久久久一区二区| 91精品国产福利在线观看| 99久久婷婷国产| 韩国精品主播一区二区在线观看 | 天堂久久久久va久久久久| 中文字幕欧美三区| 日韩免费视频线观看| 欧美亚洲图片小说| 成人美女在线视频| 九九热在线视频观看这里只有精品| 一区二区三区四区不卡视频| 国产日韩欧美一区二区三区乱码| 制服.丝袜.亚洲.另类.中文| 色偷偷成人一区二区三区91| 国产成人午夜高潮毛片| 蜜臀av性久久久久蜜臀aⅴ流畅| 一区二区成人在线| 亚洲特黄一级片| 国产精品美女久久久久久久| 久久九九久精品国产免费直播| 欧美日韩aaaaaa| 欧日韩精品视频| 91精品福利视频| 91视频在线看| 成人动漫一区二区在线| 高清beeg欧美| 国产成人精品影视| 国产麻豆9l精品三级站| 另类小说视频一区二区| 亚洲6080在线| 亚洲国产综合在线| 亚洲成人自拍偷拍| 亚洲成a人在线观看| 亚洲综合一区二区精品导航| 一区二区在线免费观看|