org.codehaus.cargo.generic.deployer
Interface DeployerFactory

All Known Implementing Classes:
DefaultDeployerFactory

public interface DeployerFactory

Create a Deployer knowing the container to which it is attached and the deployer type.

Version:
$Id: DeployerFactory.java 1233 2006-11-22 09:15:56Z vmassol $

Method Summary
 org.codehaus.cargo.container.deployer.Deployer createDeployer(org.codehaus.cargo.container.Container container)
          Create a Deployer instance whose type matches the container's type.
 org.codehaus.cargo.container.deployer.Deployer createDeployer(org.codehaus.cargo.container.Container container, org.codehaus.cargo.container.deployer.DeployerType deployerType)
          Create a Deployer instance matching the specified container and type.
 java.lang.Class getDeployerClass(java.lang.String containerId, org.codehaus.cargo.container.deployer.DeployerType deployerType)
           
 boolean isDeployerRegistered(java.lang.String containerId, org.codehaus.cargo.container.deployer.DeployerType deployerType)
           
 void registerDeployer(java.lang.String containerId, org.codehaus.cargo.container.deployer.DeployerType deployerType, java.lang.Class deployerClass)
          Registers a Deployer implementation.
 

Method Detail

registerDeployer

public void registerDeployer(java.lang.String containerId,
                             org.codehaus.cargo.container.deployer.DeployerType deployerType,
                             java.lang.Class deployerClass)
Registers a Deployer implementation.

Parameters:
containerId - the container attached to this deployerClass
deployerType - the deployer's type (local, remote, etc)
deployerClass - the deployer implementation class to register

isDeployerRegistered

public boolean isDeployerRegistered(java.lang.String containerId,
                                    org.codehaus.cargo.container.deployer.DeployerType deployerType)
Parameters:
containerId - the container attached to this deployer class
deployerType - the type to differentiate this deployer from others for the specified container
Returns:
true if the specified deployer is already registered or false otherwise

getDeployerClass

public java.lang.Class getDeployerClass(java.lang.String containerId,
                                        org.codehaus.cargo.container.deployer.DeployerType deployerType)
Parameters:
containerId - the container attached to this deployer class
deployerType - the deployer's type
Returns:
the deployer implementation class

createDeployer

public org.codehaus.cargo.container.deployer.Deployer createDeployer(org.codehaus.cargo.container.Container container,
                                                                     org.codehaus.cargo.container.deployer.DeployerType deployerType)
Create a Deployer instance matching the specified container and type.

Parameters:
container - the container for which we need to create a deployer instance
deployerType - the deployer's type (local, remote, etc)
Returns:
the deployer instance

createDeployer

public org.codehaus.cargo.container.deployer.Deployer createDeployer(org.codehaus.cargo.container.Container container)
Create a Deployer instance whose type matches the container's type. For example this creates a local deployer when the container's instance passed is a local container and a remote deployer when the container's instance passed is a remote container.

Parameters:
container - the container for which we need to create a deployer instance
Returns:
the deployer instance


Copyright © 2004-2008 Codehaus. All Rights Reserved.