// Path: src/main/java/org/nextrtc/signalingserver/Names.java
// public interface Names {
//     String EVENT_BUS = "nextRTCEventBus";
//     String EVENT_DISPATCHER = "nextRTCEventDispatcher";
// 
//     String SCHEDULER_SIZE = "${nextrtc.scheduler_size:10}";
//     String SCHEDULER_NAME = "nextRTCPingScheduler";
//     String SCHEDULED_PERIOD = "${nextrtc.ping_period:3}";
//     String MAX_CONNECTION_SETUP_TIME = "${nextrtc.max_connection_setup_time:30}";
//     String JOIN_ONLY_TO_EXISTING = "${nextrtc.join_only_to_existing:false}";
// 
//     String DEFAULT_CONVERSATION_TYPE = "${nextrtc.default_conversation_type:MESH}";
// }
// 
// Path: src/main/java/org/nextrtc/signalingserver/api/dto/NextRTCEvent.java
// public interface NextRTCEvent {
// 
//     NextRTCEvents type();
// 
//     ZonedDateTime published();
// 
//     Optional<NextRTCMember> from();
// 
//     Optional<NextRTCMember> to();
// 
//     Optional<NextRTCConversation> conversation();
// 
//     Optional<SignalingException> exception();
// 
//     Map<String, String> custom();
// 
//     String content();
// 
// }


import com.google.common.eventbus.EventBus;
import lombok.extern.slf4j.Slf4j;
import org.nextrtc.signalingserver.Names;
import org.nextrtc.signalingserver.api.dto.NextRTCEvent;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
package org.nextrtc.signalingserver.api;


@Slf4j
@Service(Names.EVENT_BUS)
@Scope("singleton")
public class NextRTCEventBus {
    private EventBus eventBus;

    public NextRTCEventBus() {
        this.eventBus = new EventBus();
    }

// Path: src/main/java/org/nextrtc/signalingserver/Names.java
// public interface Names {
//     String EVENT_BUS = "nextRTCEventBus";
//     String EVENT_DISPATCHER = "nextRTCEventDispatcher";
// 
//     String SCHEDULER_SIZE = "${nextrtc.scheduler_size:10}";
//     String SCHEDULER_NAME = "nextRTCPingScheduler";
//     String SCHEDULED_PERIOD = "${nextrtc.ping_period:3}";
//     String MAX_CONNECTION_SETUP_TIME = "${nextrtc.max_connection_setup_time:30}";
//     String JOIN_ONLY_TO_EXISTING = "${nextrtc.join_only_to_existing:false}";
// 
//     String DEFAULT_CONVERSATION_TYPE = "${nextrtc.default_conversation_type:MESH}";
// }
// 
// Path: src/main/java/org/nextrtc/signalingserver/api/dto/NextRTCEvent.java
// public interface NextRTCEvent {
// 
//     NextRTCEvents type();
// 
//     ZonedDateTime published();
// 
//     Optional<NextRTCMember> from();
// 
//     Optional<NextRTCMember> to();
// 
//     Optional<NextRTCConversation> conversation();
// 
//     Optional<SignalingException> exception();
// 
//     Map<String, String> custom();
// 
//     String content();
// 
// }


// Path: src/main/java/org/nextrtc/signalingserver/api/NextRTCEventBus.java
import com.google.common.eventbus.EventBus;
import lombok.extern.slf4j.Slf4j;
import org.nextrtc.signalingserver.Names;
import org.nextrtc.signalingserver.api.dto.NextRTCEvent;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

package org.nextrtc.signalingserver.api;


@Slf4j
@Service(Names.EVENT_BUS)
@Scope("singleton")
public class NextRTCEventBus {
    private EventBus eventBus;

    public NextRTCEventBus() {
        this.eventBus = new EventBus();
    }

    public void post(NextRTCEvent event) {