// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/domain/handler/common/ConversationHandler.java
// public abstract class ConversationHandler implements NextRTCHandler {
// 
//     @Override
//     public final void handleEvent(NextRTCEvent event) {
//         event.conversation().ifPresent(conversation -> handleEvent(conversation, event));
//     }
// 
//     protected abstract void handleEvent(NextRTCConversation conversation, NextRTCEvent event);
// }
// 
// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/service/MemberLeftService.java
// @Service
// @Transactional
// public class MemberLeftService {
// 
//     @Autowired
//     private MemberRepository memberRepository;
// 
//     @Autowired
//     private ConversationRepository conversationRepository;
// 
//     public void execute(String memberId, String conversationId) {
//         Member member = memberRepository.getByRtcId(memberId);
//         Conversation conversation = conversationRepository.getByConversationName(conversationId);
// 
//         member.leaves(conversation);
//     }
// }


import org.nextrtc.examples.videochat_with_rest.domain.handler.common.ConversationHandler;
import org.nextrtc.examples.videochat_with_rest.service.MemberLeftService;
import org.nextrtc.signalingserver.api.annotation.NextRTCEventListener;
import org.nextrtc.signalingserver.api.dto.NextRTCConversation;
import org.nextrtc.signalingserver.api.dto.NextRTCEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import static org.nextrtc.signalingserver.api.NextRTCEvents.MEMBER_LEFT;
package org.nextrtc.examples.videochat_with_rest.domain.handler;



@Component
@NextRTCEventListener(MEMBER_LEFT)
// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/domain/handler/common/ConversationHandler.java
// public abstract class ConversationHandler implements NextRTCHandler {
// 
//     @Override
//     public final void handleEvent(NextRTCEvent event) {
//         event.conversation().ifPresent(conversation -> handleEvent(conversation, event));
//     }
// 
//     protected abstract void handleEvent(NextRTCConversation conversation, NextRTCEvent event);
// }
// 
// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/service/MemberLeftService.java
// @Service
// @Transactional
// public class MemberLeftService {
// 
//     @Autowired
//     private MemberRepository memberRepository;
// 
//     @Autowired
//     private ConversationRepository conversationRepository;
// 
//     public void execute(String memberId, String conversationId) {
//         Member member = memberRepository.getByRtcId(memberId);
//         Conversation conversation = conversationRepository.getByConversationName(conversationId);
// 
//         member.leaves(conversation);
//     }
// }


// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/domain/handler/MemberLeftHandler.java
import org.nextrtc.examples.videochat_with_rest.domain.handler.common.ConversationHandler;
import org.nextrtc.examples.videochat_with_rest.service.MemberLeftService;
import org.nextrtc.signalingserver.api.annotation.NextRTCEventListener;
import org.nextrtc.signalingserver.api.dto.NextRTCConversation;
import org.nextrtc.signalingserver.api.dto.NextRTCEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import static org.nextrtc.signalingserver.api.NextRTCEvents.MEMBER_LEFT;

package org.nextrtc.examples.videochat_with_rest.domain.handler;



@Component
@NextRTCEventListener(MEMBER_LEFT)
public class MemberLeftHandler extends ConversationHandler {