org.jboss.messaging.core.deployers.impl
Class XmlDeployer

java.lang.Object
  extended by org.jboss.messaging.core.deployers.impl.XmlDeployer
All Implemented Interfaces:
Deployer, MessagingComponent
Direct Known Subclasses:
JMSServerDeployer, QueueSettingsDeployer, SecurityDeployer, SecurityManagerDeployer

public abstract class XmlDeployer
extends java.lang.Object
implements Deployer, MessagingComponent

Author:
Andy Taylor

Field Summary
protected static java.lang.String NAME_ATTR
           
 
Constructor Summary
XmlDeployer()
           
 
Method Summary
 void addToConfiguration(java.net.URL url, java.lang.String name, org.w3c.dom.Node e)
          adds a URL to the already configured set of url's this deployer is handling
abstract  void deploy(org.w3c.dom.Node node)
          deploy an element
 void deploy(java.net.URL url)
          Deploy the URL for the first time
abstract  java.lang.String[] getElementTagName()
          the names of the elements to deploy
 java.lang.String getKeyAttribute()
          the key attribute for theelement, usually 'name' but can be overridden
protected  org.w3c.dom.Element getRootElement(java.net.URL url)
           
abstract  int getWeight()
          the weight of the deployer, used for ordering the order that deployers are deployed.
 void redeploy(java.net.URL url)
          Redeploys a URL if changed
 void start()
           
 void stop()
           
abstract  void undeploy(org.w3c.dom.Node node)
          undeploys an element
 void undeploy(java.net.URL url)
          Undeploys a resource that has been removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.messaging.core.deployers.Deployer
getConfigFileName
 

Field Detail

NAME_ATTR

protected static final java.lang.String NAME_ATTR
See Also:
Constant Field Values
Constructor Detail

XmlDeployer

public XmlDeployer()
Method Detail

addToConfiguration

public void addToConfiguration(java.net.URL url,
                               java.lang.String name,
                               org.w3c.dom.Node e)
adds a URL to the already configured set of url's this deployer is handling

Parameters:
url - The URL to add
name - the name of the element
e - .

redeploy

public void redeploy(java.net.URL url)
              throws java.lang.Exception
Redeploys a URL if changed

Specified by:
redeploy in interface Deployer
Parameters:
url - The resource to redeploy
Throws:
java.lang.Exception - .

undeploy

public void undeploy(java.net.URL url)
              throws java.lang.Exception
Undeploys a resource that has been removed

Specified by:
undeploy in interface Deployer
Parameters:
url - The Resource that was deleted
Throws:
java.lang.Exception - .

deploy

public void deploy(java.net.URL url)
            throws java.lang.Exception
Deploy the URL for the first time

Specified by:
deploy in interface Deployer
Parameters:
url - The resource todeploy
Throws:
java.lang.Exception - .

getKeyAttribute

public java.lang.String getKeyAttribute()
the key attribute for theelement, usually 'name' but can be overridden

Returns:
the key attribute

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

getElementTagName

public abstract java.lang.String[] getElementTagName()
the names of the elements to deploy

Returns:
the names of the elements todeploy

deploy

public abstract void deploy(org.w3c.dom.Node node)
                     throws java.lang.Exception
deploy an element

Parameters:
node - the element to deploy
Throws:
java.lang.Exception - .

undeploy

public abstract void undeploy(org.w3c.dom.Node node)
                       throws java.lang.Exception
undeploys an element

Parameters:
node - the element to undeploy
Throws:
java.lang.Exception - .

getWeight

public abstract int getWeight()
Description copied from interface: Deployer
the weight of the deployer, used for ordering the order that deployers are deployed.

Specified by:
getWeight in interface Deployer
Returns:
the weight

getRootElement

protected org.w3c.dom.Element getRootElement(java.net.URL url)
                                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2006 JBoss Inc. All Rights Reserved.