public class DeploymentOverlayDeploymentUnitProcessor extends Object implements DeploymentUnitProcessor
| Modifier and Type | Field and Description |
|---|---|
protected static AttachmentKey<Map<String,byte[]>> |
DEFERRED_OVERLAYS |
protected static AttachmentKey<AttachmentList<Closeable>> |
MOUNTED_FILES |
| Constructor and Description |
|---|
DeploymentOverlayDeploymentUnitProcessor(ContentRepository contentRepository) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
close(Closeable closeable) |
protected static void |
copyFile(File src,
File dest) |
protected static void |
copyFile(InputStream in,
File dest) |
void |
deploy(DeploymentPhaseContext phaseContext)
Perform a single step in processing the deployment phase.
|
protected Map<String,byte[]> |
getDeferredAttachment(DeploymentUnit deploymentUnit) |
protected Map<String,MountedDeploymentOverlay> |
getMountsAttachment(DeploymentUnit deploymentUnit) |
protected Map<String,byte[]> |
getOverlays(DeploymentUnit deploymentUnit) |
protected void |
handleEntryWithFileParent(Map<String,byte[]> deferred,
Map.Entry<String,byte[]> entry,
String path,
org.jboss.vfs.VirtualFile parent) |
protected void |
handleExplodedEntryWithDirParent(DeploymentUnit deploymentUnit,
org.jboss.vfs.VirtualFile content,
org.jboss.vfs.VirtualFile mountPoint,
Map<String,MountedDeploymentOverlay> mounts,
String overLayPath) |
void |
undeploy(DeploymentUnit context)
Undo the deployment processing.
|
protected static final AttachmentKey<AttachmentList<Closeable>> MOUNTED_FILES
protected static final AttachmentKey<Map<String,byte[]>> DEFERRED_OVERLAYS
public DeploymentOverlayDeploymentUnitProcessor(ContentRepository contentRepository)
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException
DeploymentUnitProcessor
Data stored on the phase context only exists until the end of the phase. The deployment unit context
which is persistent is available via context.getDeploymentUnitContext().
deploy in interface DeploymentUnitProcessorphaseContext - the deployment unit contextDeploymentUnitProcessingException - if an error occurs during processingprotected void handleEntryWithFileParent(Map<String,byte[]> deferred, Map.Entry<String,byte[]> entry, String path, org.jboss.vfs.VirtualFile parent)
protected void handleExplodedEntryWithDirParent(DeploymentUnit deploymentUnit, org.jboss.vfs.VirtualFile content, org.jboss.vfs.VirtualFile mountPoint, Map<String,MountedDeploymentOverlay> mounts, String overLayPath) throws IOException
IOExceptionprotected Map<String,byte[]> getDeferredAttachment(DeploymentUnit deploymentUnit)
protected Map<String,MountedDeploymentOverlay> getMountsAttachment(DeploymentUnit deploymentUnit)
protected Map<String,byte[]> getOverlays(DeploymentUnit deploymentUnit)
public void undeploy(DeploymentUnit context)
DeploymentUnitProcessordeploy(); however, if
the deploy() method added services, they need not be removed here (they will automatically be removed).
This method should avoid throwing exceptions; any exceptions thrown are logged and ignored. Implementations of this
method cannot assume that the deployment process has (or has not) proceeded beyond the current processor, nor can they
assume that the undeploy() method will be called from the same thread as the deploy() method.
undeploy in interface DeploymentUnitProcessorcontext - the deployment unit contextprotected static void copyFile(File src, File dest) throws IOException
IOExceptionprotected static void copyFile(InputStream in, File dest) throws IOException
IOExceptionprotected static void close(Closeable closeable)
Copyright © 2016 JBoss by Red Hat. All rights reserved.