class CreateAsyncOpPlugin implements IPlugin {

    @Override
    public void load() throws PluginException {
        try {
            IBootstrapItem<String> item = new BootstrapItem("CreateAsyncOperationActorPlugin");

            item
//                    .after("IOC")
//                    .after("datetime_formatter_plugin")
//                    .before("starter")
                    .process(() -> {
                        try {
                            IKey createAsyncOpKey = Keys.getOrAdd(CreateAsyncOperationActor.class.getCanonicalName());
                            IOC.register(createAsyncOpKey, new CreateNewInstanceStrategy(
                                    (args) -> {
                                        try {
                                            return new CreateAsyncOperationActor((IObject) args[0]);
                                        } catch (Exception e) {
                                            throw new RuntimeException(e);
                                        }
                                    }));
                        } catch (ResolutionException e) {
                            throw new ActionExecuteException("CreateAsyncOperationActor plugin can't load: can't get CreateAsyncOperationActor key", e);
                        } catch (InvalidArgumentException e) {
                            throw new ActionExecuteException("CreateAsyncOperationActor plugin can't load: can't create strategy", e);
                        } catch (RegistrationException e) {
                            throw new ActionExecuteException("CreateAsyncOperationActor plugin can't load: can't register new strategy", e);
                        }
                    });
            bootstrap.add(item);
        } catch (Exception e) {
            throw new PluginException("Can't load CreateAsyncOperationActor plugin", e);
        }
    }

    public  CreateAsyncOpPlugin(final IBootstrap<IBootstrapItem<String>> bootstrap);

}