Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void registerOperations(ManagementResourceRegistration resourceRegistration) {
- super.registerOperations(resourceRegistration);
- resourceRegistration.registerOperationHandler(POKUS, MyRuntimeOperationHandler.INSTANCE);
- }
- private static class MyRuntimeOperationHandler extends AbstractRuntimeOnlyHandler {
- private static final MyRuntimeOperationHandler INSTANCE = new MyRuntimeOperationHandler();
- @Override
- protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException {
- ServiceName serviceName = HackDefinition.KEY_STORE_RUNTIME_CAPABILITY.getCapabilityServiceName("KeyStore1");
- KeyStore keyStore = (KeyStore) context.getServiceRegistry(false).getService(serviceName).getValue();
- System.out.println("keystore = "+keyStore.toString());
- context.getResult().set("keystore = "+keyStore.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement