Author: jdumay
Date: Thu Sep 11 06:39:03 2008
New Revision: 694250
URL: http://svn.apache.org/viewvc?rev=694250&view=rev
Log:
License headers and a small test for the Event class
Added:
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/EventTest.java
Modified:
archiva/sandbox/archiva-event/pom.xml
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/AsynchronousEventBus.java
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/Event.java
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventBus.java
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventEmitter.java
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventMessage.java
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventObserver.java
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/AsynchronousEventBusTest.java
Modified: archiva/sandbox/archiva-event/pom.xml
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/pom.xml?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
--- archiva/sandbox/archiva-event/pom.xml (original)
+++ archiva/sandbox/archiva-event/pom.xml Thu Sep 11 06:39:03 2008
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.archiva</groupId>
- <artifactId>archiva-event</artifactId>
- <packaging>jar</packaging>
- <version>1.2-SNAPSHOT</version>
- <name>Archiva Core :: Archiva Event</name>
- <build>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-event</artifactId>
+ <packaging>jar</packaging>
+ <version>1.2-SNAPSHOT</version>
+ <name>Archiva Base :: Event</name>
+ <build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -18,12 +18,12 @@
</plugin>
</plugins>
</build>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/AsynchronousEventBus.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/AsynchronousEventBus.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/AsynchronousEventBus.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/AsynchronousEventBus.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -7,11 +26,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
-import org.apache.archiva.event.Event;
-import org.apache.archiva.event.EventBus;
-import org.apache.archiva.event.EventEmitter;
-import org.apache.archiva.event.EventMessage;
-import org.apache.archiva.event.EventObserver;
/**
* Simple Async Event Bus implementation
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/Event.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/Event.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/Event.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/Event.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
/**
* Encaptulation of both the EventEmitter and the EventMessage
* to represent a single event
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventBus.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventBus.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventBus.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventBus.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
import java.util.Set;
/**
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventEmitter.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventEmitter.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventEmitter.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventEmitter.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
public interface EventEmitter
{
}
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventMessage.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventMessage.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventMessage.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventMessage.java
Thu Sep 11 06:39:03 2008
@@ -1,6 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
public interface EventMessage
{
-
}
Modified:
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventObserver.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventObserver.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventObserver.java
(original)
+++
archiva/sandbox/archiva-event/src/main/java/org/apache/archiva/event/EventObserver.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
public interface EventObserver
{
void observe(Event event);
Modified:
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/AsynchronousEventBusTest.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/AsynchronousEventBusTest.java?rev=694250&r1=694249&r2=694250&view=diff
==============================================================================
---
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/AsynchronousEventBusTest.java
(original)
+++
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/AsynchronousEventBusTest.java
Thu Sep 11 06:39:03 2008
@@ -1,5 +1,24 @@
package org.apache.archiva.event;
+/*
+ * 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.
+ */
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Added:
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/EventTest.java
URL:
http://svn.apache.org/viewvc/archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/EventTest.java?rev=694250&view=auto
==============================================================================
---
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/EventTest.java
(added)
+++
archiva/sandbox/archiva-event/src/test/java/org/apache/archiva/event/EventTest.java
Thu Sep 11 06:39:03 2008
@@ -0,0 +1,35 @@
+package org.apache.archiva.event;
+
+/*
+ * 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.
+ */
+
+import junit.framework.TestCase;
+
+public class EventTest extends TestCase
+{
+ public void testEvent()
+ {
+ EventEmitter emitter = new EventEmitter() {};
+ EventMessage message = new EventMessage() {};
+ Event event = new Event(emitter, message);
+
+ assertEquals(emitter, event.getEmitter());
+ assertEquals(message, event.getMessage());
+ }
+}