-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSseAdapter.java
More file actions
24 lines (19 loc) · 821 Bytes
/
SseAdapter.java
File metadata and controls
24 lines (19 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package clap.server.adapter.outbound.infrastructure.sse;
import clap.server.adapter.outbound.infrastructure.sse.repository.EmitterRepository;
import clap.server.application.port.outbound.notification.CommandSsePort;
import clap.server.common.annotation.architecture.InfrastructureAdapter;
import lombok.RequiredArgsConstructor;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
@InfrastructureAdapter
@RequiredArgsConstructor
public class SseAdapter implements CommandSsePort {
private final EmitterRepository emitterRepository;
@Override
public void save(final Long receiverId,final SseEmitter emitter) {
emitterRepository.save(receiverId, emitter);
}
@Override
public void delete(final Long receiverId) {
emitterRepository.delete(receiverId);
}
}