org.jboss.arquillian.protocol.jmx
Class JMXTestRunner

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.jboss.arquillian.protocol.jmx.JMXTestRunner
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, JMXTestRunnerMBean

public class JMXTestRunner
extends NotificationBroadcasterSupport
implements JMXTestRunnerMBean

An MBean to run test methods in container.

Author:
thomas.diesler@jboss.com

Nested Class Summary
static interface JMXTestRunner.TestClassLoader
           
 
Field Summary
 
Fields inherited from interface org.jboss.arquillian.protocol.jmx.JMXTestRunnerMBean
OBJECT_NAME
 
Constructor Summary
JMXTestRunner(JMXTestRunner.TestClassLoader classLoader)
           
 
Method Summary
protected  String getCurrentCall()
           
 void push(String eventId, byte[] command)
          Client side to push a Command result back to container.
 Command<?> receive()
          Receive Command results
 ObjectName registerMBean(MBeanServer mbeanServer)
           
 byte[] runTestMethod(String className, String methodName)
          Runs a test method on the given test class
 void send(Command<?> command)
          Broadcast Command commands to any listeners
protected  void setCurrentCall(String current)
           
 void unregisterMBean(MBeanServer mbeanServer)
           
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, 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 javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Constructor Detail

JMXTestRunner

public JMXTestRunner(JMXTestRunner.TestClassLoader classLoader)
Method Detail

registerMBean

public ObjectName registerMBean(MBeanServer mbeanServer)
                         throws JMException
Throws:
JMException

unregisterMBean

public void unregisterMBean(MBeanServer mbeanServer)
                     throws JMException
Throws:
JMException

runTestMethod

public byte[] runTestMethod(String className,
                            String methodName)
Description copied from interface: JMXTestRunnerMBean
Runs a test method on the given test class

Specified by:
runTestMethod in interface JMXTestRunnerMBean
Parameters:
className - the test class name
methodName - the test method name
Returns:
a serialized TestResult

send

public void send(Command<?> command)
Description copied from interface: JMXTestRunnerMBean
Broadcast Command commands to any listeners

Specified by:
send in interface JMXTestRunnerMBean
Parameters:
command - Command object containing the request

receive

public Command<?> receive()
Description copied from interface: JMXTestRunnerMBean
Receive Command results

Specified by:
receive in interface JMXTestRunnerMBean
Returns:
command Command object containing the result, null if none received (yet)

push

public void push(String eventId,
                 byte[] command)
Description copied from interface: JMXTestRunnerMBean
Client side to push a Command result back to container.

Specified by:
push in interface JMXTestRunnerMBean
Parameters:
eventId - used to correlate the result
command - Command object containing the result, serialized

getCurrentCall

protected String getCurrentCall()
Returns:
the currentCall

setCurrentCall

protected void setCurrentCall(String current)


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