Search in sources :

Example 1 with EzyPluginEntry

use of com.tvd12.ezyfoxserver.ext.EzyPluginEntry in project ezyfox-server by youngmonkeys.

the class EzyPluginsStarter method startPlugin.

protected EzyPluginEntry startPlugin(String pluginName, EzyPluginEntryLoader loader) throws Exception {
    EzyPluginEntry entry = loader.load();
    entry.config(getPluginContext(pluginName));
    entry.start();
    return entry;
}
Also used : EzyPluginEntry(com.tvd12.ezyfoxserver.ext.EzyPluginEntry)

Example 2 with EzyPluginEntry

use of com.tvd12.ezyfoxserver.ext.EzyPluginEntry in project ezyfox-server by youngmonkeys.

the class EzyPluginsStarter method startPlugin.

protected void startPlugin(String pluginName) {
    try {
        logger.debug("plugin: {} loading...", pluginName);
        EzyPluginContext context = zoneContext.getPluginContext(pluginName);
        EzyPlugin plugin = context.getPlugin();
        EzyPluginEntry entry = startPlugin(pluginName, newPluginEntryLoader(pluginName));
        ((EzyEntryAware) plugin).setEntry(entry);
        logger.debug("plugin: {} loaded", pluginName);
    } catch (Exception e) {
        logger.error("can not start plugin: {}", pluginName, e);
    }
}
Also used : EzyPluginContext(com.tvd12.ezyfoxserver.context.EzyPluginContext) EzyEntryAware(com.tvd12.ezyfoxserver.ext.EzyEntryAware) EzyPluginEntry(com.tvd12.ezyfoxserver.ext.EzyPluginEntry)

Aggregations

EzyPluginEntry (com.tvd12.ezyfoxserver.ext.EzyPluginEntry)2 EzyPluginContext (com.tvd12.ezyfoxserver.context.EzyPluginContext)1 EzyEntryAware (com.tvd12.ezyfoxserver.ext.EzyEntryAware)1