Updated license info
This commit is contained in:
parent
e1472413ce
commit
c69e3c686e
1
LICENSE
1
LICENSE
|
@ -1,6 +1,7 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2012 Benjamin Diedrichsen
|
||||
Copyright (c) 2015 dorkbox, llc
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
|
|
|
@ -53,7 +53,9 @@ import net.engio.mbassy.bus.error.ErrorHandlingSupport;
|
|||
* get dispatched to all message handlers that take an instance of List as their parameter
|
||||
*
|
||||
* @Author bennidi
|
||||
* Date: 2/8/12
|
||||
* Date: 2/8/12
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public interface IMessageBus extends PubSubSupport, ErrorHandlingSupport {
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ import com.lmax.disruptor.dsl.ProducerType;
|
|||
|
||||
/**
|
||||
* The base class for all message bus implementations with support for asynchronous message dispatch
|
||||
*
|
||||
* @Author bennidi
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class MBassador extends AbstractPubSubSupport implements IMessageBus {
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@ import java.util.concurrent.TimeUnit;
|
|||
* Listeners can be subscribed and unsubscribed using the corresponding methods. When a listener is subscribed its
|
||||
* handlers will be registered and start to receive matching message publications.
|
||||
*
|
||||
* @Author bennidi
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public interface PubSubSupport {
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ import java.lang.annotation.Target;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 2/8/12
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
|
|
|
@ -20,5 +20,4 @@ import java.lang.annotation.Target;
|
|||
@Target(value = {ElementType.TYPE, ElementType.ANNOTATION_TYPE})
|
||||
@Inherited
|
||||
public @interface Listener {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package net.engio.mbassy.annotations;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A handler marked with this annotation is guaranteed to be invoked in a thread-safe manner, that is, no
|
||||
|
|
|
@ -14,6 +14,9 @@ import net.engio.mbassy.subscription.SubscriptionManager;
|
|||
|
||||
/**
|
||||
* The base class for all message bus implementations.
|
||||
* @author bennidi
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public abstract class AbstractPubSubSupport implements PubSubSupport, ErrorHandlingSupport {
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package net.engio.mbassy.bus;
|
||||
|
||||
|
||||
/**
|
||||
* The dead message event is published whenever no message
|
||||
* handlers could be found for a given message publication.
|
||||
*
|
||||
* @author bennidi
|
||||
* Date: 1/18/13
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public final class DeadMessage {
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package net.engio.mbassy.bus.error;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author bennidi
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public interface ErrorHandlingSupport {
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,6 +12,8 @@ import java.util.Arrays;
|
|||
* @author bennidi
|
||||
* Date: 2/22/12
|
||||
* Time: 4:59 PM
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class PublicationError {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.engio.mbassy.common;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
|
|
@ -6,7 +6,10 @@ import java.util.Locale;
|
|||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
||||
/**
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class DisruptorThreadFactory implements ThreadFactory {
|
||||
/**
|
||||
* The stack size is arbitrary based on JVM implementation. Default is 0
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
/*
|
||||
* Copyright 2015 dorkbox, llc
|
||||
*
|
||||
* 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 net.engio.mbassy.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -25,6 +10,9 @@ import com.googlecode.concurentlocks.ReentrantReadWriteUpdateLock;
|
|||
|
||||
/**
|
||||
* Simple tree structure that is a map that contains a chain of keys to get to a value.
|
||||
*
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class ObjectTree<KEY, VALUE> {
|
||||
private final ReadWriteUpdateLock lock = new ReentrantReadWriteUpdateLock();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.engio.mbassy.common;
|
||||
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Iterator;
|
||||
import java.util.WeakHashMap;
|
||||
|
|
|
@ -14,6 +14,8 @@ import java.lang.reflect.Method;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 11/23/12
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public interface IHandlerInvocation {
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.lang.reflect.Method;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 11/23/12
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class ReflectiveHandlerInvocation implements IHandlerInvocation {
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.lang.reflect.Method;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 3/31/13
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class SynchronizedHandlerInvocation implements IHandlerInvocation {
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package net.engio.mbassy.disruptor;
|
||||
|
||||
import net.engio.mbassy.bus.AbstractPubSubSupport;
|
||||
|
||||
import com.lmax.disruptor.EventFactory;
|
||||
|
||||
/**
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class EventBusFactory implements EventFactory<MessageHolder> {
|
||||
|
||||
public EventBusFactory() {
|
||||
|
|
|
@ -5,6 +5,10 @@ import net.engio.mbassy.bus.error.PublicationError;
|
|||
|
||||
import com.lmax.disruptor.EventHandler;
|
||||
|
||||
/**
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class EventProcessor implements EventHandler<MessageHolder> {
|
||||
private final AbstractPubSubSupport publisher;
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package net.engio.mbassy.disruptor;
|
||||
|
||||
|
||||
/**
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class MessageHolder {
|
||||
public Object message;
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ import net.engio.mbassy.common.ReflectionUtils;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 11/14/12
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class MessageHandler {
|
||||
|
||||
|
@ -63,9 +65,10 @@ public class MessageHandler {
|
|||
return this.handledMessages;
|
||||
}
|
||||
|
||||
// todo: have 1, 2, 3 versions
|
||||
|
||||
|
||||
/*
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
/**
|
||||
* @return true if the message types are handled
|
||||
*/
|
||||
|
|
|
@ -21,6 +21,9 @@ import net.engio.mbassy.listener.MessageHandler;
|
|||
* The subscription provides functionality for message publication by means of delegation to the respective
|
||||
* message dispatcher.
|
||||
*
|
||||
* @author bennidi
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class Subscription {
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ import net.engio.mbassy.listener.MetadataReader;
|
|||
*
|
||||
* @author bennidi
|
||||
* Date: 5/11/13
|
||||
* @author dorkbox, llc
|
||||
* Date: 2/2/15
|
||||
*/
|
||||
public class SubscriptionManager {
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/*
|
||||
* Copyright 2015 dorkbox, llc
|
||||
*/
|
||||
package net.engio.mbassy;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
|
Loading…
Reference in New Issue