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

org.jboss.as.arquillian.container.ServerManagerProvider Maven / Gradle / Ivy

There is a newer version: 5.1.0.Beta6
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.arquillian.container;

import java.lang.annotation.Annotation;

import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.wildfly.plugin.tools.server.ServerManager;

/**
 * A provider for {@link ArquillianResource} injection of a {@link ServerManager}.
 *
 * @author James R. Perkins
 */
public class ServerManagerProvider extends AbstractTargetsContainerProvider {

    @Inject
    private Instance serverManager;

    @Override
    public boolean canProvide(final Class type) {
        return ServerManager.class.isAssignableFrom(type);
    }

    @Override
    public Object doLookup(final ArquillianResource resource, final Annotation... qualifiers) {
        return serverManager.get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy