/*
 * Copyright 2016, TeamDev Ltd. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.spine3.server.integration;

import com.google.protobuf.Message;
import org.spine3.server.BoundedContext;
import org.spine3.server.event.EventBus;

/**
 *
 */
public class IntegrationEventBus {

    private final EventBus bus;

    public IntegrationEventBus() {
        //TODO:2016-04-27:alexander.yevsyukov: Implement.
        bus = null;
    }

    public void post(IntegrationEvent event) {
        //TODO:2016-04-27:alexander.yevsyukov: Implement
    }

    public void subscribe(Iterable<Class<? extends Message>> integrationEventClasses,
                          BoundedContext subscriber) {
        //TODO:2016-04-27:alexander.yevsyukov: Implement
    }

    private enum Singleton {
        INSTANCE;

        @SuppressWarnings("NonSerializableFieldInSerializableClass")
        private final IntegrationEventBus value = new IntegrationEventBus();
    }

    private static IntegrationEventBus instance() {
        return Singleton.INSTANCE.value;
    }
}

@@ -1061,76 +1061,136 @@
 ort 
-com.google.protobuf.Message;%0Aimport org.spine3.server.BoundedContext
+org.spine3.server.event.EventBus;%0Aimport org.spine3.server.integration.IntegrationEventSubscriberGrpc.IntegrationEventSubscriber
 ;%0Aim
@@ -1212,29 +1212,30 @@
 .server.
-event
+type
 .Event
-Bu
+Clas
 s;%0A%0A/**%0A
@@ -1549,64 +1549,62 @@
     
-public void subscribe(Iterable%3CClass%3C? extends Message%3E%3E
+/**%0A     * Subscribes the passed subscriber to receive
  int
@@ -1615,62 +1615,137 @@
 tion
-E
+ e
 vent
-C
+s of the specified c
 lasses
-,
+.
 %0A     
+*/%0A
     
-                 BoundedContext
+public void subscribe(Iterable%3CEventClass%3E eventClasses, IntegrationEventSubscriber
  sub

Make `IntegrationEventBus` know only about subscriber interface, not `BoundedContext.`