Search in sources :

Example 6 with WildflyProvider

use of org.guvnor.ala.wildfly.model.WildflyProvider in project kie-wb-common by kiegroup.

the class WildflyRuntimeExecExecutor method destroy.

@Override
public void destroy(final RuntimeId runtimeId) {
    final Optional<WildflyProvider> _wildflyProvider = runtimeRegistry.getProvider(runtimeId.getProviderId(), WildflyProvider.class);
    WildflyProvider wildflyProvider = _wildflyProvider.get();
    int result = wildfly.getWildflyClient(wildflyProvider).undeploy(runtimeId.getId());
    if (result != 200) {
        throw new ProvisioningException("UnDeployment to Wildfly Failed with error code: " + result);
    }
    runtimeRegistry.deregisterRuntime(runtimeId);
}
Also used : ProvisioningException(org.guvnor.ala.exceptions.ProvisioningException) WildflyRuntimeEndpoint(org.guvnor.ala.wildfly.model.WildflyRuntimeEndpoint) WildflyProvider(org.guvnor.ala.wildfly.model.WildflyProvider)

Aggregations

WildflyProvider (org.guvnor.ala.wildfly.model.WildflyProvider)6 ProvisioningException (org.guvnor.ala.exceptions.ProvisioningException)3 MavenBinary (org.guvnor.ala.build.maven.model.MavenBinary)2 WildflyRuntimeExecConfig (org.guvnor.ala.wildfly.config.WildflyRuntimeExecConfig)2 ContextAwareWildflyRuntimeExecConfig (org.guvnor.ala.wildfly.config.impl.ContextAwareWildflyRuntimeExecConfig)2 WildflyRuntimeEndpoint (org.guvnor.ala.wildfly.model.WildflyRuntimeEndpoint)2 Test (org.junit.Test)2 File (java.io.File)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 Provider (org.guvnor.ala.runtime.providers.Provider)1 WildflyAppState (org.guvnor.ala.wildfly.access.WildflyAppState)1 WildflyProviderConfig (org.guvnor.ala.wildfly.config.WildflyProviderConfig)1 WildflyProviderConfigImpl (org.guvnor.ala.wildfly.config.impl.WildflyProviderConfigImpl)1 WildflyProviderImpl (org.guvnor.ala.wildfly.model.WildflyProviderImpl)1 WildflyRuntime (org.guvnor.ala.wildfly.model.WildflyRuntime)1 WildflyRuntimeInfo (org.guvnor.ala.wildfly.model.WildflyRuntimeInfo)1 WildflyRuntimeState (org.guvnor.ala.wildfly.model.WildflyRuntimeState)1 Path (org.uberfire.java.nio.file.Path)1