All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.extras.creaper.commands.undertow.RemoveHttpsSecurityRealm Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package org.wildfly.extras.creaper.commands.undertow;

import org.wildfly.extras.creaper.core.online.OnlineCommand;
import org.wildfly.extras.creaper.core.online.OnlineCommandContext;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.Operations;

import java.io.IOException;

/**
 * Command which removes specified security realm.
 */
public final class RemoveHttpsSecurityRealm implements OnlineCommand {
    private final String realmName;

    public RemoveHttpsSecurityRealm(String realmName) {
        this.realmName = realmName;
    }

    @Override
    public void apply(OnlineCommandContext ctx) throws IOException {
        Operations ops = new Operations(ctx.client);
        ops.remove(Address.coreService("management").and("security-realm", realmName));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy