本文整理了Java中io.gravitee.plugin.core.api.Plugin.dependencies()
方法的一些代码示例,展示了Plugin.dependencies()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.dependencies()
方法的具体详情如下:
包路径:io.gravitee.plugin.core.api.Plugin
类名称:Plugin
方法名:dependencies
暂无
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-policy
@Override
public URL[] dependencies() {
return plugin.dependencies();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-service-discovery
@Override
public URL[] dependencies() {
return plugin.dependencies();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-fetcher
@Override
public URL[] dependencies() {
return plugin.dependencies();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-resource
@Override
public URL[] dependencies() {
return plugin.dependencies();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-fetcher
@Override
public void handle(Plugin plugin) {
try {
URLClassLoader fetcherClassLoader = new URLClassLoader(plugin.dependencies(),
this.getClass().getClassLoader());
Class<?> pluginClass = ClassUtils.forName(plugin.clazz(), fetcherClassLoader);
LOGGER.info("Register a new fetcher: {} [{}]", plugin.id(), pluginClass.getName());
FetcherPluginImpl fetcher = new FetcherPluginImpl(plugin, pluginClass);
fetcher.setConfiguration(new FetcherConfigurationClassFinder().lookupFirst(pluginClass, fetcherClassLoader));
fetcherPluginManager.register(fetcher);
} catch (Exception iae) {
LOGGER.error("Unexpected error while creating fetcher instance", iae);
}
}
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-service-discovery
@Override
public void handle(Plugin plugin) {
URLClassLoader serviceDiscoveryClassLoader = null;
try {
serviceDiscoveryClassLoader = new URLClassLoader(plugin.dependencies(),
this.getClass().getClassLoader());
Class<?> pluginClass = ClassUtils.forName(plugin.clazz(), serviceDiscoveryClassLoader);
LOGGER.info("Register a new service discovery: {} [{}]", plugin.id(), pluginClass.getName());
ServiceDiscoveryPluginImpl serviceDiscovery = new ServiceDiscoveryPluginImpl(plugin, pluginClass);
serviceDiscovery.setConfiguration(new ServiceDiscoveryConfigurationClassFinder().lookupFirst(pluginClass, serviceDiscoveryClassLoader));
serviceDiscoveryPluginManager.register(serviceDiscovery);
} catch (Exception iae) {
LOGGER.error("Unexpected error while creating service discovery instance", iae);
}
}
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-policy
@Override
public void handle(Plugin plugin) {
URLClassLoader policyClassLoader = null;
try {
policyClassLoader = new URLClassLoader(plugin.dependencies(),
this.getClass().getClassLoader());
Class<?> pluginClass = ClassUtils.forName(plugin.clazz(), policyClassLoader);
LOGGER.info("Register a new policy: {} [{}]", plugin.id(), pluginClass.getName());
PolicyPluginImpl policy = new PolicyPluginImpl(plugin, pluginClass);
policy.setConfiguration(new PolicyConfigurationClassFinder().lookupFirst(pluginClass, policyClassLoader));
policyPluginManager.register(policy);
} catch (Exception iae) {
LOGGER.error("Unexpected error while creating policy instance", iae);
} finally {
if (policyClassLoader != null) {
try {
policyClassLoader.close();
} catch (IOException e) {
}
}
}
}
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-resource
@Override
public void handle(Plugin plugin) {
URLClassLoader resourceClassLoader = null;
try {
resourceClassLoader = new URLClassLoader(plugin.dependencies(),
this.getClass().getClassLoader());
Class<?> pluginClass = ClassUtils.forName(plugin.clazz(), resourceClassLoader);
LOGGER.info("Register a new resource: {} [{}]", plugin.id(), pluginClass.getName());
ResourcePluginImpl resource = new ResourcePluginImpl(plugin, pluginClass);
resource.setConfiguration(new ResourceConfigurationClassFinder().lookupFirst(pluginClass, resourceClassLoader));
resourcePluginManager.register(resource);
} catch (Exception iae) {
LOGGER.error("Unexpected error while creating resource instance", iae);
} finally {
if (resourceClassLoader != null) {
try {
resourceClassLoader.close();
} catch (IOException e) {
}
}
}
}
}
代码示例来源:origin: gravitee-io/gravitee-management-rest-api
private FetcherEntity convert(FetcherPlugin fetcherPlugin, boolean withPlugin) {
FetcherEntity entity = new FetcherEntity();
entity.setId(fetcherPlugin.id());
entity.setDescription(fetcherPlugin.manifest().description());
entity.setName(fetcherPlugin.manifest().name());
entity.setVersion(fetcherPlugin.manifest().version());
if (withPlugin) {
// Plugin information
Plugin plugin = fetcherPlugin;
PluginEntity pluginEntity = new PluginEntity();
pluginEntity.setPlugin(plugin.clazz());
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
entity.setPlugin(pluginEntity);
}
return entity;
}
}
代码示例来源:origin: io.gravitee.management/gravitee-management-api-service
private FetcherEntity convert(FetcherPlugin fetcherPlugin, boolean withPlugin) {
FetcherEntity entity = new FetcherEntity();
entity.setId(fetcherPlugin.id());
entity.setDescription(fetcherPlugin.manifest().description());
entity.setName(fetcherPlugin.manifest().name());
entity.setVersion(fetcherPlugin.manifest().version());
if (withPlugin) {
// Plugin information
Plugin plugin = fetcherPlugin;
PluginEntity pluginEntity = new PluginEntity();
pluginEntity.setPlugin(plugin.clazz());
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
entity.setPlugin(pluginEntity);
}
return entity;
}
}
代码示例来源:origin: io.gravitee.management/gravitee-management-api-service
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
代码示例来源:origin: gravitee-io/gravitee-management-rest-api
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
内容来源于网络,如有侵权,请联系作者删除!