org.jboss.deployers.spi.deployer.helpers
Class AbstractComponentVisitor<T>

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.ComponentAdapter<T>
      extended by org.jboss.deployers.spi.deployer.helpers.AbstractComponentVisitor<T>
Type Parameters:
T - exact attachment type
All Implemented Interfaces:
DeploymentVisitor<T>

public abstract class AbstractComponentVisitor<T>
extends ComponentAdapter<T>
implements DeploymentVisitor<T>

Simple component visitor.

Author:
Ales Justin

Constructor Summary
AbstractComponentVisitor()
           
 
Method Summary
 void deploy(DeploymentUnit unit, T attachment)
          Deploy the deployment
protected  String getAttachmentName(T attachment)
          Get attachment name.
 void undeploy(DeploymentUnit unit, T attachment)
          Undeploy the deployment
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.ComponentAdapter
addComponent, getComponentName, removeComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.spi.deployer.helpers.DeploymentVisitor
getVisitorType
 

Constructor Detail

AbstractComponentVisitor

public AbstractComponentVisitor()
Method Detail

getAttachmentName

protected String getAttachmentName(T attachment)
Get attachment name. By default we return visitor type's name.

Specified by:
getAttachmentName in class ComponentAdapter<T>
Parameters:
attachment - the attachment
Returns:
the attachment name

deploy

public void deploy(DeploymentUnit unit,
                   T attachment)
            throws DeploymentException
Description copied from interface: DeploymentVisitor
Deploy the deployment

Specified by:
deploy in interface DeploymentVisitor<T>
Parameters:
unit - the deployment unit
attachment - the deployment
Throws:
DeploymentException - the deployment exception

undeploy

public void undeploy(DeploymentUnit unit,
                     T attachment)
Description copied from interface: DeploymentVisitor
Undeploy the deployment

Specified by:
undeploy in interface DeploymentVisitor<T>
Parameters:
unit - the deployment unit
attachment - the deployment


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.