@Test void handlingDssRestMasterActorCommandRequest() { restMasterActorRef.tell(DssRestMasterActorCommandRequest .builder() .channelId("abcdefg") .sender(probe.ref()) .methodType(DssRestMethodType.GET) .path("/test") .build()); probe.expectMessageClass(DssRestChannelHandlerCommandResponse.class); assertTrue(true); }
private Behavior<DssRestMasterActorCommand> handlingDssRestMasterActorCommandRequest(DssRestMasterActorCommandRequest request) { context.getLog().info("DssRestMasterActorCommandRequest: {}", request); final Optional<ActorRef<DssRestServiceActorCommand>> optional = dssRestPathResolver.getStaticServiceActor(request.getMethodType(), request.getPath()); if (optional.isPresent()) { optional.get().tell(new DssRestServiceActorCommandRequest(request)); } else { request .getSender() .tell(DssRestChannelHandlerCommandResponse .builder() .channelId(request.getChannelId()) .status(HttpResponseStatus.BAD_REQUEST.code()) .build() ); } return Behaviors.same(); }
DssRestMasterActor { private Behavior<DssRestMasterActorCommand> handlingDssRestMasterActorCommandRequest(DssRestMasterActorCommandRequest request) { context.getLog().info("DssRestMasterActorCommandRequest: {}", request); final Optional<ActorRef<DssRestServiceActorCommand>> optional = dssRestPathResolver.getStaticServiceActor(request.getMethodType(), request.getPath()); if (optional.isPresent()) { optional.get().tell(new DssRestServiceActorCommandRequest(request)); } else { request .getSender() .tell(DssRestChannelHandlerCommandResponse .builder() .channelId(request.getChannelId()) .status(HttpResponseStatus.BAD_REQUEST.code()) .build() ); } return Behaviors.same(); } }
DssRestMasterActor { private Behavior<DssRestMasterActorCommand> handlingDssRestMasterActorCommandRequest(DssRestMasterActorCommandRequest request) { context.getLog().info("DssRestMasterActorCommandRequest: {}", request); final Optional<ActorRef<DssRestServiceActorCommand>> optional = dssRestPathResolver.getStaticServiceActor(request.getMethodType(), request.getPath()); if (optional.isPresent()) { optional.get().tell(new DssRestServiceActorCommandRequest(request)); } else { request .getSender() .tell(DssRestChannelHandlerCommandResponse .builder() .channelId(request.getChannelId()) .status(HttpResponseStatus.BAD_REQUEST.code()) .build() ); } return Behaviors.same(); } private  DssRestMasterActor(ActorContext<DssRestMasterActorCommand> context, List<DssRestActorService> serviceList); }
DssRestMasterActor { private Behavior<DssRestMasterActorCommand> handlingDssRestMasterActorCommandRequest(DssRestMasterActorCommandRequest request) { context.getLog().info("DssRestMasterActorCommandRequest: {}", request); final Optional<ActorRef<DssRestServiceActorCommand>> optional = dssRestPathResolver.getStaticServiceActor(request.getMethodType(), request.getPath()); if (optional.isPresent()) { optional.get().tell(new DssRestServiceActorCommandRequest(request)); } else { request .getSender() .tell(DssRestChannelHandlerCommandResponse .builder() .channelId(request.getChannelId()) .status(HttpResponseStatus.BAD_REQUEST.code()) .build() ); } return Behaviors.same(); } private  DssRestMasterActor(ActorContext<DssRestMasterActorCommand> context, List<DssRestActorService> serviceList); static Behavior<DssRestMasterActorCommand> create(List<DssRestActorService> serviceList); }
DssRestMasterActor { private Behavior<DssRestMasterActorCommand> handlingDssRestMasterActorCommandRequest(DssRestMasterActorCommandRequest request) { context.getLog().info("DssRestMasterActorCommandRequest: {}", request); final Optional<ActorRef<DssRestServiceActorCommand>> optional = dssRestPathResolver.getStaticServiceActor(request.getMethodType(), request.getPath()); if (optional.isPresent()) { optional.get().tell(new DssRestServiceActorCommandRequest(request)); } else { request .getSender() .tell(DssRestChannelHandlerCommandResponse .builder() .channelId(request.getChannelId()) .status(HttpResponseStatus.BAD_REQUEST.code()) .build() ); } return Behaviors.same(); } private  DssRestMasterActor(ActorContext<DssRestMasterActorCommand> context, List<DssRestActorService> serviceList); static Behavior<DssRestMasterActorCommand> create(List<DssRestActorService> serviceList);  }