org.objectweb.easybeans.deployer
Class RemoteDeployer

java.lang.Object
  extended by org.objectweb.easybeans.deployer.RemoteDeployer
All Implemented Interfaces:
IRemoteDeployer

public final class RemoteDeployer
extends java.lang.Object
implements IRemoteDeployer

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  EZBDeployer deployer
          Link to a local deployer.
private static JLog logger
          Logger.
 
Constructor Summary
RemoteDeployer(EZBServer embedded)
          Build a Deployer for the given Embedded instance.
 
Method Summary
 void deploy(java.lang.String fileName)
          Deploy a file to a local deployer.
 void deployFile(java.lang.String fileName, byte[] fileContent)
          Dump the given bytes to a local file and then deploy this file to a local deployer.
 java.lang.String dumpFile(java.lang.String fileName, byte[] fileContent)
          Dump the given bytes to a local file and then return the path to this file.
protected  EZBDeployable getDeployable(java.lang.String fileName)
          Gets a deployable for a given file.
 void undeploy(java.lang.String fileName)
          Undeploy a file by using a local deployer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FOLDER

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


logger

private static JLog logger
Logger.


deployer

private EZBDeployer deployer
Link to a local deployer.

Constructor Detail

RemoteDeployer

public RemoteDeployer(EZBServer embedded)
               throws EZBDeployerException
Build a Deployer for the given Embedded instance.

Parameters:
embedded - the Server instance.
Throws:
EZBDeployerException - if the local deployer can't be accessed.
Method Detail

dumpFile

public java.lang.String dumpFile(java.lang.String fileName,
                                 byte[] fileContent)
Dump the given bytes to a local file and then return the path to this file.

Specified by:
dumpFile in interface IRemoteDeployer
Parameters:
fileName - the name of the file to deploy
fileContent - the content of the given file
Returns:
the path of the deployed file

deployFile

public void deployFile(java.lang.String fileName,
                       byte[] fileContent)
Dump the given bytes to a local file and then deploy this file to a local deployer.

Specified by:
deployFile in interface IRemoteDeployer
Parameters:
fileName - the name of the file to deploy
fileContent - the content of the given file

deploy

public void deploy(java.lang.String fileName)
Deploy a file to a local deployer.

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

getDeployable

protected EZBDeployable getDeployable(java.lang.String fileName)
Gets a deployable for a given file.

Parameters:
fileName - the name of the file
Returns:
a deployable for the given filename

undeploy

public void undeploy(java.lang.String fileName)
Undeploy a file by using a local deployer.

Specified by:
undeploy in interface IRemoteDeployer
Parameters:
fileName - the name of the file to undeploy