Permalink
Browse files

refactroring for release of 1.1.0

  • Loading branch information...
1 parent 1c3444c commit 32bed9afccc4701a8c97b650383ac432c9c476d1 benni committed Jan 9, 2013
Showing with 400 additions and 503 deletions.
  1. +1 −1 .gitignore
  2. +9 −3 README.md
  3. +1 −1 build.gradle
  4. +14 −4 pom.xml
  5. +0 −152 pom.xml.releaseBackup
  6. +7 −8 src/main/java/{org → net/engio}/mbassy/AbstractMessageBus.java
  7. +3 −3 src/main/java/{org → net/engio}/mbassy/BusConfiguration.java
  8. +1 −1 src/main/java/{org → net/engio}/mbassy/IMessageBus.java
  9. +1 −1 src/main/java/{org → net/engio}/mbassy/IPublicationErrorHandler.java
  10. +2 −2 src/main/java/{org → net/engio}/mbassy/MBassador.java
  11. +2 −2 src/main/java/{org → net/engio}/mbassy/MessagePublication.java
  12. +1 −1 src/main/java/{org → net/engio}/mbassy/PublicationError.java
  13. +1 −1 src/main/java/{org → net/engio}/mbassy/SyncAsyncPostCommand.java
  14. +1 −1 src/main/java/{org → net/engio}/mbassy/common/ConcurrentSet.java
  15. +1 −1 src/main/java/{org → net/engio}/mbassy/common/IPredicate.java
  16. +1 −1 src/main/java/{org → net/engio}/mbassy/common/ReflectionUtils.java
  17. +3 −3 src/main/java/{org → net/engio}/mbassy/dispatch/AbstractHandlerInvocation.java
  18. +1 −1 src/main/java/{org → net/engio}/mbassy/dispatch/AsynchronousHandlerInvocation.java
  19. +3 −3 src/main/java/{org → net/engio}/mbassy/dispatch/EnvelopedMessageDispatcher.java
  20. +3 −3 src/main/java/{org → net/engio}/mbassy/dispatch/FilteredMessageDispatcher.java
  21. +1 −1 src/main/java/{org → net/engio}/mbassy/dispatch/IHandlerInvocation.java
  22. +2 −2 src/main/java/{org → net/engio}/mbassy/dispatch/IMessageDispatcher.java
  23. +2 −2 src/main/java/{org → net/engio}/mbassy/dispatch/MessageDispatcher.java
  24. +3 −3 src/main/java/{org → net/engio}/mbassy/dispatch/MessagingContext.java
  25. +1 −1 src/main/java/{org → net/engio}/mbassy/dispatch/ReflectiveHandlerInvocation.java
  26. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/Enveloped.java
  27. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/Filter.java
  28. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/Filters.java
  29. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/IMessageFilter.java
  30. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/Listener.java
  31. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/MessageHandlerMetadata.java
  32. +2 −2 src/main/java/{org → net/engio}/mbassy/listener/MessageListenerMetadata.java
  33. +4 −5 src/main/java/{org → net/engio}/mbassy/listener/MetadataReader.java
  34. +1 −1 src/main/java/{org → net/engio}/mbassy/listener/Mode.java
  35. +1 −1 src/main/java/{org → net/engio}/mbassy/subscription/MessageEnvelope.java
  36. +4 −4 src/main/java/{org → net/engio}/mbassy/subscription/Subscription.java
  37. +9 −9 src/main/java/{org → net/engio}/mbassy/subscription/SubscriptionFactory.java
  38. +4 −3 src/test/java/{org → net/engio}/mbassy/AllTests.java
  39. +4 −2 src/test/java/{org → net/engio}/mbassy/ConcurrentSetTest.java
  40. +11 −9 src/test/java/{org → net/engio}/mbassy/FilterTest.java
  41. +104 −0 src/test/java/net/engio/mbassy/ListenerSubscriptionTest.java
  42. +144 −0 src/test/java/net/engio/mbassy/MessagePublicationTest.java
  43. +8 −7 src/test/java/{org → net/engio}/mbassy/MetadataReaderTest.java
  44. +1 −1 src/test/java/{org/mbassy → net/engio/mbassy/common}/ConcurrentExecutor.java
  45. +3 −1 src/test/java/{org/mbassy → net/engio/mbassy/common}/TestUtil.java
  46. +1 −1 src/test/java/{org/mbassy → net/engio/mbassy/common}/UnitTest.java
  47. +1 −1 src/test/java/{org → net/engio}/mbassy/events/SubTestEvent.java
  48. +1 −1 src/test/java/{org → net/engio}/mbassy/events/TestEvent.java
  49. +1 −1 src/test/java/{org → net/engio}/mbassy/events/TestEvent2.java
  50. +4 −4 src/test/java/{org → net/engio}/mbassy/listeners/EventingTestBean.java
  51. +4 −4 src/test/java/{org → net/engio}/mbassy/listeners/EventingTestBean2.java
  52. +4 −4 src/test/java/{org → net/engio}/mbassy/listeners/EventingTestBean3.java
  53. +1 −1 src/test/java/{org → net/engio}/mbassy/listeners/ListenerFactory.java
  54. +9 −9 src/test/java/{org → net/engio}/mbassy/listeners/MultiEventHandler.java
  55. +3 −3 src/test/java/{org → net/engio}/mbassy/listeners/NonListeningBean.java
  56. +0 −221 src/test/java/org/mbassy/MBassadorTest.java
View
@@ -8,7 +8,7 @@
# root of compiled classes #
target/**/*
-target/*
+target/**
# the local maven repository #
mvn-local-repo/**/*
View
@@ -9,7 +9,7 @@ Read this documentation to get an overview of its features and how cool this mes
You can also check out the <a href="http://codeblock.engio.net/?p=37" target="_blank">performance comparison</a>
which also contains a partial list of the features of the compared implementations.
-The current version is 1.0.6.RC, see the release notes for more details.
+The current version is 1.1.0, see the release notes for more details.
Table of contents:
+ [Features](#features)
@@ -134,6 +134,13 @@ Of course you can always clone the repository and build from source
<h2>Release Notes</h2>
+<h3>1.1.0</h3>
+
+First stable release!
+
+ + Refactoring and repackaging
+ + More exhaustive unit tests
+
<h3>1.0.6.RC</h3>
+ Fixed behaviour with capacity bound blocking queue such that there now are two methods to schedule a message
@@ -153,15 +160,14 @@ Of course you can always clone the repository and build from source
<h2>Roadmap</h2>
-+ Checkout MBassador from one of the official maven repositories (as soon as the user base is big enough)
+ Spring integration with support for conditional message dispatch in transactional context (dispatch only after
successful commit etc.). Currently in beta, see <a href="https://github.com/bennidi/mbassador-spring">this</a> repository
<h2>Credits</h2>
The initial inspiration for creating this component came from looking at Google Guava's event bus implementation. Since
it did not provide all the features we needed in our project, I decided to create my own implementation. It matured to be
-quite a feature rich and yet very efficient and performant message bus.
+quite a feature rich and yet very efficient and performant implementation.
I want to thank the development team from friendsurance (www.friendsurance.de) for their support and feedback on the bus
implementation and the management of friendsurance for allowing me to publish the component as an open source project.
View
@@ -1,7 +1,7 @@
usePlugin('java')
group="org.mbassy"
-version="1.0.6.RC"
+version="1.10.0-SNAPSHOT"
dependencies {
addMavenRepo()
View
18 pom.xml
@@ -1,9 +1,15 @@
<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">
+ <parent>
+ <groupId>org.sonatype.oss</groupId>
+ <artifactId>oss-parent</artifactId>
+ <version>7</version>
+ </parent>
+
<modelVersion>4.0.0</modelVersion>
- <groupId>org.mbassy</groupId>
+ <groupId>net.engio</groupId>
<artifactId>mbassador</artifactId>
- <version>1.0.8-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mbassador</name>
<description>
@@ -28,16 +34,18 @@
</license>
</licenses>
<scm>
- <url>scm:git:git@github.com:bennidi/mbassador.git</url>
+ <url>git@github.com:bennidi/mbassador.git</url>
<connection>scm:git:git@github.com:bennidi/mbassador.git</connection>
- <tag>HEAD</tag>
+ <tag>HEAD</tag>
+ <developerConnection>scm:git:git@github.com:bennidi/mbassador.git</developerConnection>
</scm>
<developers>
<developer>
<id>bennidi</id>
<name>Benjamin Diedrichsen</name>
<timezone>+1</timezone>
+ <email>b.diedrichsen@googlemail.com</email>
</developer>
</developers>
@@ -58,12 +66,14 @@
</dependencies>
+ <!-- Local repository (for testing)
<distributionManagement>
<repository>
<id>mbassador-github-repo</id>
<url>${github.url}</url>
</repository>
</distributionManagement>
+ -->
<build>
<plugins>
View
@@ -1,152 +0,0 @@
-<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.mbassy</groupId>
- <artifactId>mbassador</artifactId>
- <version>1.0.7.RC-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>mbassador</name>
- <description>
- Mbassador is a fast and flexible message bus system following the publish subscribe pattern.
- It is designed for ease of use and aims to be feature rich and extensible
- while preserving resource efficiency and performance.
-
- It features:
- declarative listener definition via annotations,
- sync and/or async message delivery,
- weak-references,
- message filtering,
- ordering of message handlers etc.
-
- </description>
-
- <url>https://github.com/bennidi/mbassador</url>
- <licenses>
- <license>
- <name>MIT license</name>
- <url>http://www.opensource.org/licenses/mit-license.php</url>
- </license>
- </licenses>
- <scm>
- <url>scm:git:git@github.com:bennidi/mbassador.git</url>
- <connection>scm:git:git@github.com:bennidi/mbassador.git</connection>
- </scm>
- <developers>
-
- <developer>
- <id>bennidi</id>
- <name>Benjamin Diedrichsen</name>
- <timezone>+1</timezone>
- </developer>
- </developers>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.build.java.version>1.6</project.build.java.version>
- <github.url>file://${project.basedir}/mvn-local-repo</github.url>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.10</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <distributionManagement>
- <repository>
- <id>mbassador-github-repo</id>
- <url>${github.url}</url>
- </repository>
- </distributionManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${project.build.java.version}</source>
- <target>${project.build.java.version}</target>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.4</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>false</skipTests>
- </configuration>
- </plugin>
-
- <!-- bind the source attaching to package phase -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>release-sign-artifacts</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
@@ -1,15 +1,14 @@
-package org.mbassy;
+package net.engio.mbassy;
-import org.mbassy.common.ReflectionUtils;
-import org.mbassy.dispatch.MessagingContext;
-import org.mbassy.listener.MessageHandlerMetadata;
-import org.mbassy.listener.MetadataReader;
-import org.mbassy.subscription.Subscription;
-import org.mbassy.subscription.SubscriptionFactory;
+import net.engio.mbassy.common.ReflectionUtils;
+import net.engio.mbassy.dispatch.MessagingContext;
+import net.engio.mbassy.listener.MessageHandlerMetadata;
+import net.engio.mbassy.listener.MetadataReader;
+import net.engio.mbassy.subscription.Subscription;
+import net.engio.mbassy.subscription.SubscriptionFactory;
import java.util.*;
import java.util.concurrent.*;
-import java.util.concurrent.atomic.AtomicBoolean;
/**
* The base class for all message bus implementations.
@@ -1,7 +1,7 @@
-package org.mbassy;
+package net.engio.mbassy;
-import org.mbassy.listener.MetadataReader;
-import org.mbassy.subscription.SubscriptionFactory;
+import net.engio.mbassy.listener.MetadataReader;
+import net.engio.mbassy.subscription.SubscriptionFactory;
import java.util.concurrent.*;
@@ -1,4 +1,4 @@
-package org.mbassy;
+package net.engio.mbassy;
import java.util.Collection;
import java.util.concurrent.Executor;
@@ -1,4 +1,4 @@
-package org.mbassy;
+package net.engio.mbassy;
/**
* Publication error handlers are provided with a publication error every time an error occurs during message publication.
@@ -1,6 +1,6 @@
-package org.mbassy;
+package net.engio.mbassy;
-import org.mbassy.subscription.Subscription;
+import net.engio.mbassy.subscription.Subscription;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
@@ -1,6 +1,6 @@
-package org.mbassy;
+package net.engio.mbassy;
-import org.mbassy.subscription.Subscription;
+import net.engio.mbassy.subscription.Subscription;
import java.util.Collection;
@@ -1,4 +1,4 @@
-package org.mbassy;
+package net.engio.mbassy;
import java.lang.reflect.Method;
@@ -1,4 +1,4 @@
-package org.mbassy;
+package net.engio.mbassy;
import java.util.concurrent.TimeUnit;
@@ -1,4 +1,4 @@
-package org.mbassy.common;
+package net.engio.mbassy.common;
import java.lang.ref.WeakReference;
@@ -1,4 +1,4 @@
-package org.mbassy.common;
+package net.engio.mbassy.common;
/**
* Created with IntelliJ IDEA.
@@ -1,4 +1,4 @@
-package org.mbassy.common;
+package net.engio.mbassy.common;
import java.lang.reflect.Method;
import java.util.Collection;
@@ -1,7 +1,7 @@
-package org.mbassy.dispatch;
+package net.engio.mbassy.dispatch;
-import org.mbassy.IPublicationErrorHandler;
-import org.mbassy.PublicationError;
+import net.engio.mbassy.IPublicationErrorHandler;
+import net.engio.mbassy.PublicationError;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -1,4 +1,4 @@
-package org.mbassy.dispatch;
+package net.engio.mbassy.dispatch;
import java.lang.reflect.Method;
@@ -1,7 +1,7 @@
-package org.mbassy.dispatch;
+package net.engio.mbassy.dispatch;
-import org.mbassy.common.ConcurrentSet;
-import org.mbassy.subscription.MessageEnvelope;
+import net.engio.mbassy.common.ConcurrentSet;
+import net.engio.mbassy.subscription.MessageEnvelope;
/**
* Todo: Add javadoc
@@ -1,7 +1,7 @@
-package org.mbassy.dispatch;
+package net.engio.mbassy.dispatch;
-import org.mbassy.common.ConcurrentSet;
-import org.mbassy.listener.IMessageFilter;
+import net.engio.mbassy.common.ConcurrentSet;
+import net.engio.mbassy.listener.IMessageFilter;
/**
* A dispatcher that implements message filtering based on the filter configuration
Oops, something went wrong.

0 comments on commit 32bed9a

Please sign in to comment.