当前位置: 首页>>代码示例>>Java>>正文


Java GraviaConstants类代码示例

本文整理汇总了Java中org.wildfly.extension.gravia.GraviaConstants的典型用法代码示例。如果您正苦于以下问题:Java GraviaConstants类的具体用法?Java GraviaConstants怎么用?Java GraviaConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GraviaConstants类属于org.wildfly.extension.gravia包,在下文中一共展示了GraviaConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    Resource resource = depUnit.getAttachment(GraviaConstants.RESOURCE_KEY);
    if (resource != null)
        return;

    resource = NamedResourceAssociation.getResource(depUnit.getName());
    if (resource == null) {
        ResourceRoot deploymentRoot = depUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
        Manifest manifest = deploymentRoot != null ? deploymentRoot.getAttachment(Attachments.MANIFEST) : null;
        if (manifest != null) {
            ManifestResourceBuilder builder = new ManifestResourceBuilder().load(manifest);
            if (builder.isValid()) {
                resource = builder.getResource();
            }
        }
    }

    if (resource != null) {
        depUnit.putAttachment(GraviaConstants.RESOURCE_KEY, resource);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:25,代码来源:ManifestResourceProcessor.java

示例2: install

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public ServiceController<Void> install(ServiceTarget serviceTarget, ServiceVerificationHandler verificationHandler) {
    ServiceBuilder<Void> builder = serviceTarget.addService(FabricConstants.FABRIC_SUBSYSTEM_SERVICE_NAME, this);
    builder.addDependency(GraviaConstants.MODULE_CONTEXT_SERVICE_NAME, ModuleContext.class, injectedModuleContext);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, injectedRuntime);
    builder.addListener(verificationHandler);
    return builder.install();
}
 
开发者ID:tdiesler,项目名称:fabric8poc,代码行数:8,代码来源:FabricBootstrapService.java

示例3: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public static ServiceController<UndertowHost> addService(ServiceTarget serviceTarget, RuntimeState runtimeState) {
    CamelUndertowHostService service = new CamelUndertowHostService(runtimeState);
    ServiceBuilder<UndertowHost> builder = serviceTarget.addService(SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    builder.addDependency(UndertowService.UNDERTOW, UndertowService.class, service.injectedUndertowService);
    builder.addDependency(SocketBinding.JBOSS_BINDING_NAME.append("http"), SocketBinding.class, service.injectedHttpSocketBinding);
    builder.addDependency(UndertowService.virtualHostName("default-server", "default-host"), Host.class, service.injectedDefaultHost);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:11,代码来源:CamelUndertowHostService.java

示例4: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public static ServiceController<Host> addService(ServiceTarget serviceTarget) {
    UndertowHostService service = new UndertowHostService();
    ServiceBuilder<Host> builder = serviceTarget.addService(SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    builder.addDependency(UndertowService.virtualHostName("default-server", "default-host"), Host.class, service.injectedDefaultHost);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:8,代码来源:UndertowHostService.java

示例5: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    CamelDeploymentSettings depSettings = depUnit.getAttachment(CamelDeploymentSettings.ATTACHMENT_KEY);

    // No camel dependencies if camel is disabled
    if (!depSettings.isEnabled()) {
        return;
    }

    phaseContext.addDeploymentDependency(CamelConstants.CONTEXT_CREATE_HANDLER_REGISTRY_SERVICE_NAME, CamelConstants.CONTEXT_CREATE_HANDLER_REGISTRY_KEY);
    phaseContext.addDeploymentDependency(CamelConstants.CAMEL_CONTEXT_REGISTRY_SERVICE_NAME, CamelConstants.CAMEL_CONTEXT_REGISTRY_KEY);
    phaseContext.addDeploymentDependency(CamelConstants.CAMEL_CONTEXT_FACTORY_SERVICE_NAME, CamelConstants.CAMEL_CONTEXT_FACTORY_KEY);
    phaseContext.addDeploymentDependency(GraviaConstants.RUNTIME_SERVICE_NAME, GraviaConstants.RUNTIME_KEY);
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:16,代码来源:CamelIntegrationProcessor.java

示例6: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public static ServiceController<MutableCamelContextRegistry> addService(ServiceTarget serviceTarget, SubsystemState subsystemState) {
    CamelContextRegistryService service = new CamelContextRegistryService(subsystemState);
    ServiceBuilder<MutableCamelContextRegistry> builder = serviceTarget.addService(CamelConstants.CAMEL_CONTEXT_REGISTRY_SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    builder.addDependency(CamelConstants.CONTEXT_CREATE_HANDLER_REGISTRY_SERVICE_NAME, ContextCreateHandlerRegistry.class, service.injectedHandlerRegistry);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:8,代码来源:CamelContextRegistryService.java

示例7: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    Resource resource = depUnit.getAttachment(GraviaConstants.RESOURCE_KEY);
    if (resource != null) {
        phaseContext.addDeploymentDependency(GraviaConstants.RUNTIME_SERVICE_NAME, GraviaConstants.RUNTIME_KEY);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:9,代码来源:GraviaServicesProcessor.java

示例8: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    Module module = depUnit.getAttachment(GraviaConstants.MODULE_KEY);
    if (module != null) {
        try {
            module.start();
        } catch (ModuleException ex) {
            throw new DeploymentUnitProcessingException(ex);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:13,代码来源:ModuleStartProcessor.java

示例9: undeploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void undeploy(final DeploymentUnit depUnit) {
    Module module = depUnit.getAttachment(GraviaConstants.MODULE_KEY);
    if (module != null && module.getState() != Module.State.UNINSTALLED) {
        try {
            module.stop();
        } catch (ModuleException ex) {
            LOGGER.error("Cannot stop module: " + module, ex);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:12,代码来源:ModuleStartProcessor.java

示例10: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    if (depUnit.hasAttachment(GraviaConstants.RESOURCE_KEY)) {
        ModuleSpecification moduleSpecification = depUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
        moduleSpecification.addSystemDependencies(systemDependencies);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:9,代码来源:ModuleDependenciesProcessor.java

示例11: deploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    Resource resource = depUnit.getAttachment(GraviaConstants.RESOURCE_KEY);
    if (resource == null)
        return;

    // Get the headers from the manifest
    Dictionary<String, String> headers = null;
    ResourceRoot deploymentRoot = depUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
    Manifest manifest = deploymentRoot != null ? deploymentRoot.getAttachment(Attachments.MANIFEST) : null;
    if (manifest != null) {
        headers = new ManifestHeadersProvider(manifest).getHeaders();
    }

    // Initialize the module install context
    AttachableSupport context = new AttachableSupport();
    context.putAttachment(WildFlyRuntime.DEPLOYMENT_ROOT_KEY, deploymentRoot);

    // Install the module
    ModuleClassLoader classLoader = depUnit.getAttachment(Attachments.MODULE).getClassLoader();
    try {
        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        Module module = runtime.installModule(classLoader, resource, headers, context);
        depUnit.putAttachment(GraviaConstants.MODULE_KEY, module);
        depUnit.putAttachment(GraviaConstants.RESOURCE_KEY, module.adapt(Resource.class));
    } catch (ModuleException ex) {
        throw new DeploymentUnitProcessingException(ex);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:32,代码来源:ModuleInstallProcessor.java

示例12: undeploy

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
@Override
public void undeploy(final DeploymentUnit depUnit) {
    Module module = depUnit.getAttachment(GraviaConstants.MODULE_KEY);
    if (module != null && module.getState() != Module.State.UNINSTALLED) {
        module.uninstall();
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:8,代码来源:ModuleInstallProcessor.java

示例13: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public static ServiceController<CamelContextFactory> addService(ServiceTarget serviceTarget) {
    CamelContextFactoryService service = new CamelContextFactoryService();
    ServiceBuilder<CamelContextFactory> builder = serviceTarget.addService(CamelConstants.CAMEL_CONTEXT_FACTORY_SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:7,代码来源:CamelContextFactoryService.java

示例14: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public static ServiceController<Void> addService(ServiceTarget serviceTarget) {
    CamelBootstrapService service = new CamelBootstrapService();
    ServiceBuilder<Void> builder = serviceTarget.addService(CamelConstants.CAMEL_SUBSYSTEM_SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:7,代码来源:CamelBootstrapService.java

示例15: addService

import org.wildfly.extension.gravia.GraviaConstants; //导入依赖的package包/类
public static ServiceController<ContextCreateHandlerRegistry> addService(ServiceTarget serviceTarget, SubsystemState subsystemState) {
    ContextCreateHandlerRegistryService service = new ContextCreateHandlerRegistryService(subsystemState);
    ServiceBuilder<ContextCreateHandlerRegistry> builder = serviceTarget.addService(CamelConstants.CONTEXT_CREATE_HANDLER_REGISTRY_SERVICE_NAME, service);
    builder.addDependency(GraviaConstants.RUNTIME_SERVICE_NAME, Runtime.class, service.injectedRuntime);
    return builder.install();
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:7,代码来源:ContextCreateHandlerRegistryService.java


注:本文中的org.wildfly.extension.gravia.GraviaConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。