this.path = path;
}
+ @Override
public ResourceEntry run() {
return findResourceInternal(name, path);
}
this.clazz = clazz;
}
+ @Override
public ClassLoader run() {
return clazz.getClassLoader();
}
* If there is a Java SecurityManager create a read FilePermission
* or JndiPermission for the file directory path.
*
- * @param path file directory path
+ * @param filepath file directory path
*/
- public void addPermission(String path) {
- if (path == null) {
+ public void addPermission(String filepath) {
+ if (filepath == null) {
return;
}
+ String path = filepath;
+
if (securityManager != null) {
Permission permission = null;
- if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) {
+ if (path.startsWith("jndi:") || path.startsWith("jar:jndi:")) {
if (!path.endsWith("/")) {
path = path + "/";
}
// Ignore
}
} catch (NamingException e) {
+ // Ignore
}
}
*
* @param listener The listener to add
*/
+ @Override
public void addLifecycleListener(LifecycleListener listener) {
+ // NOOP
}
* Get the lifecycle listeners associated with this lifecycle. If this
* Lifecycle has no listeners registered, a zero-length array is returned.
*/
+ @Override
public LifecycleListener[] findLifecycleListeners() {
return new LifecycleListener[0];
}
*
* @param listener The listener to remove
*/
+ @Override
public void removeLifecycleListener(LifecycleListener listener) {
+ // NOOP
}
*
* @return The current state of the source component.
*/
+ @Override
public LifecycleState getState() {
return LifecycleState.NEW;
}
*
* @exception LifecycleException if a lifecycle error occurs
*/
+ @Override
public void start() throws LifecycleException {
started = true;
*
* @exception LifecycleException if a lifecycle error occurs
*/
+ @Override
public void stop() throws LifecycleException {
// Clearing references should be done before setting started to
}
} catch (NamingException e) {
+ // Ignore
}
}
is.close();
}
} catch (IOException e) {
+ // Ignore
}
try {
if (os != null) {
os.close();
}
} catch (IOException e) {
+ // Ignore
}
}
}
}
if(encoded) {
return getURI(realFile);
- } else {
- return realFile.toURI().toURL();
}
-
+
+ return realFile.toURI().toURL();
}
/**
* Return the Java class loader to be used by this Container.
*/
+ @Override
public ClassLoader getClassLoader() {
return classLoader;
/**
* Return the Container with which this Logger has been associated.
*/
+ @Override
public Container getContainer() {
return (container);
*
* @param container The associated Container
*/
+ @Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
* Return the "follow standard delegation model" flag used to configure
* our ClassLoader.
*/
+ @Override
public boolean getDelegate() {
return (this.delegate);
*
* @param delegate The new flag
*/
+ @Override
public void setDelegate(boolean delegate) {
boolean oldDelegate = this.delegate;
* the corresponding version number, in the format
* <code><description>/<version></code>.
*/
+ @Override
public String getInfo() {
return (info);
/**
* Return the reloadable flag for this Loader.
*/
+ @Override
public boolean getReloadable() {
return (this.reloadable);
*
* @param reloadable The new reloadable flag
*/
+ @Override
public void setReloadable(boolean reloadable) {
// Process this property change
*
* @param listener The listener to add
*/
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
*
* @param repository Repository to be added
*/
+ @Override
public void addRepository(String repository) {
if (log.isDebugEnabled())
* invoked inside the classloading context of this container. Unexpected
* throwables will be caught and logged.
*/
+ @Override
public void backgroundProcess() {
if (reloadable && modified()) {
try {
* For security reason, returns a clone of the Array (since
* String are immutable).
*/
+ @Override
public String[] findRepositories() {
return repositories.clone();
* Has the internal repository associated with this Loader been modified,
* such that the loaded classes should be reloaded?
*/
+ @Override
public boolean modified() {
return classLoader != null ? classLoader.modified() : false ;
}
*
* @param listener The listener to remove
*/
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
*
* @param event The property change event that has occurred
*/
+ @Override
public void propertyChange(PropertyChangeEvent event) {
// Validate the source of this event