All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.iohao.game.bolt.broker.client.external.ExternalHelper Maven / Gradle / Ivy

There is a newer version: 17.1.61
Show newest version
/*
 * ioGame
 * Copyright (C) 2021 - 2023  渔民小镇 ([email protected][email protected]) . All Rights Reserved.
 * # iohao.com . 渔民小镇
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package com.iohao.game.bolt.broker.client.external;

import com.iohao.game.action.skeleton.core.commumication.BrokerClientContext;
import com.iohao.game.bolt.broker.core.client.BrokerClient;

/**
 * 对外服 BrokerClient 的引用持有
 *
 * @author 渔民小镇
 * @date 2022-05-18
 */
public class ExternalHelper {
    BrokerClient brokerClient;

    public BrokerClientContext getBrokerClient() {
        return this.brokerClient;
    }

    private ExternalHelper() {
    }

    public static ExternalHelper me() {
        return Holder.ME;
    }

    /** 通过 JVM 的类加载机制, 保证只加载一次 (singleton) */
    private static class Holder {
        static final ExternalHelper ME = new ExternalHelper();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy