org.ow2.easybeans.mavenplugin.server
Class AbstractEasyBeansPluginServer

java.lang.Object
  extended by org.ow2.easybeans.mavenplugin.server.AbstractEasyBeansPluginServer
All Implemented Interfaces:
org.ow2.util.maven.plugin.deployment.api.IPluginServer
Direct Known Subclasses:
EasyBeansPluginServer, RemoteEasyBeansPluginServer

public abstract class AbstractEasyBeansPluginServer
extends Object
implements org.ow2.util.maven.plugin.deployment.api.IPluginServer

Abstract implementation of IPluginServer interface. Try to get a local EasyBeans server instance and provide operations on this if the operation is a success.

Author:
Vincent Michaud

Constructor Summary
AbstractEasyBeansPluginServer()
          Abstract constructor.
 
Method Summary
 void deployArchive(String filename)
          Deploy an EJB or an EAR.
static org.ow2.util.log.Log getLog()
          Get EasyBeans implementation of log.
 EZBServer getServer()
          Get an instance of EasyBeans server.
abstract  String getVersion()
          Get the version of EasyBeans server.
 boolean isStopped()
          Determine if the server is stopped or not.
 boolean localServerFound()
          Determine if server is a local found instance.
protected  org.ow2.util.archive.api.IArchive removeArchiveIfDeployed(File file)
          Undeploy a specific EJB or EAR from the server.
 void setServer(EZBServer server)
          Set an instance of EasyBeans server.
 void stop()
          Stop EasyBeans server.
 void undeployArchive(String filename)
          Undeploy a deployed EJB or EAR.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.util.maven.plugin.deployment.api.IPluginServer
isRemoteInstance
 

Constructor Detail

AbstractEasyBeansPluginServer

public AbstractEasyBeansPluginServer()
Abstract constructor.

Method Detail

removeArchiveIfDeployed

protected org.ow2.util.archive.api.IArchive removeArchiveIfDeployed(File file)
Undeploy a specific EJB or EAR from the server.

Parameters:
file - File to undeploy
Returns:
The archive created in order to identify the resource, or null if error

deployArchive

public void deployArchive(String filename)
Deploy an EJB or an EAR. If deployable file is already deployed, redeploy the file.

Specified by:
deployArchive in interface org.ow2.util.maven.plugin.deployment.api.IPluginServer
Parameters:
filename - A deployable

getVersion

public abstract String getVersion()
Get the version of EasyBeans server. If the server is a local instance, the result is the same as Version.getPluginVersion(). If the server is a remote instance, the result is the version of the remote server.

Specified by:
getVersion in interface org.ow2.util.maven.plugin.deployment.api.IPluginServer
Returns:
A String

undeployArchive

public void undeployArchive(String filename)
Undeploy a deployed EJB or EAR.

Specified by:
undeployArchive in interface org.ow2.util.maven.plugin.deployment.api.IPluginServer
Parameters:
filename - A deployable deployed on EasyBeans

stop

public void stop()
Stop EasyBeans server.

Specified by:
stop in interface org.ow2.util.maven.plugin.deployment.api.IPluginServer

isStopped

public boolean isStopped()
Determine if the server is stopped or not.

Specified by:
isStopped in interface org.ow2.util.maven.plugin.deployment.api.IPluginServer
Returns:
True if server has been stopped.

localServerFound

public boolean localServerFound()
Determine if server is a local found instance.

Returns:
If server is a local found instance

setServer

public void setServer(EZBServer server)
Set an instance of EasyBeans server.

Parameters:
server - EasyBeans server interface

getServer

public EZBServer getServer()
Get an instance of EasyBeans server.

Returns:
EasyBeans server interface

getLog

public static org.ow2.util.log.Log getLog()
Get EasyBeans implementation of log.

Returns:
Log


Copyright © 2006-2011 OW2 Consortium. All Rights Reserved.