org.objectweb.easybeans.deployer
Class Deployer

java.lang.Object
  extended by org.objectweb.easybeans.deployer.Deployer
All Implemented Interfaces:
IDeployer

public final class Deployer
extends java.lang.Object
implements IDeployer

Deployer allowing deploy/undeploy functions on this container.

Author:
Florent Benoit

Field Summary
private static java.lang.String DEFAULT_FOLDER
          Folder to create in tmp folder.
private static Deployer deployer
          Unique instance.
private static Embedded embedded
          Embedded server linked to this deployer.
private static JLog logger
          Logger.
 
Constructor Summary
private Deployer()
          Private constructor as the instance should be unique (by calling getInstance() method).
 
Method Summary
 void deployEar(java.lang.String fileName)
          Deploy an application packaged in a EAR file.
 void deployEjbJar(java.lang.String fileName)
          Deploy an EJB packaged in a JAR file.
 java.lang.String deployFile(java.lang.Integer typeparam, java.lang.Byte[] bfile, java.lang.String filename)
          Deploy a file on the EJB3 container.
static Deployer getInstance()
           
static void setEmbedded(Embedded embedded)
          Sets the embedded object of this deployer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployer

private static Deployer deployer
Unique instance.


embedded

private static Embedded embedded
Embedded server linked to this deployer.


logger

private static JLog logger
Logger.


DEFAULT_FOLDER

private static final java.lang.String DEFAULT_FOLDER
Folder to create in tmp folder.

See Also:
Constant Field Values
Constructor Detail

Deployer

private Deployer()
Private constructor as the instance should be unique (by calling getInstance() method).

Method Detail

getInstance

public static Deployer getInstance()
Returns:
the unique instance of this deployer.

deployFile

public java.lang.String deployFile(java.lang.Integer typeparam,
                                   java.lang.Byte[] bfile,
                                   java.lang.String filename)
Deploy a file on the EJB3 container.

Specified by:
deployFile in interface IDeployer
Parameters:
typeparam - type of the file (EJB, WAR, EAR, RAR, CAR) (ModuleType of JSR88)
bfile - bytes array of the file
filename - basename of the file to be deployed
Returns:
the path of the deployed file

deployEar

public void deployEar(java.lang.String fileName)
Deploy an application packaged in a EAR file.

Specified by:
deployEar in interface IDeployer
Parameters:
fileName - the name of the file to deploy

deployEjbJar

public void deployEjbJar(java.lang.String fileName)
Deploy an EJB packaged in a JAR file.

Specified by:
deployEjbJar in interface IDeployer
Parameters:
fileName - the name of the file to deploy

setEmbedded

public static void setEmbedded(Embedded embedded)
Sets the embedded object of this deployer.

Parameters:
embedded - the EJB3 server.