public PluginContext start(final ClassLoader loader, final Properties props, final Map<String, Object> attributes, final Set<CRaSHPlugin<?>> plugins) throws IOException { FS conffs = newFS(CrashFSDriver.parse(loader, asList(new CrashPredicate("crash", ACCEPT)))); FS cmdfs = newFS(CrashFSDriver.parse(loader, asList( new CrashPredicate("cmd", ACCEPT), new CrashPredicate("org/jooby/crash", ACCEPT), new CrashPredicate("crash/commands", noneOf("jndi.groovy", "jdbc.groovy", "jpa.groovy", "jul.groovy"))))); setConfig(props); PluginContext ctx = new PluginContext(executor("crash"), scanner("crash-scanner"), () -> plugins, attributes, cmdfs, conffs, loader); ctx.refresh(); start(ctx); return ctx; }
public void run() { refresh(); } }, 0, refreshRate, tu);
/** * Create and start the plugin context. * * @param discovery the plugin discovery * @return the plugin context */ protected PluginContext start(Map<String, Object> attributes, PluginDiscovery discovery, ClassLoader loader) { PluginContext context = create(attributes, discovery, loader); if (context != null) { context.refresh(); start(context); } return context; }
public void start() { context.refresh(); start(context); }
public void bind(String name, String ext, String command) { if (name.contains("/")) { throw new IllegalArgumentException("Command name must not contain /"); } if (name.contains(".")) { throw new IllegalArgumentException("Command name must not contain ."); } commands.add(Path.get("/" + name + "." + ext), command); context.refresh(); }
confFS, Thread.currentThread().getContextClassLoader()); ctx.refresh(); CRaSH crash = new CRaSH(ctx); StringBuilder buffer = new StringBuilder();
/** * 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); }
public void run() { refresh(); } }, 0, refreshRate, tu);
public void run() { refresh(); } }, 0, refreshRate, tu);
public void run() { refresh(); } }, 0, refreshRate, tu);
/** * Create and start the plugin context. * * @param discovery the plugin discovery * @return the plugin context */ protected PluginContext start(Map<String, Object> attributes, PluginDiscovery discovery, ClassLoader loader) { PluginContext context = create(attributes, discovery, loader); if (context != null) { context.refresh(); start(context); } return context; }
/** * Create and start the plugin context. * * @param discovery the plugin discovery * @return the plugin context */ protected PluginContext start(Map<String, Object> attributes, PluginDiscovery discovery, ClassLoader loader) { PluginContext context = create(attributes, discovery, loader); if (context != null) { context.refresh(); start(context); } return context; }
confFS, Thread.currentThread().getContextClassLoader()); ctx.refresh(); CRaSH crash = new CRaSH(ctx); StringBuilder buffer = new StringBuilder();
/** * 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); }
/** * 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); }
public void afterPropertiesSet() throws Exception { // List beans Map<String,Object> attributes = new HashMap<String, Object>(); attributes.put("factory", factory); if (factory instanceof ListableBeanFactory) { ListableBeanFactory listable = (ListableBeanFactory)factory; attributes.put("beans", new SpringMap(listable)); } // PluginDiscovery discovery = new SpringPluginDiscovery(loader, factory); // FS cmdFS = createCommandFS(); // FS confFS = createConfFS(); // PluginContext context = new PluginContext( discovery, Collections.unmodifiableMap(attributes), cmdFS, confFS, loader); // context.refresh(); // start(context); }
confFS, Thread.currentThread().getContextClassLoader()); ctx.refresh(); CRaSH crash = new CRaSH(ctx); for (String s : ctx.listResourceId(ResourceKind.COMMAND)) {