org.jboss.deployment
Class MainDeployer

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.deployment.MainDeployer
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, Deployer, DeployerMBean, MainDeployerConstants, MainDeployerMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean

Deprecated. see org.jboss.deployers.spi.deployment.MainDeployer

public class MainDeployer
extends ServiceMBeanSupport
implements Deployer, MainDeployerMBean

The legacy component for deployer management. This now simply delegates to the Main

Version:
$Revision: 84628 $
Author:
Marc Fleury, Scott Stark, David Jencks, Dimitris Andreadis, adrian@jboss.org, ales.justin@jboss.org

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.deployment.MainDeployerMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Fields inherited from interface org.jboss.deployment.MainDeployerConstants
ADD_DEPLOYER, REMOVE_DEPLOYER
 
Constructor Summary
MainDeployer()
          Deprecated. Explict no-args contsructor for JMX.
 
Method Summary
 void addDeployer(SubDeployer deployer)
          Deprecated. The addDeployer method registers a deployer with the main deployer.
protected  boolean checkDeployed(String name)
          Deprecated. Is deployed.
 void checkIncompleteDeployments()
          Deprecated. Check the current deployment states and generate a IncompleteDeploymentException if there are mbeans waiting for depedencies.
protected  void copy(URL src, File dest)
          Deprecated.  
protected  void createService()
          Deprecated. The createService method is one of the ServiceMBean lifecyle operations.
 void deploy(DeploymentInfo deployment)
          Deprecated. The deploy method deploys a package represented by a DeploymentInfo object.
 void deploy(String urlspec)
          Deprecated. The deploy method deploys a package identified by a string representation of a URL.
 void deploy(URL url)
          Deprecated. The deploy method deploys a package identified by a URL
 org.jboss.kernel.spi.dependency.KernelController getController()
          Deprecated.  
 boolean getCopyFiles()
          Deprecated. Get the flag indicating whether directory content will be deployed
 org.jboss.deployers.client.spi.Deployment getDeployment(URL url)
          Deprecated. The getDeployment method returns the Deployment object for the URL supplied.
 org.jboss.deployers.structure.spi.DeploymentContext getDeploymentContext(URL url)
          Deprecated. 
 org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit(URL url)
          Deprecated. The getDeploymentUnit method returns the DeploymentUnit object for the URL supplied.
 String[] getEnhancedSuffixOrder()
          Deprecated. Get the enhanced suffix order
 org.jboss.deployers.client.spi.DeployerClient getKernelMainDeployer()
          Deprecated.  
protected  ObjectName getObjectName(MBeanServer server, ObjectName name)
          Deprecated. Sub-classes should override this method if they only need to set their object name during MBean pre-registration.
 String[] getSuffixOrder()
          Deprecated. Get the ordering of the deployment suffixes
 File getTempDir()
          Deprecated. Get the temp directory
 String getTempDirString()
          Deprecated. Get the temp directory
 URL getWatchUrl(URL url)
          Deprecated. The getWatchUrl method returns the URL that, when modified, indicates that a redeploy is needed.
 boolean isDeployed(String url)
          Deprecated. The isDeployed method tells you if a package identified by a string representation of a URL is currently deployed.
 boolean isDeployed(URL url)
          Deprecated. The isDeployed method tells you if a packaged identified by a URL is deployed.
 Collection listDeployed()
          Deprecated. The listDeployed method returns a collection of DeploymemtInfo objects for the currently deployed packages.
 String listDeployedAsString()
          Deprecated. Describe listDeployedAsString method here.
 Collection listDeployedModules()
          Deprecated. The listDeployedModules method returns a collection of SerializableDeploymentInfo objects for the currently deployed packages.
 Collection listDeployers()
          Deprecated. The listDeployers method returns a collection of ObjectNames of deployers registered with the MainDeployer.
 Collection listIncompletelyDeployed()
          Deprecated. The listIncompletelyDeployed method returns a list of packages that have not deployed completely.
 Collection listWaitingForDeployer()
          Deprecated. The listWaitingForDeployer method returns a collection of the packages that currently have no identified deployer.
 void redeploy(DeploymentInfo sdi)
          Deprecated. Describe redeploy method here.
 void redeploy(String urlspec)
          Deprecated. Describe redeploy method here.
 void redeploy(URL url)
          Deprecated. Describe redeploy method here.
 void removeDeployer(SubDeployer deployer)
          Deprecated. The removeDeployer method unregisters a deployer with the MainDeployer.
 void setController(org.jboss.kernel.spi.dependency.KernelController controller)
          Deprecated.  
 void setCopyFiles(boolean copyFiles)
          Deprecated. Set the flag indicating whether directory content will be deployed.
 void setEnhancedSuffixOrder(String[] enhancedSuffixOrder)
          Deprecated. Set the enhanced suffix order
 void setKernelMainDeployer(org.jboss.deployers.client.spi.DeployerClient delegate)
          Deprecated. set the kernel MainDeployer which will handle deployments
 void setServiceController(ObjectName serviceController)
          Deprecated. Describe setServiceController method here.
 void setTempDir(File tempDir)
          Deprecated. Set the temp directory
 void shutdown()
          Deprecated. The shutdown method undeploys all deployed packages in reverse order of their deployement.
 void start(String urlspec)
          Deprecated. The start method starts a package identified by a URL
 void stop(String urlspec)
          Deprecated. The stop method stops a package identified by a URL
 void undeploy(DeploymentInfo di)
          Deprecated. The undeploy method undeploys a package represented by a DeploymentInfo object.
protected  void undeploy(DeploymentInfo di, boolean isShutdown)
          Deprecated.  
 void undeploy(String urlspec)
          Deprecated. The undeploy method undeploys a package identified by a string representation of a URL.
 void undeploy(URL url)
          Deprecated. The undeploy method undeploys a package identified by a URL
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, startService, stop, stopService, unsetKernelControllerContext
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

MainDeployer

public MainDeployer()
Deprecated. 
Explict no-args contsructor for JMX.

Method Detail

getKernelMainDeployer

public org.jboss.deployers.client.spi.DeployerClient getKernelMainDeployer()
Deprecated. 
Specified by:
getKernelMainDeployer in interface MainDeployerMBean

setKernelMainDeployer

public void setKernelMainDeployer(org.jboss.deployers.client.spi.DeployerClient delegate)
Deprecated. 
Description copied from interface: MainDeployerMBean
set the kernel MainDeployer which will handle deployments

Specified by:
setKernelMainDeployer in interface MainDeployerMBean

getController

public org.jboss.kernel.spi.dependency.KernelController getController()
Deprecated. 
Specified by:
getController in interface MainDeployerMBean

setController

public void setController(org.jboss.kernel.spi.dependency.KernelController controller)
Deprecated. 
Specified by:
setController in interface MainDeployerMBean

getCopyFiles

public boolean getCopyFiles()
Deprecated. 
Get the flag indicating whether directory content will be deployed

Specified by:
getCopyFiles in interface MainDeployerMBean
Returns:
the file copy flag

setCopyFiles

public void setCopyFiles(boolean copyFiles)
Deprecated. 
Set the flag indicating whether directory content will be deployed. The default value is taken from the jboss.deploy.localcopy system property.

Specified by:
setCopyFiles in interface MainDeployerMBean
Parameters:
copyFiles - the local copy flag value

getTempDir

public File getTempDir()
Deprecated. 
Get the temp directory

Specified by:
getTempDir in interface MainDeployerMBean
Returns:
the path to the local tmp directory

setTempDir

public void setTempDir(File tempDir)
Deprecated. 
Set the temp directory

Specified by:
setTempDir in interface MainDeployerMBean
Parameters:
tempDir - the path to the local tmp directory

getTempDirString

public String getTempDirString()
Deprecated. 
Get the temp directory

Specified by:
getTempDirString in interface MainDeployerMBean
Returns:
the path to the local tmp directory

getSuffixOrder

public String[] getSuffixOrder()
Deprecated. 
Get the ordering of the deployment suffixes

Specified by:
getSuffixOrder in interface MainDeployerMBean
Returns:
the ordering of the deployment suffixes

getEnhancedSuffixOrder

public String[] getEnhancedSuffixOrder()
Deprecated. 
Get the enhanced suffix order

Specified by:
getEnhancedSuffixOrder in interface MainDeployerMBean
Returns:
the enhanced suffix order

setEnhancedSuffixOrder

public void setEnhancedSuffixOrder(String[] enhancedSuffixOrder)
Deprecated. 
Set the enhanced suffix order

Specified by:
setEnhancedSuffixOrder in interface MainDeployerMBean
Parameters:
enhancedSuffixOrder - the enhanced suffix order

setServiceController

public void setServiceController(ObjectName serviceController)
Deprecated. 
Describe setServiceController method here.

Specified by:
setServiceController in interface MainDeployerMBean
Parameters:
serviceController - an ObjectName value

listDeployed

public Collection listDeployed()
Deprecated. 
The listDeployed method returns a collection of DeploymemtInfo objects for the currently deployed packages.

Specified by:
listDeployed in interface MainDeployerMBean
Returns:
a Collection value

listDeployedModules

public Collection listDeployedModules()
Deprecated. 
The listDeployedModules method returns a collection of SerializableDeploymentInfo objects for the currently deployed packages.

Specified by:
listDeployedModules in interface MainDeployerMBean
Returns:
a Collection value

listDeployedAsString

public String listDeployedAsString()
Deprecated. 
Describe listDeployedAsString method here.

Specified by:
listDeployedAsString in interface MainDeployerMBean
Returns:
a String value

listIncompletelyDeployed

public Collection listIncompletelyDeployed()
Deprecated. 
The listIncompletelyDeployed method returns a list of packages that have not deployed completely. The toString method will include any exception in the status field.

Specified by:
listIncompletelyDeployed in interface MainDeployerMBean
Returns:
a Collection value

listWaitingForDeployer

public Collection listWaitingForDeployer()
Deprecated. 
The listWaitingForDeployer method returns a collection of the packages that currently have no identified deployer.

Specified by:
listWaitingForDeployer in interface MainDeployerMBean
Returns:
a Collection value

addDeployer

public void addDeployer(SubDeployer deployer)
Deprecated. 
The addDeployer method registers a deployer with the main deployer. Any waiting packages are tested to see if the new deployer will deploy them.

Specified by:
addDeployer in interface MainDeployerMBean
Parameters:
deployer - a SubDeployer value

removeDeployer

public void removeDeployer(SubDeployer deployer)
Deprecated. 
The removeDeployer method unregisters a deployer with the MainDeployer. Deployed packages deployed with this deployer are undeployed.

Specified by:
removeDeployer in interface MainDeployerMBean
Parameters:
deployer - a SubDeployer value

listDeployers

public Collection listDeployers()
Deprecated. 
The listDeployers method returns a collection of ObjectNames of deployers registered with the MainDeployer.

Specified by:
listDeployers in interface MainDeployerMBean
Returns:
a Collection value

getObjectName

protected ObjectName getObjectName(MBeanServer server,
                                   ObjectName name)
                            throws MalformedObjectNameException
Deprecated. 
Description copied from class: ServiceMBeanSupport
Sub-classes should override this method if they only need to set their object name during MBean pre-registration.

Overrides:
getObjectName in class ServiceMBeanSupport
Parameters:
server - the mbeanserver
name - the suggested name, maybe null
Returns:
the object name
Throws:
MalformedObjectNameException - for a bad object name

createService

protected void createService()
                      throws Exception
Deprecated. 
The createService method is one of the ServiceMBean lifecyle operations. (no jmx tag needed from superinterface)

Overrides:
createService in class ServiceMBeanSupport
Throws:
Exception - if an error occurs

shutdown

public void shutdown()
Deprecated. 
The shutdown method undeploys all deployed packages in reverse order of their deployement.

Specified by:
shutdown in interface MainDeployerMBean

redeploy

public void redeploy(String urlspec)
              throws DeploymentException,
                     MalformedURLException
Deprecated. 
Describe redeploy method here.

Specified by:
redeploy in interface MainDeployerMBean
Parameters:
urlspec - a String value
Throws:
DeploymentException - if an error occurs
MalformedURLException - if an error occurs

redeploy

public void redeploy(URL url)
              throws DeploymentException
Deprecated. 
Describe redeploy method here.

Specified by:
redeploy in interface MainDeployerMBean
Parameters:
url - an URL value
Throws:
DeploymentException - if an error occurs

redeploy

public void redeploy(DeploymentInfo sdi)
              throws DeploymentException
Deprecated. 
Describe redeploy method here.

Specified by:
redeploy in interface MainDeployerMBean
Parameters:
sdi - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

undeploy

public void undeploy(String urlspec)
              throws DeploymentException,
                     MalformedURLException
Deprecated. 
The undeploy method undeploys a package identified by a string representation of a URL.

Specified by:
undeploy in interface MainDeployerMBean
Parameters:
urlspec - the stringfied url to undeploy
Throws:
MalformedURLException - if an error occurs
DeploymentException

undeploy

public void undeploy(URL url)
              throws DeploymentException
Deprecated. 
The undeploy method undeploys a package identified by a URL

Specified by:
undeploy in interface Deployer
Specified by:
undeploy in interface DeployerMBean
Specified by:
undeploy in interface MainDeployerMBean
Parameters:
url - the url to undeploy
Throws:
DeploymentException - Failed to undeploy URL.

undeploy

public void undeploy(DeploymentInfo di)
Deprecated. 
The undeploy method undeploys a package represented by a DeploymentInfo object.

Specified by:
undeploy in interface MainDeployerMBean
Parameters:
di - a DeploymentInfo value

undeploy

protected void undeploy(DeploymentInfo di,
                        boolean isShutdown)
Deprecated. 

deploy

public void deploy(String urlspec)
            throws DeploymentException,
                   MalformedURLException
Deprecated. 
The deploy method deploys a package identified by a string representation of a URL.

Specified by:
deploy in interface MainDeployerMBean
Parameters:
urlspec - a String value
Throws:
MalformedURLException - if an error occurs
DeploymentException

deploy

public void deploy(URL url)
            throws DeploymentException
Deprecated. 
The deploy method deploys a package identified by a URL

Specified by:
deploy in interface Deployer
Specified by:
deploy in interface DeployerMBean
Specified by:
deploy in interface MainDeployerMBean
Parameters:
url - an URL value
Throws:
DeploymentException - Failed to deploy URL.

deploy

public void deploy(DeploymentInfo deployment)
            throws DeploymentException
Deprecated. 
The deploy method deploys a package represented by a DeploymentInfo object.

Specified by:
deploy in interface MainDeployerMBean
Parameters:
deployment - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

copy

protected void copy(URL src,
                    File dest)
             throws IOException
Deprecated. 
Throws:
IOException

start

public void start(String urlspec)
           throws DeploymentException,
                  MalformedURLException
Deprecated. 
The start method starts a package identified by a URL

Specified by:
start in interface MainDeployerMBean
Parameters:
urlspec - an URL value
Throws:
DeploymentException
MalformedURLException

stop

public void stop(String urlspec)
          throws DeploymentException,
                 MalformedURLException
Deprecated. 
The stop method stops a package identified by a URL

Specified by:
stop in interface MainDeployerMBean
Parameters:
urlspec - an URL value
Throws:
DeploymentException
MalformedURLException

isDeployed

public boolean isDeployed(String url)
                   throws MalformedURLException
Deprecated. 
The isDeployed method tells you if a package identified by a string representation of a URL is currently deployed.

Specified by:
isDeployed in interface MainDeployerMBean
Parameters:
url - a String value
Returns:
a boolean value
Throws:
MalformedURLException - if an error occurs

isDeployed

public boolean isDeployed(URL url)
Deprecated. 
The isDeployed method tells you if a packaged identified by a URL is deployed.

Specified by:
isDeployed in interface Deployer
Specified by:
isDeployed in interface DeployerMBean
Specified by:
isDeployed in interface MainDeployerMBean
Parameters:
url - an URL value
Returns:
a boolean value

checkDeployed

protected boolean checkDeployed(String name)
Deprecated. 
Is deployed.

Parameters:
name - the name of the deployment
Returns:
true if deployed, false otherwise

getDeployment

public org.jboss.deployers.client.spi.Deployment getDeployment(URL url)
Deprecated. 
The getDeployment method returns the Deployment object for the URL supplied.

Specified by:
getDeployment in interface MainDeployerMBean
Parameters:
url - an URL value
Returns:
a Deployment value

getDeploymentContext

@Deprecated
public org.jboss.deployers.structure.spi.DeploymentContext getDeploymentContext(URL url)
Deprecated. 

The getDeploymentContext method returns the DeploymentContext object for the URL supplied.

Specified by:
getDeploymentContext in interface MainDeployerMBean
Parameters:
url - an URL value
Returns:
a DeploymentContext value

getDeploymentUnit

public org.jboss.deployers.structure.spi.DeploymentUnit getDeploymentUnit(URL url)
Deprecated. 
The getDeploymentUnit method returns the DeploymentUnit object for the URL supplied.

Specified by:
getDeploymentUnit in interface MainDeployerMBean
Parameters:
url - an URL value
Returns:
a DeploymentUnit value

getWatchUrl

public URL getWatchUrl(URL url)
Deprecated. 
The getWatchUrl method returns the URL that, when modified, indicates that a redeploy is needed.

Specified by:
getWatchUrl in interface MainDeployerMBean
Parameters:
url - an URL value
Returns:
a URL value

checkIncompleteDeployments

public void checkIncompleteDeployments()
                                throws DeploymentException
Deprecated. 
Check the current deployment states and generate a IncompleteDeploymentException if there are mbeans waiting for depedencies.

Specified by:
checkIncompleteDeployments in interface MainDeployerMBean
Throws:
IncompleteDeploymentException
DeploymentException


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