org.jboss.deployers.plugins.deployers
Class DeployerWrapper

java.lang.Object
  extended by org.jboss.deployers.plugins.deployers.DeployerWrapper
All Implemented Interfaces:
Deployer, ManagedObjectCreator, Ordered

public class DeployerWrapper
extends Object
implements Deployer, ManagedObjectCreator

DeployerWrapper.

To avoid any problems with error handling by the deployers.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
Ordered.OrderedComparator
 
Field Summary
 
Fields inherited from interface org.jboss.deployers.spi.Ordered
COMPARATOR
 
Constructor Summary
DeployerWrapper(Deployer deployer)
          Create a new DeployerWrapper.
 
Method Summary
 void build(DeploymentUnit unit, Set<String> outputs, Map<String,org.jboss.managed.api.ManagedObject> managedObjects)
          Build managed objects for this deployment context
 void deploy(DeploymentUnit unit)
          Deploy a deployment
 boolean equals(Object obj)
           
 Class<?> getInput()
          Get the input for this deployer
 Set<String> getInputs()
          Get the input for this deployer
 ManagedObjectCreator getManagedObjectCreator()
          Get the managedObjectCreator.
 Class<?> getOutput()
          Get the otput for this deployer
 Set<String> getOutputs()
          Get the outputs for this deployer
 int getRelativeOrder()
          Get the relative order
 DeploymentStage getStage()
          Get the deployment stage for this deployer
 int hashCode()
           
 boolean isAllInputs()
          Whether we want all inputs
 boolean isComponentsOnly()
          Whether we only want components
 boolean isParentFirst()
          Whether to process parents before children (default true)
 boolean isTopLevelOnly()
          Whether we only want the top level
 boolean isWantComponents()
          Whether we dont want components
 void setManagedObjectCreator(ManagedObjectCreator managedObjectCreator)
          Set the managedObjectCreator.
 void setRelativeOrder(int order)
          Set the relative order.
 String toString()
           
 void undeploy(DeploymentUnit unit)
          Undeploy an deployment
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeployerWrapper

public DeployerWrapper(Deployer deployer)
Create a new DeployerWrapper.

Parameters:
deployer - the deployer
Method Detail

getManagedObjectCreator

public ManagedObjectCreator getManagedObjectCreator()
Get the managedObjectCreator.

Returns:
the managedObjectCreator.

setManagedObjectCreator

public void setManagedObjectCreator(ManagedObjectCreator managedObjectCreator)
Set the managedObjectCreator.

Parameters:
managedObjectCreator - the managedObjectCreator.

getRelativeOrder

public int getRelativeOrder()
Description copied from interface: Ordered
Get the relative order

Specified by:
getRelativeOrder in interface Ordered
Returns:
the relative order

setRelativeOrder

public void setRelativeOrder(int order)
Description copied from interface: Ordered
Set the relative order.

Specified by:
setRelativeOrder in interface Ordered
Parameters:
order - the order

isAllInputs

public boolean isAllInputs()
Description copied from interface: Deployer
Whether we want all inputs

Specified by:
isAllInputs in interface Deployer
Returns:
true for all inputs

isComponentsOnly

public boolean isComponentsOnly()
Description copied from interface: Deployer
Whether we only want components

Specified by:
isComponentsOnly in interface Deployer
Returns:
true for components only

isWantComponents

public boolean isWantComponents()
Description copied from interface: Deployer
Whether we dont want components

Specified by:
isWantComponents in interface Deployer
Returns:
true for no components

isTopLevelOnly

public boolean isTopLevelOnly()
Description copied from interface: Deployer
Whether we only want the top level

Specified by:
isTopLevelOnly in interface Deployer
Returns:
true for top level only

getInput

public Class<?> getInput()
Description copied from interface: Deployer
Get the input for this deployer

Specified by:
getInput in interface Deployer
Returns:
the input type

getOutput

public Class<?> getOutput()
Description copied from interface: Deployer
Get the otput for this deployer

Specified by:
getOutput in interface Deployer
Returns:
the output type

getInputs

public Set<String> getInputs()
Description copied from interface: Deployer
Get the input for this deployer

Specified by:
getInputs in interface Deployer
Returns:
the inputs

getOutputs

public Set<String> getOutputs()
Description copied from interface: Deployer
Get the outputs for this deployer

Specified by:
getOutputs in interface Deployer
Returns:
the outputs

getStage

public DeploymentStage getStage()
Description copied from interface: Deployer
Get the deployment stage for this deployer

Specified by:
getStage in interface Deployer
Returns:
the stage

isParentFirst

public boolean isParentFirst()
Description copied from interface: Deployer
Whether to process parents before children (default true)

Specified by:
isParentFirst in interface Deployer
Returns:
true to process parents first

deploy

public void deploy(DeploymentUnit unit)
            throws DeploymentException
Description copied from interface: Deployer
Deploy a deployment

Specified by:
deploy in interface Deployer
Parameters:
unit - the unit
Throws:
DeploymentException - for any error

undeploy

public void undeploy(DeploymentUnit unit)
Description copied from interface: Deployer
Undeploy an deployment

Specified by:
undeploy in interface Deployer
Parameters:
unit - the unit

build

public void build(DeploymentUnit unit,
                  Set<String> outputs,
                  Map<String,org.jboss.managed.api.ManagedObject> managedObjects)
           throws DeploymentException
Description copied from interface: ManagedObjectCreator
Build managed objects for this deployment context

Specified by:
build in interface ManagedObjectCreator
Parameters:
unit - the deployment unit
outputs - the attachment names
managedObjects - the managed objects
Throws:
DeploymentException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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