Class JMXTestClient
- java.lang.Object
-
- com.adaptris.tester.runtime.clients.JMXTestClient
-
- All Implemented Interfaces:
TestClient,java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
EmbeddedTestClient,ExternalJMXTestClient,LocalTestClient
public abstract class JMXTestClient extends java.lang.Object implements TestClient
Abstract class forTestClientimplementations over JMX.
-
-
Constructor Summary
Constructors Constructor Description JMXTestClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TestMessageapplyService(java.lang.String xml, TestMessage message)Apply the service to the input message and return outputted message, method usesAdapterComponentCheckerMBean.applyService(String, com.adaptris.interlok.types.SerializableMessage).abstract voidclose()Close connection initialised ininit(ServiceTestConfig config).JMXTestClientinit(ServiceTestConfig config)Initialises the JMX test client.abstract javax.management.MBeanServerConnectioninitMBeanServerConnection(ServiceTestConfig config)Implementations should initialise and return theMBeanServerConnectionto be used ininit(ServiceTestConfig config)
-
-
-
Method Detail
-
init
public final JMXTestClient init(ServiceTestConfig config) throws ServiceTestException
Initialises the JMX test client. Test client initialisation includes configuring and connecting to client needed inapplyService(String, TestMessage). Method makes a call toinitMBeanServerConnection(ServiceTestConfig config)which is abstract method.- Specified by:
initin interfaceTestClient- Returns:
- an initialised TestClient instance for try-with-resources...
- Throws:
ServiceTestException- wrapping any thrown exception
-
initMBeanServerConnection
public abstract javax.management.MBeanServerConnection initMBeanServerConnection(ServiceTestConfig config) throws ServiceTestException
Implementations should initialise and return theMBeanServerConnectionto be used ininit(ServiceTestConfig config)- Returns:
MBeanServerConnectionto be used ininit(ServiceTestConfig config)- Throws:
ServiceTestException- wrapping any thrown exception
-
close
public abstract void close() throws java.io.IOExceptionClose connection initialised ininit(ServiceTestConfig config).- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException- wrapping any thrown exception (dictated byCloseable.close()
-
applyService
public final TestMessage applyService(java.lang.String xml, TestMessage message) throws CoreException
Apply the service to the input message and return outputted message, method usesAdapterComponentCheckerMBean.applyService(String, com.adaptris.interlok.types.SerializableMessage).- Specified by:
applyServicein interfaceTestClient- Parameters:
xml- Interlok service configurationmessage- InputTestMessageto test with- Returns:
TestMessagereturned by executing service- Throws:
CoreException- thrown byAdapterComponentCheckerMBean.applyService(String, com.adaptris.interlok.types.SerializableMessage)
-
-