/**
 * Copyright (C) 2016 Red Hat, Inc.
 *
 * 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 com.redhat.ipaas.core;

/**
 * Interface for subscribing/unsubscribing clients and publishing events to them.
 */
public interface EventBus {

    public interface Subscription {
        void onEvent(String event, String data);
    }

    public Subscription subscribe(String subscriberId, Subscription handler);
    public Subscription unsubscribe(String subscriberId);

    public void broadcast(String event, String data);
    public void send(String subscriberId, String event, String data);
}

@@ -656,40 +656,36 @@
 for 
-subscribing/unsubscribing client
+managing client subscription
 s an
@@ -754,286 +754,1355 @@
     
-public interface Subscription %7B%0A        void onEvent(String event, String data);%0A    %7D%0A%0A    public Subscription subscribe(String subscriberId, Subscription handler);%0A    public Subscription unsubscribe(String subscriberId);%0A%0A    public void broadcast(String event, String data);
+/**%0A     * Callback interface clients implement to receive events.%0A     */%0A    public interface Subscription %7B%0A%0A        /**%0A         * This method must never block.%0A         *%0A         * @param event the type of event being delivered%0A         * @param data the data associated the the event type%0A         */%0A        void onEvent(String event, String data);%0A    %7D%0A%0A    /**%0A     * Adds a subscription to the event bus.%0A     *%0A     * @param subscriberId unique id for the subscription.%0A     * @param handler the callback that will receive the events.%0A     * @return the previously registered subscription with that id or null.%0A     */%0A    public Subscription subscribe(String subscriberId, Subscription handler);%0A%0A    /**%0A     * Removes a subscription from the event bus.%0A     * @param subscriberId unique id for the subscription.%0A     * @return the previously registered subscription with that id or null if not registered.%0A     */%0A    public Subscription unsubscribe(String subscriberId);%0A%0A    /**%0A     * Send an event to all subscribers in a bus.  The event MAY get delivered to the subscriptions%0A     * after this call returns.%0A     */%0A    public void broadcast(String event, String data);%0A%0A    /**%0A     * Send an event to a specific subscriber on the bus.  The event MAY get delivered to the subscriptions%0A     * after this call returns.%0A     */
 %0A   

Add more javadoc around the event bus.