@@ -0,0 +1,1128 @@
+package org.jeecqrs.messaging.local;%0A%0Aimport org.apache.commons.lang.builder.EqualsBuilder;%0Aimport org.apache.commons.lang.builder.HashCodeBuilder;%0A%0A/**%0A * Wraps a message in an envelope for delivery.%0A * %0A * @param %3CM%3E  the message type%0A */%0Apublic class MessageEnvelope%3CM%3E %7B%0A%0A    private final String topic;%0A    private final M message;%0A%0A    public MessageEnvelope(String topic, M message) %7B%0A        this.topic = topic;%0A        this.message = message;%0A    %7D%0A%0A    public String topic() %7B%0A        return topic;%0A    %7D%0A%0A    public M message() %7B%0A        return message;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return new HashCodeBuilder()%0A            .append(topic)%0A            .append(message)%0A            .toHashCode();%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A%09if (obj == null)%0A%09    return false;%0A        if (!(obj instanceof MessageEnvelope))%0A            return false;%0A%09final MessageEnvelope other = (MessageEnvelope) obj;%0A        return new EqualsBuilder()%0A                .append(topic, other.topic)%0A                .append(message, other.message)%0A                .isEquals();%0A    %7D%0A    %0A%7D%0A

Add MessageEnvelope