You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/11/03 22:19:36 UTC
svn commit: r470997 - in
/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon:
bootstrap/servlet/ classloader/ classloader/fam/
Author: cziegeler
Date: Fri Nov 3 13:19:34 2006
New Revision: 470997
URL: http://svn.apache.org/viewvc?view=rev&rev=470997
Log:
Correct licenses, add missing license, code reformatting and rename some classes to more general versions
Added:
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java
- copied, changed from r470937, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java
- copied, changed from r470937, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java
Removed:
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java
Modified:
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/bootstrap/servlet/BootstrapClassLoaderManager.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/AbstractClassLoaderFactory.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderFactory.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoader.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoaderFactory.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java
cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/bootstrap/servlet/BootstrapClassLoaderManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/bootstrap/servlet/BootstrapClassLoaderManager.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/bootstrap/servlet/BootstrapClassLoaderManager.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/bootstrap/servlet/BootstrapClassLoaderManager.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.bootstrap.servlet;
import java.io.IOException;
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/AbstractClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/AbstractClassLoaderFactory.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/AbstractClassLoaderFactory.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/AbstractClassLoaderFactory.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.io.File;
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderConfiguration.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.util.ArrayList;
@@ -21,7 +21,7 @@
import java.util.List;
import java.util.Map;
-import org.apache.cocoon.classloader.fam.SitemapMonitor;
+import org.apache.cocoon.classloader.fam.Monitor;
import org.apache.commons.jci.listeners.NotificationListener;
import org.apache.commons.jci.stores.ResourceStore;
@@ -38,7 +38,7 @@
protected final List classDirectories = new ArrayList();
protected final List libDirectories = new ArrayList();
protected final Map storeDirectories = new HashMap();
- private SitemapMonitor sitemapMonitor;
+ private Monitor monitor;
private NotificationListener notificationListener;
public void addInclude(String include) {
@@ -89,13 +89,13 @@
return (ResourceStore)this.storeDirectories.get(dir);
}
- public void setSitemapMonitor(SitemapMonitor sitemapMonitor) {
- this.sitemapMonitor = sitemapMonitor;
+ public void setMonitor(Monitor monitor) {
+ this.monitor = monitor;
}
- public SitemapMonitor getSitemapMonitor() {
- return sitemapMonitor;
+ public Monitor getMonitor() {
+ return monitor;
}
public void setNotificationListener(NotificationListener notificationListener) {
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderFactory.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderFactory.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ClassLoaderFactory.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import javax.servlet.ServletContext;
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoader.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoader.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoader.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.io.File;
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoaderFactory.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoaderFactory.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/DefaultClassLoaderFactory.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.net.URL;
Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java (from r470937, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java?view=diff&rev=470997&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java&r1=470937&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/NotifyingResourceStore.java Fri Nov 3 13:19:34 2006
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import org.apache.commons.jci.listeners.NotificationListener;
@@ -6,14 +22,16 @@
/**
* Wraps all the stores configured into the sitemap classloaders, in order to dispatch
* the notification event to the treeprocessor and force the component reloading in cocoon
- * TODO Extend TransactionalResourceStore, if store is not private
+ * TODO Extend TransactionalResourceStore, if store is not private.
+ *
+ * @version $Id$
*/
-public class SitemapNotifierStore implements ResourceStore {
+public class NotifyingResourceStore implements ResourceStore {
- private NotificationListener sitemapProcessor;
+ private NotificationListener listener;
- public SitemapNotifierStore(NotificationListener sitemapProcessor) {
- this.sitemapProcessor = sitemapProcessor;
+ public NotifyingResourceStore(NotificationListener l) {
+ this.listener = l;
}
public byte[] read(String pResourceName) {
@@ -24,6 +42,6 @@
}
public void write(String pResourceName, byte[] pResourceData) {
- this.sitemapProcessor.handleNotification();
+ this.listener.handleNotification();
}
}
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoader.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.net.URL;
Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java?view=diff&rev=470997&r1=470996&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/ReloadingClassLoaderFactory.java Fri Nov 3 13:19:34 2006
@@ -1,19 +1,19 @@
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.cocoon.classloader;
import java.io.File;
@@ -22,7 +22,7 @@
import javax.servlet.ServletContext;
-import org.apache.cocoon.classloader.fam.SitemapMonitor;
+import org.apache.cocoon.classloader.fam.Monitor;
import org.apache.commons.jci.listeners.ReloadingListener;
import org.apache.commons.jci.stores.ResourceStore;
import org.apache.commons.logging.Log;
@@ -38,27 +38,32 @@
protected ClassLoaderConfiguration config;
private final static Log log = LogFactory.getLog(ReloadingListener.class);
- public ClassLoader createClassLoader(ClassLoader parent,
- ClassLoaderConfiguration config, ServletContext servletContext)
- throws Exception {
- this.config = config;
+ /**
+ * @see org.apache.cocoon.classloader.AbstractClassLoaderFactory#createClassLoader(java.lang.ClassLoader, org.apache.cocoon.classloader.ClassLoaderConfiguration, javax.servlet.ServletContext)
+ */
+ public ClassLoader createClassLoader(ClassLoader parent,
+ ClassLoaderConfiguration configuration,
+ ServletContext servletContext)
+ throws Exception {
+ this.config = configuration;
return super.createClassLoader(parent, config, servletContext);
- }
+ }
- protected ClassLoader createClassLoader(URL[] urls, List includePatterns,
- List excludePatterns, ClassLoader parent) {
+ protected ClassLoader createClassLoader(URL[] urls,
+ List includePatterns,
+ List excludePatterns,
+ ClassLoader parent) {
org.apache.commons.jci.ReloadingClassLoader jciClassLoader = new org.apache.commons.jci.ReloadingClassLoader(
new DefaultClassLoader(urls, includePatterns,
excludePatterns, Thread.currentThread()
.getContextClassLoader()));
-
- SitemapMonitor fam = this.config.getSitemapMonitor();
+ Monitor fam = this.config.getMonitor();
for (int i = 0; i < urls.length; i++) {
URL url = urls[i];
- final ResourceStore store = (ResourceStore)this.config.getStore(url.getFile());
+ final ResourceStore store = this.config.getStore(url.getFile());
final ReloadingListener listener = createReloadingListener(url,
store, this.config);
Copied: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java (from r470937, cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java?view=diff&rev=470997&p1=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java&r1=470937&p2=cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java&r2=470997
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/Monitor.java Fri Nov 3 13:19:34 2006
@@ -1,16 +1,16 @@
-/*
- * Copyright 2002-2005 The Apache Software Foundation
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@@ -19,9 +19,13 @@
import org.apache.commons.jci.listeners.NotificationListener;
import org.apache.commons.jci.monitor.FilesystemAlterationListener;
-public interface SitemapMonitor {
+/**
+ *
+ * @version $Id$
+ */
+public interface Monitor {
- String ROLE = SitemapMonitor.class.getName();
+ String ROLE = Monitor.class.getName();
void subscribe(final FilesystemAlterationListener listener);
void unsubscribe(final FilesystemAlterationListener listener);