Package org.jboss.as.server.deployment
Interface DeploymentPhaseContext
-
- All Superinterfaces:
Attachable
public interface DeploymentPhaseContext extends Attachable
The deployment unit processor context. Maintains state pertaining to the current cycle of deployment/undeployment. This context object will be discarded when processing is complete; data which must persist for the life of the deployment should be attached to theDeploymentUnit.- Author:
- David M. Lloyd, Richard Opalka
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <T> voidaddDependency(org.jboss.msc.service.ServiceName serviceName, AttachmentKey<T> attachmentKey)Adds a dependency on the service to the next phase service.<T> voidaddDeploymentDependency(org.jboss.msc.service.ServiceName serviceName, AttachmentKey<T> attachmentKey)Adds a dependency on the service to the next phase service.DeploymentUnitgetDeploymentUnit()Get the persistent deployment unit context for this deployment unit.PhasegetPhase()Get the phase that this processor applies to.org.jboss.msc.service.ServiceNamegetPhaseServiceName()Get the service name of the current deployment phase.RequirementServiceTargetgetRequirementServiceTarget()Returns the target into which this phase should install services.org.jboss.msc.service.ServiceRegistrygetServiceRegistry()Get the service registry for the container, which may be used to look up services.default org.jboss.msc.service.ServiceTargetgetServiceTarget()Deprecated, for removal: This API element is subject to removal in a future version.UsegetRequirementServiceTarget()instead.<T> voidrequires(org.jboss.msc.service.ServiceName serviceName, DelegatingSupplier<T> supplier)Adds a dependency on the service to the next phase service.-
Methods inherited from interface org.jboss.as.server.deployment.Attachable
addToAttachmentList, getAttachment, getAttachmentList, hasAttachment, putAttachment, removeAttachment
-
-
-
-
Method Detail
-
getPhaseServiceName
org.jboss.msc.service.ServiceName getPhaseServiceName()
Get the service name of the current deployment phase.- Returns:
- the deployment phase service name
-
getServiceTarget
@Deprecated(forRemoval=true) default org.jboss.msc.service.ServiceTarget getServiceTarget()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetRequirementServiceTarget()instead.Get the service target into which this phase should install services. Please note that services added via this context do not have any implicit dependencies by default; any root-level deployment services that you add should depend on the service name of the current phase, acquired via thegetPhaseServiceName()method.- Returns:
- the service target
-
getRequirementServiceTarget
RequirementServiceTarget getRequirementServiceTarget()
Returns the target into which this phase should install services. Please note that services added via this context do not have any implicit dependencies by default; any root-level deployment services that you add should depend on the service name of the current phase, acquired via thegetPhaseServiceName()method.- Returns:
- the service target
-
getServiceRegistry
org.jboss.msc.service.ServiceRegistry getServiceRegistry()
Get the service registry for the container, which may be used to look up services.- Returns:
- the service registry
-
getDeploymentUnit
DeploymentUnit getDeploymentUnit()
Get the persistent deployment unit context for this deployment unit.- Returns:
- the deployment unit context
-
getPhase
Phase getPhase()
Get the phase that this processor applies to.- Returns:
- the phase
-
addDependency
<T> void addDependency(org.jboss.msc.service.ServiceName serviceName, AttachmentKey<T> attachmentKey)Adds a dependency on the service to the next phase service. The service value will be make available as an attachment under theDeploymentPhaseContextfor the phase. If the attachment represents anAttachmentListtype then the value is added to the attachment list.- Type Parameters:
T- the type of the injected value- Parameters:
serviceName- The service name to add toAttachments.NEXT_PHASE_DEPSattachmentKey- The AttachmentKey to attach the service result under.- Throws:
IllegalStateException- If this is the last phase
-
requires
<T> void requires(org.jboss.msc.service.ServiceName serviceName, DelegatingSupplier<T> supplier)Adds a dependency on the service to the next phase service.- Type Parameters:
T- the type of the injected value- Parameters:
serviceName- the service name to add toAttachments.NEXT_PHASE_DEPSsupplier- the supplier into which the dependency value is injected- Throws:
IllegalStateException- If this is the last phase
-
addDeploymentDependency
<T> void addDeploymentDependency(org.jboss.msc.service.ServiceName serviceName, AttachmentKey<T> attachmentKey)Adds a dependency on the service to the next phase service. The service value will be make available as an attachment to theDeploymentUnit. This attachment will be removed when the phase service for the next phase stops. If the attachment represents anAttachmentListtype then the value is added to the attachment list.- Type Parameters:
T- The type of the injected value- Parameters:
serviceName- The service name to add toAttachments.NEXT_PHASE_DEPSattachmentKey- The AttachmentKey to attach the service result under.- Throws:
IllegalStateException- If this is the last phase
-
-