当前位置: 首页>>代码示例>>Java>>正文


Java ReconnectStrategy类代码示例

本文整理汇总了Java中com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy的典型用法代码示例。如果您正苦于以下问题:Java ReconnectStrategy类的具体用法?Java ReconnectStrategy怎么用?Java ReconnectStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ReconnectStrategy类属于com.github.theholywaffle.teamspeak3.api.reconnect包,在下文中一共展示了ReconnectStrategy类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy; //导入依赖的package包/类
void initialize() {
    this.config.setConnectionHandler(new SprummlbotConnectionHandler());
    this.config.setReconnectStrategy(ReconnectStrategy.exponentialBackoff());

    // Pre-connect initialization
    switch (Vars.DEBUG) {
        case 1:
            config.setDebugLevel(Level.WARNING);
            break;

        case 2:
            config.setDebugLevel(Level.ALL);
            break;

        default:
            config.setDebugLevel(Level.OFF);
            break;
    }

    if (Vars.DYNBANNER_ENABLED) {
        try {
            System.out.println("[Dynamic Banner] Initializing Dynamic Banner...");
            if (!Vars.DYNBANNER_FILE.exists())
                Exceptions.handle(new FileNotFoundException("Banner file doesnt exist"),
                        "Banner File doesn't exist", true);
            Vars.DYNBANNER = new DynamicBanner(Vars.DYNBANNER_FILE, Vars.DYNBANNER_COLOR,
                    Vars.DYNBANNER_FONT);
        } catch (IOException e) {
            Exceptions.handle(e, "Error while initializing Dynamic Banner");
        }
    }

    query = new TS3Query(config);
    query.connect();

    //Post connect initialization
    Events.start();
}
 
开发者ID:Scrumplex,项目名称:Sprummlbot,代码行数:39,代码来源:TS3Connection.java

示例2: setReconnectStrategy

import com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy; //导入依赖的package包/类
public TS3Config setReconnectStrategy(ReconnectStrategy reconnectStrategy) {
	if (reconnectStrategy == null) throw new NullPointerException("reconnectStrategy cannot be null!");
	this.reconnectStrategy = reconnectStrategy;
	return this;
}
 
开发者ID:DiscowZombie,项目名称:UltimateTs,代码行数:6,代码来源:TS3Config.java

示例3: getReconnectStrategy

import com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy; //导入依赖的package包/类
ReconnectStrategy getReconnectStrategy() {
	return reconnectStrategy;
}
 
开发者ID:DiscowZombie,项目名称:UltimateTs,代码行数:4,代码来源:TS3Config.java

示例4: setReconnectStrategy

import com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy; //导入依赖的package包/类
public TS3Config setReconnectStrategy(ReconnectStrategy reconnectStrategy) {
	if (reconnectStrategy == null) throw new IllegalArgumentException("reconnectStrategy cannot be null!");
	this.reconnectStrategy = reconnectStrategy;
	return this;
}
 
开发者ID:TheHolyWaffle,项目名称:TeamSpeak-3-Java-API,代码行数:6,代码来源:TS3Config.java


注:本文中的com.github.theholywaffle.teamspeak3.api.reconnect.ReconnectStrategy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。