org.jboss.as.server.deployment.Attachments Maven / Gradle / Ivy
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.server.deployment;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.Manifest;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.server.deployment.annotation.CompositeIndex;
import org.jboss.as.server.deployment.module.AdditionalModuleSpecification;
import org.jboss.as.server.deployment.module.ExtensionInfo;
import org.jboss.as.server.deployment.module.ExtensionListEntry;
import org.jboss.as.server.deployment.module.ModuleDependency;
import org.jboss.as.server.deployment.module.ModuleSpecification;
import org.jboss.as.server.deployment.module.ResourceRoot;
import org.jboss.as.server.deployment.reflect.DeploymentClassIndex;
import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex;
import org.jboss.as.server.deployment.reflect.ProxyMetadataSource;
import org.jboss.as.server.moduleservice.ExternalModuleService;
import org.jboss.as.server.moduleservice.ServiceModuleLoader;
import org.jboss.as.server.services.security.AbstractVaultReader;
import org.jboss.jandex.Index;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.msc.service.ServiceName;
import org.jboss.vfs.VirtualFile;
/**
* @author David M. Lloyd
*/
public final class Attachments {
//
// GENERAL
//
/**
* A list of service dependencies that must be satisfied before the next deployment phase can begin executing.
*/
public static final AttachmentKey> NEXT_PHASE_DEPS = AttachmentKey.createList(ServiceName.class);
/**
* A list of service dependencies that must be satisfied before the next deployment phase can begin executing.
*/
public static final AttachmentKey> NEXT_PHASE_ATTACHABLE_DEPS = AttachmentKey.createList(AttachableDependency.class);
/**
* A set of subsystem names that should not be processed. Any subsystem whos name is in this list will not have
* its deployment unit processors run.
*/
public static final AttachmentKey> EXCLUDED_SUBSYSTEMS = AttachmentKey.create(Set.class);
/**
* The deployments runtime name
*
* @deprecated use {@link org.jboss.as.server.deployment.DeploymentUnit#getName()}
*/
@Deprecated
public static final AttachmentKey RUNTIME_NAME = AttachmentKey.create(String.class);
/**
* The name that uniquely identifies the deployment to the management layer across the domain.
*/
public static final AttachmentKey MANAGEMENT_NAME = AttachmentKey.create(String.class);
/**
* The deployment contents
*/
public static final AttachmentKey DEPLOYMENT_CONTENTS = AttachmentKey.create(VirtualFile.class);
/**
* This should be added as a listener to all non child services
*/
public static final AttachmentKey SERVICE_VERIFICATION_HANDLER = AttachmentKey.create(ServiceVerificationHandler.class);
public static final AttachmentKey ALLOW_PHASE_RESTART = AttachmentKey.create(Boolean.class);
//
// STRUCTURE
//
/**
* The primary deployment root.
*/
public static final AttachmentKey DEPLOYMENT_ROOT = AttachmentKey.create(ResourceRoot.class);
/**
* Information used to build up the deployments Module
*/
public static final AttachmentKey MODULE_SPECIFICATION = AttachmentKey.create(ModuleSpecification.class);
/**
* The additional resource roots of the deployment unit.
*/
public static final AttachmentKey> RESOURCE_ROOTS = AttachmentKey.createList(ResourceRoot.class);
/**
* The MANIFEST.MF of the deployment unit.
*/
public static final AttachmentKey MANIFEST = AttachmentKey.create(Manifest.class);
/**
* Available when the deployment contains a valid OSGi manifest
*/
public static final AttachmentKey OSGI_MANIFEST = AttachmentKey.create(Manifest.class);
/**
* Module identifiers for Class-Path information
*/
public static final AttachmentKey> CLASS_PATH_ENTRIES = AttachmentKey.createList(ModuleIdentifier.class);
/**
* Resource roots for additional modules referenced via Class-Path.
*
* These are attached to the resource root that actually defined the class path entry, and are used to transitively resolve
* the annotation index for class path items.
*/
public static final AttachmentKey> CLASS_PATH_RESOURCE_ROOTS = AttachmentKey.createList(ResourceRoot.class);
/**
* The list of extensions given in the manifest and structure configurations.
*/
public static final AttachmentKey> EXTENSION_LIST_ENTRIES = AttachmentKey.createList(ExtensionListEntry.class);
/**
* Information about extensions in a jar library deployment.
*/
public static final AttachmentKey EXTENSION_INFORMATION = AttachmentKey.create(ExtensionInfo.class);
/**
* The server deployment repository
*/
public static final AttachmentKey SERVER_DEPLOYMENT_REPOSITORY = AttachmentKey.create(DeploymentMountProvider.class);
/**
* An annotation index for a (@link ResourceRoot). This is attached to the {@link ResourceRoot}s of the deployment that contain
* the annotations
*/
public static final AttachmentKey ANNOTATION_INDEX = AttachmentKey.create(Index.class);
/**
* The composite annotation index for this deployment.
*/
public static final AttachmentKey COMPOSITE_ANNOTATION_INDEX = AttachmentKey.create(CompositeIndex.class);
/**
* Flag to indicate whether to compute the composite annotation index for this deployment. Absence of this flag will
* be cause the composite index to be attached.
*/
public static final AttachmentKey COMPUTE_COMPOSITE_ANNOTATION_INDEX = AttachmentKey.create(Boolean.class);
/**
* An attachment that indicates if a {@link ResourceRoot} should be indexed by the {@link org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor}. If this
* is not present then the resource root is indexed by default.
*/
public static final AttachmentKey INDEX_RESOURCE_ROOT = AttachmentKey.create(Boolean.class);
/**
* A list of paths within a root to ignore when indexing.
*/
public static final AttachmentKey> INDEX_IGNORE_PATHS = AttachmentKey.createList(String.class);
/**
* Sub deployment services
*/
public static final AttachmentKey> SUB_DEPLOYMENTS = AttachmentKey.createList(DeploymentUnit.class);
/**
* Additional modules attached to the top level deployment
*/
public static final AttachmentKey> ADDITIONAL_MODULES = AttachmentKey.createList(AdditionalModuleSpecification.class);
public static final AttachmentKey> ADDITIONAL_ANNOTATION_INDEXES = AttachmentKey.createList(ModuleIdentifier.class);
public static final AttachmentKey