cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r470160 - in /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader: PatternMatcherResourceStore.java SitemapNotifierStore.java fam/ fam/SitemapMonitor.java
Date Thu, 02 Nov 2006 01:21:20 GMT
Author: simoneg
Date: Wed Nov  1 17:21:19 2006
New Revision: 470160

URL: http://svn.apache.org/viewvc?view=rev&rev=470160
Log:
Adding missing files from COCOON-1929

Added:
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
    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/
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java

Added: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java?view=auto&rev=470160
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
(added)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/PatternMatcherResourceStore.java
Wed Nov  1 17:21:19 2006
@@ -0,0 +1,33 @@
+/*
+ * 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.List;
+
+/**
+ * Allow JCI ResourceStore implementations to handle lists of include/exclude patterns.
+ * The ReloadingClassLoaderFactory calls these interface methods
+ * 
+ * @author Maurizio Pillitu
+ *
+ */
+public interface PatternMatcherResourceStore {
+    
+    public void setExcludes(final List excludePatterns);
+    
+    public void setIncludes(final List includePatterns);
+}

Added: 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/SitemapNotifierStore.java?view=auto&rev=470160
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java
(added)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/SitemapNotifierStore.java
Wed Nov  1 17:21:19 2006
@@ -0,0 +1,29 @@
+package org.apache.cocoon.classloader;
+
+import org.apache.commons.jci.listeners.NotificationListener;
+import org.apache.commons.jci.stores.ResourceStore;
+
+/**
+ * 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
+ */
+public class SitemapNotifierStore implements ResourceStore {
+
+    private NotificationListener sitemapProcessor;
+
+    public SitemapNotifierStore(NotificationListener sitemapProcessor) {
+        this.sitemapProcessor = sitemapProcessor;
+    }
+    
+    public byte[] read(String pResourceName) {
+        return null;
+    }
+
+    public void remove(String pResourceName) {
+    }
+
+    public void write(String pResourceName, byte[] pResourceData) {
+        this.sitemapProcessor.handleNotification();
+    }
+}

Added: 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/SitemapMonitor.java?view=auto&rev=470160
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java
(added)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/fam/SitemapMonitor.java
Wed Nov  1 17:21:19 2006
@@ -0,0 +1,30 @@
+/* 
+ * 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 
+ *
+ *   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.fam;
+
+import org.apache.commons.jci.listeners.NotificationListener;
+import org.apache.commons.jci.monitor.FilesystemAlterationListener;
+
+public interface SitemapMonitor {
+
+    String ROLE = SitemapMonitor.class.getName();
+
+    void subscribe(final FilesystemAlterationListener listener);    
+    void unsubscribe(final FilesystemAlterationListener listener);
+    void setSitemapNotifier(NotificationListener sitemapNotifier);
+
+}



Mime
View raw message