• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java JiveLiveProperties类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.jivesoftware.xmpp.workgroup.spi.JiveLiveProperties的典型用法代码示例。如果您正苦于以下问题:Java JiveLiveProperties类的具体用法?Java JiveLiveProperties怎么用?Java JiveLiveProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

JiveLiveProperties类属于org.jivesoftware.xmpp.workgroup.spi包,在下文中一共展示了JiveLiveProperties类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: RoundRobinDispatcher

点赞 3

import org.jivesoftware.xmpp.workgroup.spi.JiveLiveProperties; //导入依赖的package包/类
/**
 * Creates a new dispatcher for the queue. The dispatcher will have a Timer with a unique task
 * that will get the requests from the queue and will try to send an offer to the agents.
 *
 * @param queue the queue that contains the requests and the agents that may attend the
 *        requests.
 */
public RoundRobinDispatcher(RequestQueue queue) {
    this.queue = queue;
    agentList = new LinkedList<AgentSession>();
    properties = new JiveLiveProperties("fpDispatcherProp", queue.getID());
    try {
        info = infoProvider.getDispatcherInfo(queue.getWorkgroup(), queue.getID());
    }
    catch (NotFoundException e) {
        Log.error("Queue ID " + queue.getID(), e);
    }
    // Recreate the agentSelector to use for selecting the best agent to receive the offer
    loadAgentSelector();

    // Fill the list of AgentSessions that are active in the queue.  Once the list has been
    // filled this dispatcher will be notified when new AgentSessions join the queue or leave
    // the queue
    fillAgentsList();

    TaskEngine.getInstance().scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            checkForNewRequests();
        }
    }, 2000, 2000);
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:33,
代码来源:RoundRobinDispatcher.java

示例2: RoundRobinDispatcher

点赞 3

import org.jivesoftware.xmpp.workgroup.spi.JiveLiveProperties; //导入依赖的package包/类
/**
  * Creates a new dispatcher for the queue. The dispatcher will have a Timer with a unique task
  * that will get the requests from the queue and will try to send an offer to the agents.
  *
  * @param queue the queue that contains the requests and the agents that may attend the
  *        requests.
  */
 public RoundRobinDispatcher(RequestQueue queue) {
     this.queue = queue;
     agentList = new LinkedList<AgentSession>();
     properties = new JiveLiveProperties("fpDispatcherProp", queue.getID());
     try {
         info = infoProvider.getDispatcherInfo(queue.getWorkgroup(), queue.getID());
     }
     catch (NotFoundException e) {
         Log.error("Queue ID " + queue.getID(), e);
     }
     // Recreate the agentSelector to use for selecting the best agent to receive the offer
     loadAgentSelector();

     // Fill the list of AgentSessions that are active in the queue.  Once the list has been
     // filled this dispatcher will be notified when new AgentSessions join the queue or leave
     // the queue
     fillAgentsList();

     TaskEngine.getInstance().scheduleAtFixedRate(new TimerTask() {
         @Override
public void run() {
             checkForNewRequests();
         }
     }, 2000, 2000);
 }
 

开发者ID:coodeer,
项目名称:g3server,
代码行数:33,
代码来源:RoundRobinDispatcher.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)