本文整理了Java中io.gravitee.plugin.core.api.Plugin.clazz()
方法的一些代码示例,展示了Plugin.clazz()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.clazz()
方法的具体详情如下:
包路径:io.gravitee.plugin.core.api.Plugin
类名称:Plugin
方法名:clazz
暂无
代码示例来源:origin: gravitee-io/gravitee-gateway
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> repositoryClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new repository plugin: {} [{}]", plugin.id(), plugin.clazz());
代码示例来源:origin: gravitee-io/gravitee-gateway
public Set<Plugin> plugins() {
return pluginRegistry.plugins().stream().map(regPlugin -> {
Plugin plugin = new Plugin();
plugin.setId(regPlugin.id());
plugin.setName(regPlugin.manifest().name());
plugin.setDescription(regPlugin.manifest().description());
plugin.setVersion(regPlugin.manifest().version());
plugin.setType(regPlugin.type().name().toLowerCase());
plugin.setPlugin(regPlugin.clazz());
return plugin;
}).collect(Collectors.toSet());
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-service-discovery
@Override
public String clazz() {
return plugin.clazz();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-fetcher
@Override
public String clazz() {
return plugin.clazz();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-resource
@Override
public String clazz() {
return plugin.clazz();
}
代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-policy
@Override
public String clazz() {
return plugin.clazz();
}
代码示例来源:origin: io.gravitee.am.gateway.services/gravitee-am-gateway-services-core
@Override
public void handle(Plugin plugin) {
try {
pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
LOGGER.info("Register a new service: {} [{}]", plugin.id(), plugin.clazz());
ApplicationContext context = pluginContextFactory.create(plugin);
serviceManager.register((AbstractService) context.getBean(plugin.clazz()));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create service instance", iae);
// Be sure that the context does not exist anymore.
pluginContextFactory.remove(plugin);
}
}
}
代码示例来源:origin: io.gravitee.am.gateway/gravitee-am-gateway-services-core
@Override
public void handle(Plugin plugin) {
try {
pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
LOGGER.info("Register a new service: {} [{}]", plugin.id(), plugin.clazz());
ApplicationContext context = pluginContextFactory.create(plugin);
serviceManager.register((AbstractService) context.getBean(plugin.clazz()));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create service instance", iae);
// Be sure that the context does not exist anymore.
pluginContextFactory.remove(plugin);
}
}
}
代码示例来源:origin: io.gravitee.am.management/gravitee-am-management-api-services-core
@Override
public void handle(Plugin plugin) {
try {
pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
LOGGER.info("Register a new service: {} [{}]", plugin.id(), plugin.clazz());
ApplicationContext context = pluginContextFactory.create(plugin);
serviceManager.register((AbstractService) context.getBean(plugin.clazz()));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create service instance", iae);
// Be sure that the context does not exist anymore.
pluginContextFactory.remove(plugin);
}
}
}
代码示例来源:origin: io.gravitee.am.gateway.extensiongrant/gravitee-am-gateway-extensiongrant
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> tokenGranterClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new extension grant plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(ExtensionGrant.class, tokenGranterClass);
ExtensionGrant identityIdentityProvider = createInstance((Class<ExtensionGrant>) tokenGranterClass);
extensionGrantPluginManager.register(new ExtensionGrantDefinition(identityIdentityProvider, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create extension grant instance", iae);
}
}
代码示例来源:origin: io.gravitee.am.gateway.certificate/gravitee-am-gateway-certificate
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> certificateClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new certificate plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(Certificate.class, certificateClass);
Certificate certificate = createInstance((Class<Certificate>) certificateClass);
certificatePluginManager.register(new CertificateDefinition(certificate, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create certificate instance", iae);
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> tokenGranterClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new extension grant plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(ExtensionGrant.class, tokenGranterClass);
ExtensionGrant identityIdentityProvider = createInstance((Class<ExtensionGrant>) tokenGranterClass);
extensionGrantPluginManager.register(new ExtensionGrantDefinition(identityIdentityProvider, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create extension grant instance", iae);
}
}
代码示例来源:origin: gravitee-io/gravitee-management-rest-api
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> identityProviderClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new identity provider plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(IdentityProvider.class, identityProviderClass);
IdentityProvider identityIdentityProvider = createInstance((Class<IdentityProvider>) identityProviderClass);
identityProviderManager.register(new IdentityProviderDefinition(identityIdentityProvider, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create identity provider instance", iae);
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> certificateClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new certificate plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(Certificate.class, certificateClass);
Certificate certificate = createInstance((Class<Certificate>) certificateClass);
certificatePluginManager.register(new CertificateDefinition(certificate, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create certificate instance", iae);
}
}
代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-identityprovider
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> identityProviderClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new identity provider plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(IdentityProvider.class, identityProviderClass);
IdentityProvider identityIdentityProvider = createInstance((Class<IdentityProvider>) identityProviderClass);
identityProviderPluginManager.register(new IdentityProviderDefinition(identityIdentityProvider, plugin), identityIdentityProvider instanceof OAuth2IdentityProvider);
} catch (Exception iae) {
LOGGER.error("Unexpected error while create identity provider instance", iae);
}
}
代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-extensiongrant
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> tokenGranterClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new extension grant plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(ExtensionGrant.class, tokenGranterClass);
ExtensionGrant identityIdentityProvider = createInstance((Class<ExtensionGrant>) tokenGranterClass);
extensionGrantPluginManager.register(new ExtensionGrantDefinition(identityIdentityProvider, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create extension grant instance", iae);
}
}
代码示例来源:origin: io.gravitee.management.idp/gravitee-management-api-idp-core
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> identityProviderClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new identity provider plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(IdentityProvider.class, identityProviderClass);
IdentityProvider identityIdentityProvider = createInstance((Class<IdentityProvider>) identityProviderClass);
identityProviderManager.register(new IdentityProviderDefinition(identityIdentityProvider, plugin));
} catch (Exception iae) {
LOGGER.error("Unexpected error while create identity provider instance", iae);
}
}
代码示例来源:origin: gravitee-io/graviteeio-access-management
@Override
public void handle(Plugin plugin) {
try {
ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
final Class<?> identityProviderClass = classloader.loadClass(plugin.clazz());
LOGGER.info("Register a new identity provider plugin: {} [{}]", plugin.id(), plugin.clazz());
Assert.isAssignable(IdentityProvider.class, identityProviderClass);
IdentityProvider identityIdentityProvider = createInstance((Class<IdentityProvider>) identityProviderClass);
identityProviderPluginManager.register(new IdentityProviderDefinition(identityIdentityProvider, plugin), identityIdentityProvider instanceof OAuth2IdentityProvider);
} catch (Exception iae) {
LOGGER.error("Unexpected error while create identity provider instance", iae);
}
}
代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-heartbeat
public Set<Plugin> plugins() {
return pluginRegistry.plugins().stream().map(regPlugin -> {
Plugin plugin = new Plugin();
plugin.setId(regPlugin.id());
plugin.setName(regPlugin.manifest().name());
plugin.setDescription(regPlugin.manifest().description());
plugin.setVersion(regPlugin.manifest().version());
plugin.setType(regPlugin.type().name().toLowerCase());
plugin.setPlugin(regPlugin.clazz());
return plugin;
}).collect(Collectors.toSet());
}
代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-monitoring
public Set<Plugin> plugins() {
return pluginRegistry.plugins().stream().map(regPlugin -> {
Plugin plugin = new Plugin();
plugin.setId(regPlugin.id());
plugin.setName(regPlugin.manifest().name());
plugin.setDescription(regPlugin.manifest().description());
plugin.setVersion(regPlugin.manifest().version());
plugin.setType(regPlugin.type().name().toLowerCase());
plugin.setPlugin(regPlugin.clazz());
return plugin;
}).collect(Collectors.toSet());
}
内容来源于网络,如有侵权,请联系作者删除!