tigase component (1)

20259 단어 tigase
본문  http://www.tigase.org/content/basic-information 다음은 새로운 Component 를 만 들 려 면 관심 을 가 져 야 할 인터페이스 목록 입 니 다.
tigase.server.ServerComponent – 이것 은 매우 기본 적 인 component 인터페이스 다.모든 component 는 인터페이스 에서 정 의 된 방법 을 실현 해 야 합 니 다
/**
 * Interface ServerComponent
 *           MessageRouter  .
 *    MessageRouter             。
 */
public interface ServerComponent {
 void setName(String name);
 String getName();

 JID getComponentId();
 void release();
 /**
  * processPacket   components           .
  *       packet             results
  *
  */
 void processPacket(Packet packet, Queue results);
 void initializationCompleted();
}

tigase.server.MessageReceiver – 이 인터페이스 extends ServerComponent, 데이터 패 킷 을 받 기 를 원 하 는 모든 Component 는 인터페이스 에서 정 의 된 방법, 예 를 들 어 session manager 와 c2s connection manager 를 실현 해 야 합 니 다
/**
 * Interface MessageReceiver
 *              ,                    。
 *    MessageRouter            。
 */
public interface MessageReceiver extends ServerComponent {
 /**
  *         
  *
  * @param packet a Packet value
  * @return   packet      ,  true。      false
  */
boolean addPacket(Packet packet);
boolean addPacketNB(Packet packet);
boolean addPackets(Queue packets);
BareJID getDefHostName();
boolean isInRegexRoutings(String address);
void setParent(MessageReceiver msg_rec);
void start();}

tigase.conf.Configurable – components 가 설정 되 기 를 원한 다 면 이 인 터 페 이 스 를 실현 해 야 합 니 다.실행 할 때 설정 정 보 는 이러한 유형의 대상 으로 추 가 됩 니 다.components 는 실행 할 때 변 경 된 설정 항목 을 처리 할 수 있어 야 합 니 다. 이 점 은 실현 할 때 주의해 야 합 니 다
/**
 * Interface Configurable
 *
 *                   。  Tigase                。
 *                   。                 。
 */
public interface Configurable extends ServerComponent {
 /**
  *    GEN_CONFIG           .
  */
public static final String GEN_CONFIG = "--gen-config";
 /**
  *    GEN_CONFIG_ALL            components        .
  */
public static final String GEN_CONFIG_ALL = GEN_CONFIG + "-all";
 /**
  *    GEN_CONFIG_SM  session manager        ,
  *              “  ClientConnectionMananger     ”
  * XEP-0114 component        。
  */
public static final String GEN_CONFIG_SM = GEN_CONFIG + "-sm";
 /**
  *    GEN_CONFIG_CS   ClientConnectionManager         。
  *              “  SessionManager     ”
  *  XEP-0114 component        。
  */
public static final String GEN_CONFIG_CS = GEN_CONFIG + "-cs";
 /**
  *    GEN_CONFIG_DEF   SessionManager,ClientConnectionManager
  *  ServerConnectionManager         。
  */
public static final String GEN_CONFIG_DEF = GEN_CONFIG + "-default";

public static final String GEN_CONFIG_COMP = GEN_CONFIG + "-comp";
 /**
  *    CLUSTER_MODE         ,true   false
  *       CLUSTER_MODE   false
  */
public static final String CLUSTER_MODE = "--cluster-mode";
 /**
  *    CLUSTER_NODES             
  */
public static final String CLUSTER_NODES = "--cluster-nodes";
 /** Field description */
public static final String CLUSTER_LISTEN = "cluster-listen";
 /** Field description */
public static final String CLUSTER_CONECT = "cluster-connect";
 /** Field description */
public static final String GEN_CONF = "--gen-";
 /** Field description */
public static final String GEN_TEST = "--test";
 /** Field description */
public static final String GEN_COMP_NAME = "--comp-name";
 /** Field description */
public static final String GEN_COMP_CLASS = "--comp-class";
 /** Field description */
public static final String GEN_EXT_COMP = "--ext-comp";
 /** Field description */
public static final String GEN_USER_DB = "--user-db";
 /** Field description */
public static final String USER_REPO_POOL_CLASS = "--user-repo-pool";
 /** Field description */
public static final String USER_DOMAIN_POOL_CLASS = "--user-domain-repo-pool";
 /** Field description */
public static final String GEN_AUTH_DB = "--auth-db";
 /** Field description */
public static final String AUTH_REPO_POOL_CLASS = "--auth-repo-pool";
 /** Field description */
public static final String AUTH_DOMAIN_POOL_CLASS = "--auth-domain-repo-pool";
 /** Field description */
public static final String GEN_USER_DB_URI_PROP_KEY = "user-db-uri";
 /** Field description */
public static final String GEN_USER_DB_URI = "--" + GEN_USER_DB_URI_PROP_KEY;
 /** Field description */
public static final String GEN_AUTH_DB_URI = "--auth-db-uri";
 /** Field description */
public static final String GEN_ADMINS = "--admins";
 /** Field description */
public static final String GEN_TRUSTED = "--trusted";
 /** Field description */
public static final String GEN_VIRT_HOSTS = "--virt-hosts";
 /** Field description */
public static final String GEN_SM_PLUGINS = "--sm-plugins";
 /** Field description */
public static final String GEN_DEBUG = "--debug";
 /** Field description */
public static final String GEN_DEBUG_PACKAGES = "--debug-packages";
 /** Field description */
public static final String GEN_MAX_QUEUE_SIZE = "--max-queue-size";
 /** Field description */
public static final String GEN_SCRIPT_DIR = "--script-dir";
 /** Field description */
public static final String GEN_SREC_DB = "--gen-srec-db";
 /** Field description */
public static final String GEN_SREC_DB_URI = "--gen-srec-db-uri";
 /** Field description */
public static final String GEN_SREC_ADMINS = "--gen-srec-admins";
 /** Field description */
public static final String MONITORING = "--monitoring";
 /** Field description */
public static final String USER_REPO_POOL_SIZE = "--user-repo-pool-size";
 /** Field description */
public static final String STRINGPREP_PROCESSOR = "--stringprep-processor";
 /** Field description */
public static final String XML_REPO_CLASS_PROP_VAL = "tigase.db.xml.XMLRepository";
 /** Field description */
public static final String MYSQL_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.JDBCRepository";
 /** Field description */
public static final String DERBY_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.JDBCRepository";
 /** Field description */
public static final String PGSQL_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.JDBCRepository";
 /** Field description */
public static final String TIGASE_AUTH_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.TigaseAuth";
 /** Field description */
public static final String TIGASE_CUSTOM_AUTH_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.TigaseCustomAuth";
 /** Field description */
public static final String DRUPALWP_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.DrupalWPAuth";
 /** Field description */
public static final String LIBRESOURCE_REPO_CLASS_PROP_VAL = "tigase.db.jdbc.LibreSourceAuth";
 /** Field description */
public static final String SHARED_USER_REPO_PROP_KEY = "shared-user-repo";
 /** Field description */
public static final String SHARED_USER_REPO_PARAMS_PROP_KEY = "shared-user-repo-params";
 /** Field description */
public static final String SHARED_AUTH_REPO_PROP_KEY = "shared-auth-repo";
 /** Field description */
public static final String SHARED_AUTH_REPO_PARAMS_PROP_KEY = "shared-auth-repo-params";
 /** Field description */
public static final String XML_REPO_URL_PROP_VAL = "user-repository.xml";
 /** Field description */
public static final String MYSQL_REPO_URL_PROP_VAL ="jdbc:mysql://localhost/tigase?user=root&password=mypass";
 /** Field description */
public static final String DERBY_REPO_URL_PROP_VAL = "jdbc:derby:tigase-derbydb;create=true";
 /** Field description */
public static final String PGSQL_REPO_URL_PROP_VAL = "jdbc:postgresql://localhost/tigase?user=tigase";
 /** Field description */
public static final String TIGASE_AUTH_REPO_URL_PROP_VAL = "jdbc:mysql://localhost/tigasedb?user=tigase_user&password=mypass";
 /** Field description */
public static final String DRUPAL_REPO_URL_PROP_VAL = "jdbc:mysql://localhost/drupal?user=root&password=mypass";
 /** Field description */
public static final String LIBRESOURCE_REPO_URL_PROP_VAL = "jdbc:postgresql://localhost/libresource?user=demo";
 /** Field description */
public static final String DEF_SM_NAME = "sess-man";
 /** Field description */
public static final String DEF_MONITOR_NAME = "monitor";
 /** Field description */
public static final String DEF_C2S_NAME = "c2s";
 /** Field description */
public static final String DEF_S2S_NAME = "s2s";
 /** Field description */
public static final String DEF_EXT_COMP_NAME = "ext-comp";
 /** Field description */
public static final String DEF_COMP_PROT_NAME = "ext";
 /** Field description */
public static final String DEF_CL_COMP_NAME = "cl-comp";
 /** Field description */
public static final String DEF_SSEND_NAME = "ssend";
 /** Field description */
public static final String DEF_SRECV_NAME = "srecv";
 /** Field description */
public static final String DEF_BOSH_NAME = "bosh";
 /** Field description */
public static final String DEF_STATS_NAME = "stats";
 /** Field description */
public static final String DEF_CLUST_CONTR_NAME = "cluster-contr";
 /** Field description */
public static final String DEF_VHOST_MAN_NAME = "vhost-man";
 /** Field description */
public static final String ROUTER_COMP_CLASS_NAME = "tigase.server.MessageRouter";
 /** Field description */
public static final String C2S_COMP_CLASS_NAME = "tigase.server.xmppclient.ClientConnectionManager";
 /** Field description */
public static final String C2S_CLUST_COMP_CLASS_NAME = "tigase.cluster.ClientConnectionClustered";
 /** Field description */
public static final String S2S_COMP_CLASS_NAME = "tigase.server.xmppserver.S2SConnectionManager";
 /** Field description */
public static final String S2S_CLUST_COMP_CLASS_NAME = "tigase.cluster.S2SConnectionClustered";
 /** Field description */
public static final String SM_COMP_CLASS_NAME = "tigase.server.xmppsession.SessionManager";
 /** Field description */
public static final String SM_CLUST_COMP_CLASS_NAME = "tigase.cluster.SessionManagerClustered";
 /** Field description */
public static final String EXT_COMP_CLASS_NAME = "tigase.server.xmppcomponent.ComponentConnectionManager";
 /** Field description */
public static final String MONITOR_CLASS_NAME = "tigase.server.monitor.MonitorComponent";
 /** Field description */
public static final String MONITOR_CLUST_CLASS_NAME = "tigase.server.monitor.MonitorClustered";
 /** Field description */
public static final String COMP_PROT_CLASS_NAME = "tigase.server.ext.ComponentProtocol";
 /** Field description */
public static final String CL_COMP_CLASS_NAME = "tigase.cluster.ClusterConnectionManager";
 /** Field description */
public static final String SSEND_COMP_CLASS_NAME = "tigase.server.ssender.StanzaSender";
 /** Field description */
public static final String SRECV_COMP_CLASS_NAME = "tigase.server.sreceiver.StanzaReceiver";
 /** Field description */
public static final String BOSH_COMP_CLASS_NAME = "tigase.server.bosh.BoshConnectionManager";
 /** Field description */
public static final String STATS_CLASS_NAME = "tigase.stats.StatisticsCollector";
 /** Field description */
public static final String CLUSTER_CONTR_CLASS_NAME = "tigase.cluster.ClusterController";
 /** Field description */
public static final String VHOST_MAN_CLASS_NAME = "tigase.vhosts.VHostManager";
 /** Field description */
public static final String USER_REPO_URL_PROP_KEY = "user-repo-url";
 /** Field description */
public static final String USER_REPO_PARAMS_NODE = "user-repo-params";
 /** Field description */
public static final String USER_REPO_POOL_SIZE_PROP_KEY = "user-repo-pool-size";
 /** Field description */
public static final String USER_REPO_DOMAINS_PROP_KEY = "user-repo-domains";
 /** Field description */
public static final String AUTH_REPO_DOMAINS_PROP_KEY = "auth-repo-domains";
 /** Field description */
public static final String AUTH_REPO_URL_PROP_KEY = "auth-repo-url";
 /** Field description */
public static final String AUTH_REPO_PARAMS_NODE = "auth-repo-params";
 /** Field description */
public static final String HOSTNAMES_PROP_KEY = "hostnames";
 /** Field description */
public static final String ADMINS_PROP_KEY = "admins";
 /** Field description */
public static final String TRUSTED_PROP_KEY = "trusted";
 /** Field description */
public static final String DEF_HOSTNAME_PROP_KEY = "def-hostname";
 /** Field description */
public static final String COMPONENT_ID_PROP_KEY = "component-id";
 /** Field description */
public static final String CLUSTER_NODES_PROP_KEY = "cluster-nodes";
 //~--- get methods ----------------------------------------------------------
 /**
   *            
   * @param params
   * @return
   */
Map getDefaults(Map params);
 //~--- set methods ----------------------------------------------------------
 /**
   *         
   * @param properties
   */
void setProperties(Map properties);
}

tigase.disco.XMPPService – 이 대상 의 클래스 를 실현 하면 'ServiceDiscovery' 요청 에 응답 할 수 있 습 니 다
/**
 * Interface XMPPService
 * <p/>
 *              “ServiceDiscovery”      。
 * ManagerRouter     “ServiceDiscovery”  
 */
public interface XMPPService extends ServerComponent {

    /**
     *            xmlns     
     */
    public static final String INFO_XMLNS =
            "http://jabber.org/protocol/disco#info";
    /**
     *            xmlns     
     */
    public static final String ITEMS_XMLNS =
            "http://jabber.org/protocol/disco#items";
    /**
     *                    
     */
    public static final String[] DEF_FEATURES = {INFO_XMLNS, ITEMS_XMLNS};
    /**
     * A convenience constant with component features related to ad-hoc commands.
     */
    public static final String[] CMD_FEATURES =
            {
                    "http://jabber.org/protocol/commands", "jabber:x:data"};

    /**
     *  component        。  jid null,    top level       。
     * SessionMananger    top level       ,  component  。
     *
     * @param node          ,   null,   top level       
     * @param jid            ,“    ”
     * @param from           . “   ”。                  
     * @return returns    XML            
     */
    Element getDiscoInfo(String node, JID jid, JID from);

    /**
     *  component        。   jid  ,   top level       ,
     * SessionMananger    top level       ,  component   null。
     *
     * @param node          
     * @param jid            ,“    ”
     * @param from           . “   ”。                  
     * @return            ,  top level  ,  component         
     */
    List<Element> getDiscoItems(String node, JID jid, JID from);

    /**
     *   top level       
     *
     * @param from         。                   ,
     *               component                  ,        。
     * @return         
     */
    List<Element> getDiscoFeatures(JID from);

}

tigase.stats.StatisticsContainer – 이 대상 의 클래스 가 실 행 될 때의 통계 정 보 를 되 돌 릴 수 있 도록 실현 되 었 다.모든 대상 이 이 인 터 페 이 스 를 실현 하여 통계 정 보 를 수집 할 수 있다.

좋은 웹페이지 즐겨찾기