/** * Create the service loader discovery, this can be subclassed to provide an implementation, the current * implementation returns a {@link ServiceLoaderDiscovery} instance. * * @param context the servlet context * @param classLoader the class loader * @return the plugin discovery */ protected PluginDiscovery createDiscovery(ServletContext context, ClassLoader classLoader) { return new ServiceLoaderDiscovery(classLoader); }
@SuppressWarnings("rawtypes") @Override public Iterable<CRaSHPlugin<?>> getPlugins() { List<CRaSHPlugin<?>> serviceAndSpringPlugins = new ArrayList<CRaSHPlugin<?>>(); for (CRaSHPlugin<?> cRaSHPlugin : super.getPlugins()) { serviceAndSpringPlugins.add(cRaSHPlugin); } if (factory instanceof ListableBeanFactory) { Collection<CRaSHPlugin> springPlugins = ((ListableBeanFactory)factory) .getBeansOfType(CRaSHPlugin.class).values(); for (CRaSHPlugin cRaSHPlugin : springPlugins) { serviceAndSpringPlugins.add(cRaSHPlugin); } } return serviceAndSpringPlugins; }
public TestPluginLifeCycle(ClassLoader classLoader) throws Exception { this(new ServiceLoaderDiscovery(classLoader), classLoader); }
@SuppressWarnings("rawtypes") @Override public Iterable<CRaSHPlugin<?>> getPlugins() { List<CRaSHPlugin<?>> serviceAndSpringPlugins = new ArrayList<CRaSHPlugin<?>>(); for (CRaSHPlugin<?> cRaSHPlugin : super.getPlugins()) { serviceAndSpringPlugins.add(cRaSHPlugin); } if (factory instanceof ListableBeanFactory) { Collection<CRaSHPlugin> springPlugins = ((ListableBeanFactory)factory) .getBeansOfType(CRaSHPlugin.class).values(); for (CRaSHPlugin cRaSHPlugin : springPlugins) { serviceAndSpringPlugins.add(cRaSHPlugin); } } return serviceAndSpringPlugins; }
FS confFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/")); PluginContext ctx = new PluginContext( new ServiceLoaderDiscovery(Thread.currentThread().getContextClassLoader()), Collections.<String, Object>emptyMap(), cmdFS,
@SuppressWarnings("rawtypes") @Override public Iterable<CRaSHPlugin<?>> getPlugins() { List<CRaSHPlugin<?>> serviceAndSpringPlugins = new ArrayList<CRaSHPlugin<?>>(); for (CRaSHPlugin<?> cRaSHPlugin : super.getPlugins()) { serviceAndSpringPlugins.add(cRaSHPlugin); } if (factory instanceof ListableBeanFactory) { Collection<CRaSHPlugin> springPlugins = ((ListableBeanFactory)factory) .getBeansOfType(CRaSHPlugin.class).values(); for (CRaSHPlugin cRaSHPlugin : springPlugins) { serviceAndSpringPlugins.add(cRaSHPlugin); } } return serviceAndSpringPlugins; }
/** * Trigger the boostrap. * * @throws Exception any exception that would prevent the bootstrap */ public void bootstrap() throws Exception { // The service loader discovery ServiceLoaderDiscovery discovery = new ServiceLoaderDiscovery(loader); // PluginContext context = new PluginContext( discovery, attributes, cmdFS, confFS, loader); // context.refresh(); // start(context); }
/** * Create the service loader discovery, this can be subclassed to provide an implementation, the current * implementation returns a {@link ServiceLoaderDiscovery} instance. * * @param context the servlet context * @param classLoader the class loader * @return the plugin discovery */ protected PluginDiscovery createDiscovery(ServletContext context, ClassLoader classLoader) { return new ServiceLoaderDiscovery(classLoader); }
/** * Create the service loader discovery, this can be subclassed to provide an implementation, the current * implementation returns a {@link ServiceLoaderDiscovery} instance. * * @param context the servlet context * @param classLoader the class loader * @return the plugin discovery */ protected PluginDiscovery createDiscovery(ServletContext context, ClassLoader classLoader) { return new ServiceLoaderDiscovery(classLoader); }
/** * Create the service loader discovery, this can be subclassed to provide an implementation, the current * implementation returns a {@link ServiceLoaderDiscovery} instance. * * @param context the servlet context * @param classLoader the class loader * @return the plugin discovery */ protected PluginDiscovery createDiscovery(ServletContext context, ClassLoader classLoader) { return new ServiceLoaderDiscovery(classLoader); }
/** * Trigger the boostrap. * * @throws Exception any exception that would prevent the bootstrap */ public void bootstrap() throws Exception { // The service loader discovery ServiceLoaderDiscovery discovery = new ServiceLoaderDiscovery(loader); // PluginContext context = new PluginContext( discovery, attributes, cmdFS, confFS, loader); // context.refresh(); // start(context); }
FS confFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/")); PluginContext ctx = new PluginContext( new ServiceLoaderDiscovery(Thread.currentThread().getContextClassLoader()), Collections.<String, Object>emptyMap(), cmdFS,
FS confFS = new FS().mount(Thread.currentThread().getContextClassLoader(), Path.get("/crash/")); PluginContext ctx = new PluginContext( new ServiceLoaderDiscovery(Thread.currentThread().getContextClassLoader()), Collections.<String, Object>emptyMap(), cmdFS,
/** * Trigger the boostrap. * * @throws Exception any exception that would prevent the bootstrap */ public void bootstrap() throws Exception { // The service loader discovery ServiceLoaderDiscovery discovery = new ServiceLoaderDiscovery(loader); // PluginContext context = new PluginContext( discovery, attributes, cmdFS, confFS, loader); // context.refresh(); // start(context); }
/** * Trigger the boostrap. * * @throws Exception any exception that would prevent the bootstrap */ public void bootstrap() throws Exception { // The service loader discovery ServiceLoaderDiscovery discovery = new ServiceLoaderDiscovery(loader); // PluginContext context = new PluginContext( discovery, attributes, cmdFS, confFS, loader); // context.refresh(); // start(context); }