Skip to content

Commit

Permalink
🐳
Browse files Browse the repository at this point in the history
  • Loading branch information
iohao committed May 2, 2024
1 parent 5778ac6 commit 5a04384
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private void executeActionListeners() {
final class ActionParserListeners {
final List<ActionParserListener> listeners = new CopyOnWriteArrayList<>();

void addParserActionListener(ActionParserListener listener) {
void addActionParserListener(ActionParserListener listener) {
this.listeners.add(listener);
}

Expand All @@ -314,8 +314,8 @@ public boolean isEmpty() {
public ActionParserListeners() {
// 监听器 - 预先创建协议代理类
if (DataCodecKit.getDataCodec() instanceof ProtoDataCodec) {
this.addParserActionListener(ProtobufActionParserListener.me());
this.addParserActionListener(ProtobufCheckActionParserListener.me());
this.addActionParserListener(ProtobufActionParserListener.me());
this.addActionParserListener(ProtobufCheckActionParserListener.me());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ public BarSkeletonBuilder addRunner(Runner runner) {
return this;
}

public BarSkeletonBuilder addParserActionListener(ActionParserListener listener) {
this.actionParserListeners.addParserActionListener(listener);
public BarSkeletonBuilder addActionParserListener(ActionParserListener listener) {
this.actionParserListeners.addActionParserListener(listener);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package com.iohao.game.action.skeleton.core;

import com.iohao.game.action.skeleton.core.action.SimpleWrapperActionAction;
import com.iohao.game.action.skeleton.core.action.SimpleWrapperAction;
import com.iohao.game.action.skeleton.core.data.TestDataKit;
import com.iohao.game.action.skeleton.core.flow.FlowContext;
import com.iohao.game.action.skeleton.protocol.wrapper.IntValue;
Expand All @@ -33,13 +33,13 @@
* @date 2024-05-02
*/
@Slf4j
public class SimpleWrapperActionActionTest {
public class SimpleWrapperActionTest {

BarSkeleton barSkeleton;

@Before
public void setUp() {
barSkeleton = TestDataKit.createBuilder(SimpleWrapperActionAction.class::equals).build();
barSkeleton = TestDataKit.createBuilder(SimpleWrapperAction.class::equals).build();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ interface WrapperLongActionCmd {
interface SimpleWrapperActionActionCmd {
int cmd = 13;
int testInt = 0;
int testObject = 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,9 @@
*/
@Slf4j
@ActionController(ExampleActionCmd.SimpleWrapperActionActionCmd.cmd)
public class SimpleWrapperActionAction {
public class SimpleWrapperAction {
@ActionMethod(ExampleActionCmd.SimpleWrapperActionActionCmd.testInt)
public void testInt(int age) {
System.out.println(age);
}

@ActionMethod(ExampleActionCmd.SimpleWrapperActionActionCmd.testObject)
public int testObject() {
return 0;
}
}

0 comments on commit 5a04384

Please sign in to comment.