Class JMXTestClient
java.lang.Object
com.adaptris.tester.runtime.clients.JMXTestClient
- All Implemented Interfaces:
TestClient,Closeable,AutoCloseable
- Direct Known Subclasses:
EmbeddedTestClient,ExternalJMXTestClient,LocalTestClient
Abstract class for
TestClient implementations over JMX.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal TestMessageapplyService(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).final JMXTestClientinit(ServiceTestConfig config) Initialises the JMX test client.abstract MBeanServerConnectionImplementations should initialise and return theMBeanServerConnectionto be used ininit(ServiceTestConfig config)
-
Constructor Details
-
JMXTestClient
public JMXTestClient()
-
-
Method Details
-
init
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 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
Close connection initialised ininit(ServiceTestConfig config).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- wrapping any thrown exception (dictated byCloseable.close()
-
applyService
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)
-