/** * @return Returns <code>true</code> if the work folder cleaning feature is enabled, <code>false</code> otherwise. */ @Override public boolean isCleanWorkDirectory() { checkState(); return this.properties.getBoolean("clean-work-folder"); }
/** * Calls the lifecycle hook if available. It may be <code>null</code> because it is an optional feature. * * @param plugin * The current plugin instance * @throws Exception * Thrown by the lifecycle hook. */ private void postFinishOnDemand(P plugin) throws Exception { if (hasLifecycleHook()) { lifecycleHook.postFinish(plugin); } }
private void undeployFromFilesystem(String deployName) throws LimbusException { checkState(); if (hasPlugin(deployName)) { Classpath classpath = findPlugin(deployName); try { container.undeployPlugin(classpath); } finally { removePlugin(deployName); } } }
/** * This is the subfolder for deployed classpath access by the limbus container. Files here are assumed to be readable * exclusively by the container. */ private String workFolder() { checkState(); return this.properties.getProperty("work-folder"); }
@SuppressWarnings({ "rawtypes" }) static void storeThreadLocalsInDeployContext(Set<ThreadLocal> beforeActionSnapshot, Set<ThreadLocal> afterActionSnapshot, LimbusContextInternal limbusContext) { Set<ThreadLocal> threadLocalsDelta = removeAddedThreadLocales(beforeActionSnapshot, afterActionSnapshot); // Store the ThreadLocals added from the context action in limbus context limbusContext.setThreadLocalsSet(threadLocalsDelta); // Restore the ThreadLocals to the state before a context action was executed LimbusUtil.addThreadLocals(beforeActionSnapshot); }
@Override public void classpathUndeployed(Classpath classpath) { if (classpath.hasDeployName()) { removePlugin(classpath.getDeployName()); } }
/** * Calls the lifecycle hook if available. It may be <code>null</code> because it is an optional feature. * * @param plugin * The current plugin instance * @throws Exception * Thrown by the lifecycle hook. */ private void preInitializeOnDemand(P plugin) throws Exception { if (hasLifecycleHook()) { lifecycleHook.preInitialize(plugin); } }
@Override public Classpath getSharedClasspath() { checkState(); return sharedClassPathProvider.getSharedClasspath(); }
@Override public <R, E extends Throwable> R doContextAction(LimbusContextAction<R, E> callable) throws E { return getContextOrFail().doContextAction(callable); }
@Override public <T extends LimbusPlugin> T getPlugin(Classpath classpath, String classname, Class<T> expectedType) throws LimbusException, NoSuchDeploymentException { checkState(); return getPlugin(classpath, classname, expectedType, null); }
/** * The configuration key 'contextClassLoaderFilter' specifies a regexp which is used to filter the thread context * classloaders. Only matching context classloaders are logged on permission request. * * @return Returns the configuration value for key 'contextClassLoaderFilter' */ private String contextClassLoaderFilter() { return properties.getProperty("contextClassLoaderFilter"); }
private boolean logDeny() { return properties.getBoolean("logDeny"); } }
/** * */ public Initializable() { readResolve(); }
/** * @return Creates and returns a new {@link LimbusContext} not holding strong references to Limbus context. */ private LimbusContextPublic createWeakContext() { return new LimbusContextPublic(limbusContext); } }
/** * @return Returns the {@link LimbusContext} for this deployment. */ public LimbusContext getLimbusContext() { // schuettec - 30.01.2017 : This method returns the public version of the limbus context not holding strong // references. return createWeakContext(); }
@Override public void run() { exit(); } };
public static Classpath create(String deployName) { return new Classpath(deployName); }
/** * Reads the subfolder for hot deploy from the properties. Files here are intended to be added and removed to signal a * (un)deploy via filesystem. */ private String deployFolder() { checkState(); return this.properties.getProperty("deploy-folder"); }
/** * @return Returns <code>true</code> if the hot deploy feature is enabled, or <code>false</code> otherwise. */ @Override public boolean isHotDeployFolderActive() { checkState(); return this.properties.getBoolean("enable-hot-deploy"); }
private boolean nullOutStaticFields() { return properties.getBoolean("nullOutStaticFields"); }