// Path: src/main/java/se/omegapoint/facepalm/domain/event/EventService.java
// public interface EventService {
//     void publish(ApplicationEvent event);
// }
// 
// Path: src/main/java/se/omegapoint/facepalm/infrastructure/event/ApplicationEventLogger.java
// public final class ApplicationEventLogger implements Consumer<Event<GenericEvent>> {
//     private final Logger logger = LoggerFactory.getLogger(getClass());
// 
//     @Override
//     public void accept(final Event<GenericEvent> event) {
//         notNull(event);
//         logger.info(event.getData().message());
//     }
// }
// 
// Path: src/main/java/se/omegapoint/facepalm/infrastructure/event/ReactorEventService.java
// public class ReactorEventService implements EventService {
// 
//     private final EventBus eventBus;
// 
//     public ReactorEventService(final EventBus eventBus) {
//         this.eventBus = notNull(eventBus);
//     }
// 
//     public void publish(final ApplicationEvent event) {
//         notNull(event);
//         eventBus.notify(GLOBAL.channel, Event.wrap(event));
//     }
// 
//     public <E extends ApplicationEvent> void register(final Selector channel, final Consumer<Event<E>> eventListener) {
//         notNull(eventListener);
//         notNull(channel);
//         eventBus.on(channel, eventListener);
//     }
// }


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.bus.EventBus;
import se.omegapoint.facepalm.domain.event.EventService;
import se.omegapoint.facepalm.infrastructure.event.ApplicationEventLogger;
import se.omegapoint.facepalm.infrastructure.event.ReactorEventService;
import static se.omegapoint.facepalm.infrastructure.event.EventChannel.GLOBAL;
/*
 * Copyright 2016 the original author or authors.
 *
 * 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 se.omegapoint.facepalm.client.config;



@Configuration
public class EventServiceConfig {
    @Bean
// Path: src/main/java/se/omegapoint/facepalm/domain/event/EventService.java
// public interface EventService {
//     void publish(ApplicationEvent event);
// }
// 
// Path: src/main/java/se/omegapoint/facepalm/infrastructure/event/ApplicationEventLogger.java
// public final class ApplicationEventLogger implements Consumer<Event<GenericEvent>> {
//     private final Logger logger = LoggerFactory.getLogger(getClass());
// 
//     @Override
//     public void accept(final Event<GenericEvent> event) {
//         notNull(event);
//         logger.info(event.getData().message());
//     }
// }
// 
// Path: src/main/java/se/omegapoint/facepalm/infrastructure/event/ReactorEventService.java
// public class ReactorEventService implements EventService {
// 
//     private final EventBus eventBus;
// 
//     public ReactorEventService(final EventBus eventBus) {
//         this.eventBus = notNull(eventBus);
//     }
// 
//     public void publish(final ApplicationEvent event) {
//         notNull(event);
//         eventBus.notify(GLOBAL.channel, Event.wrap(event));
//     }
// 
//     public <E extends ApplicationEvent> void register(final Selector channel, final Consumer<Event<E>> eventListener) {
//         notNull(eventListener);
//         notNull(channel);
//         eventBus.on(channel, eventListener);
//     }
// }


// Path: src/main/java/se/omegapoint/facepalm/client/config/EventServiceConfig.java
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.bus.EventBus;
import se.omegapoint.facepalm.domain.event.EventService;
import se.omegapoint.facepalm.infrastructure.event.ApplicationEventLogger;
import se.omegapoint.facepalm.infrastructure.event.ReactorEventService;
import static se.omegapoint.facepalm.infrastructure.event.EventChannel.GLOBAL;

/*
 * Copyright 2016 the original author or authors.
 *
 * 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 se.omegapoint.facepalm.client.config;



@Configuration
public class EventServiceConfig {
    @Bean
    public EventService eventService() {