org.jboss.test
Class JBossTestClusteredServices

java.lang.Object
  extended by org.jboss.test.AbstractTestDelegate
      extended by org.jboss.test.JBossTestServices
          extended by org.jboss.test.JBossTestClusteredServices

public class JBossTestClusteredServices
extends JBossTestServices

Derived implementation of JBossTestServices for cluster testing.

Version:
$Revision: 71787 $
Author:
Sacha Labourey., Scott.Stark@jboss.org
See Also:
JBossTestServices

Field Summary
protected  ArrayList adaptors
           
protected  ArrayList httpURLs
           
protected  ArrayList namingURLs
           
protected  ArrayList namingURLsHA
           
protected  ArrayList servers
           
 
Fields inherited from class org.jboss.test.JBossTestServices
DEFAULT_BEANCOUNT, DEFAULT_ITERATIONCOUNT, DEFAULT_LOGIN_CONFIG, DEFAULT_PASSWORD, DEFAULT_THREADCOUNT, DEFAULT_USERNAME, DEPLOYER_NAME, initialContext, jndiEnv, lc, server
 
Fields inherited from class org.jboss.test.AbstractTestDelegate
clazz, enableSecurity, log, logging, policy, securityPolicyName
 
Constructor Summary
JBossTestClusteredServices(Class clazz)
           
 
Method Summary
 void deploy(MBeanServerConnection server, String name)
          Deploy a package on the given server with the main deployer.
 MBeanServerConnection getAdaptor(int index)
           
 MBeanServerConnection[] getAdaptors()
           
 String getHANamingURL(int index)
           
 String[] getHANamingURLs()
          Get the JNDI provider urls for the cluster nodes
 String getHttpURL(int index)
           
 String[] getHttpURLs()
          Get the default web container urls for the cluster nodes
 String getNamingURL(int index)
           
 String[] getNamingURLs()
          Get the JNDI provider urls for the cluster nodes
 String getServer(int index)
           
 int getServerCount()
           
 String[] getServers()
           
 void init()
          Initializes the InitialContext if not set.
protected  Object invoke(ObjectName name, String method, Object[] args, String[] sig)
          Override to invoke the operation on all servers
 void redeploy(MBeanServerConnection server, String name)
           
 void setServerNames(String[] snames)
          This method gives overriding testcases to set the cluster servernames
 void setUp()
          The JUnit setup method
 void tearDown()
          The teardown method for JUnit
 void undeploy(MBeanServerConnection server, String name)
          Undeploy a package from the given server with the main deployer.
 
Methods inherited from class org.jboss.test.JBossTestServices
deploy, getDeployURL, getInitialContext, getServer, getServerHost, invoke, login, logout, redeploy, reinit, undeploy
 
Methods inherited from class org.jboss.test.AbstractTestDelegate
enableTrace, getDelegate, getLog, log, setUpLogging, setUpSecurity, tearDownLogging, tearDownSecurity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adaptors

protected ArrayList adaptors

servers

protected ArrayList servers

namingURLs

protected ArrayList namingURLs

namingURLsHA

protected ArrayList namingURLsHA

httpURLs

protected ArrayList httpURLs
Constructor Detail

JBossTestClusteredServices

public JBossTestClusteredServices(Class clazz)
Method Detail

setUp

public void setUp()
           throws Exception
Description copied from class: JBossTestServices
The JUnit setup method

Overrides:
setUp in class JBossTestServices
Throws:
Exception - for any error

tearDown

public void tearDown()
              throws Exception
Description copied from class: JBossTestServices
The teardown method for JUnit

Overrides:
tearDown in class JBossTestServices
Throws:
Exception - for any error

getServerCount

public int getServerCount()

getAdaptors

public MBeanServerConnection[] getAdaptors()
                                    throws Exception
Throws:
Exception

getAdaptor

public MBeanServerConnection getAdaptor(int index)
                                 throws Exception
Throws:
Exception

getServers

public String[] getServers()
                    throws Exception
Throws:
Exception

getServer

public String getServer(int index)
                 throws Exception
Throws:
Exception

getNamingURLs

public String[] getNamingURLs()
                       throws Exception
Get the JNDI provider urls for the cluster nodes

Returns:
Throws:
Exception

getNamingURL

public String getNamingURL(int index)
                    throws Exception
Throws:
Exception

getHANamingURLs

public String[] getHANamingURLs()
                         throws Exception
Get the JNDI provider urls for the cluster nodes

Returns:
Throws:
Exception

getHANamingURL

public String getHANamingURL(int index)
                      throws Exception
Throws:
Exception

getHttpURLs

public String[] getHttpURLs()
                     throws Exception
Get the default web container urls for the cluster nodes

Returns:
Throws:
Exception

getHttpURL

public String getHttpURL(int index)
                  throws Exception
Throws:
Exception

deploy

public void deploy(MBeanServerConnection server,
                   String name)
            throws Exception
Deploy a package on the given server with the main deployer. The supplied name is interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.

Parameters:
server - server on which the package should be deployed
name - filename/url of package to deploy.
Throws:
Exception - Description of Exception

redeploy

public void redeploy(MBeanServerConnection server,
                     String name)
              throws Exception
Throws:
Exception

undeploy

public void undeploy(MBeanServerConnection server,
                     String name)
              throws Exception
Undeploy a package from the given server with the main deployer. The supplied name is interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.

Parameters:
server - server on which the package should be deployed
name - filename/url of package to undeploy.
Throws:
Exception - Description of Exception

invoke

protected Object invoke(ObjectName name,
                        String method,
                        Object[] args,
                        String[] sig)
                 throws Exception
Override to invoke the operation on all servers

Overrides:
invoke in class JBossTestServices
Parameters:
name -
method -
args -
sig -
Returns:
Throws:
Exception

init

public void init()
          throws Exception
Description copied from class: JBossTestServices
Initializes the InitialContext if not set.

Overrides:
init in class JBossTestServices
Throws:
Exception - for any error

setServerNames

public void setServerNames(String[] snames)
This method gives overriding testcases to set the cluster servernames



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