@Test void create() { final DssRestChannelInitializer dssRestChannelInitializer = new DssRestChannelInitializer(Collections.emptyList()); final Behavior<DssRestChannelInitializerCommand> behavior = dssRestChannelInitializer.create(); assertNotNull(behavior); final ActorRef<DssRestChannelInitializerCommand> actorRef = testKit.spawn(behavior); assertNotNull(actorRef); }
@Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); }
DssRestChannelInitializer extends ChannelInitializer<SocketChannel> implements DssChannelInitializer<DssRestChannelInitializerCommand> { @Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); } }
DssRestChannelInitializer extends ChannelInitializer<SocketChannel> implements DssChannelInitializer<DssRestChannelInitializerCommand> { @Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); } DssRestChannelInitializer(List<DssRestActorService> serviceList); }
DssRestChannelInitializer extends ChannelInitializer<SocketChannel> implements DssChannelInitializer<DssRestChannelInitializerCommand> { @Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); } DssRestChannelInitializer(List<DssRestActorService> serviceList); @Override Behavior<DssRestChannelInitializerCommand> create(); }
DssRestChannelInitializer extends ChannelInitializer<SocketChannel> implements DssChannelInitializer<DssRestChannelInitializerCommand> { @Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); } DssRestChannelInitializer(List<DssRestActorService> serviceList); @Override Behavior<DssRestChannelInitializerCommand> create();  }