WangHan
2024-09-12 d5855a4926926698b740bc6c7ba489de47adb68b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package tech.powerjob.remote.framework.test;
 
import lombok.extern.slf4j.Slf4j;
import tech.powerjob.remote.framework.actor.Actor;
import tech.powerjob.remote.framework.actor.Handler;
 
import java.util.Map;
 
/**
 * TestActor
 *
 * @author tjq
 * @since 2022/12/31
 */
@Slf4j
@Actor(path = "/test")
public class TestActor {
 
    public static void simpleStaticMethod() {
    }
 
    public void simpleMethod() {
    }
 
    @Handler(path = "/method1")
    public String handlerMethod1() {
        log.info("[TestActor] handlerMethod1");
        return "1";
    }
 
    @Handler(path = "/method2")
    public String handlerMethod2(String name) {
        log.info("[TestActor] handlerMethod2 req: {}", name);
        return name;
    }
 
    @Handler(path = "/returnEmpty")
    public void handlerEmpty(Map<String, Object> req) {
        log.info("[TestActor] handlerEmpty req: {}", req);
    }
 
}