sendGcodeContext.setBaseResource(getBaseResource()); sendGcodeContext.setClassLoader(Thread.currentThread().getContextClassLoader()); sendGcodeContext.setHandler(new SendGcodeHandler()); adjustManualLocationContext.setBaseResource(getBaseResource()); adjustManualLocationContext.setClassLoader(Thread.currentThread().getContextClassLoader()); adjustManualLocationContext.setHandler(new AdjustManualLocationHandler()); getSystemStateContext.setBaseResource(getBaseResource()); getSystemStateContext.setClassLoader(Thread.currentThread().getContextClassLoader()); getSystemStateContext.setHandler(new GetSystemStateHandler()); configContext.setBaseResource(getBaseResource()); configContext.setClassLoader(Thread.currentThread().getContextClassLoader()); configContext.setHandler(new ConfigHandler());
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * @param resourceBase * The base resource as a string. */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * Set the base resource for this context. * @param resourceBase A string representing the base resource for the context. Any string accepted * by {@link Resource#newResource(String)} may be passed and the call is equivalent to * <code>setBaseResource(newResource(resourceBase));</code> */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * Set the base resource for this context. * @param resourceBase A string representing the base resource for the context. Any string accepted * by {@link Resource#newResource(String)} may be passed and the call is equivalent to * <code>setBaseResource(newResource(resourceBase));</code> */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
/** * Set the base resource for this context. * * @param resourceBase * A string representing the base resource for the context. Any string accepted by {@link Resource#newResource(String)} may be passed and the * call is equivalent to <code>setBaseResource(newResource(resourceBase));</code> */ public void setResourceBase(String resourceBase) { try { setBaseResource(newResource(resourceBase)); } catch (Exception e) { LOG.warn(e.toString()); LOG.debug(e); throw new IllegalArgumentException(resourceBase); } }
public void addResourceContext(String context, File directory) throws MalformedURLException, IOException { ContextHandler contextHandler = new ContextHandler(); ResourceHandler contentResourceHandler = new ResourceHandler(); contextHandler.setBaseResource(Resource.newResource(directory)); contextHandler.setHandler(contentResourceHandler); contextHandler.setContextPath(context); addContextHandler(contextHandler); }
_contextHandler.setBaseResource(rootResource);