use of org.hyperledger.besu.plugin.services.PicoCLIOptions in project besu by hyperledger.
the class BadCLIOptionsPlugin method register.
@Override
public void register(final BesuContext context) {
LOG.info("Registering BadCliOptionsPlugin");
callbackDir = new File(System.getProperty("besu.plugins.dir", "plugins"));
writeStatus("init");
if (System.getProperty("TEST_BAD_CLI", "false").equals("true")) {
context.getService(PicoCLIOptions.class).ifPresent(picoCLIOptions -> picoCLIOptions.addPicoCLIOptions("bad-cli", BadCLIOptionsPlugin.this));
}
writeStatus("register");
}
use of org.hyperledger.besu.plugin.services.PicoCLIOptions in project besu by hyperledger.
the class TestPicoCLIPlugin method register.
@Override
public void register(final BesuContext context) {
LOG.info("Registering. Test Option is '{}'", testOption);
state = "registering";
if ("FAILREGISTER".equals(testOption)) {
state = "failregister";
throw new RuntimeException("I was told to fail at registration");
}
context.getService(PicoCLIOptions.class).ifPresent(picoCLIOptions -> picoCLIOptions.addPicoCLIOptions("test", this));
callbackDir = new File(System.getProperty("besu.plugins.dir", "plugins"));
writeSignal("registered");
state = "registered";
}
Aggregations