Class EmbeddedTestClient
- java.lang.Object
-
- com.adaptris.tester.runtime.clients.JMXTestClient
-
- com.adaptris.tester.runtime.clients.EmbeddedTestClient
-
- All Implemented Interfaces:
TestClient,java.io.Closeable,java.lang.AutoCloseable
public class EmbeddedTestClient extends JMXTestClient
Implementation ofJMXTestClientthat creates an embedded version of theAdapterto be used during testing.In the service test configuration this class is aliased as
embedded-jmx-test-clientwhich is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedTestClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes theAdapterusing theAdapterManager,SharedComponentListgetSharedComponents()ReturnsSharedComponentListwhich is added to theAdapterduring initialisation.SharedComponentProvidergetSharedComponentsProvider()ReturnsSharedComponentProviderwhich is used to addServiceas shared components to theAdapterduring initialisation.javax.management.MBeanServerConnectioninitMBeanServerConnection(ServiceTestConfig config)Initialises anAdapterusing theAdapterManager, shared components can be added usingsetSharedComponents(SharedComponentList).voidsetSharedComponents(SharedComponentList sharedComponentList)SetSharedComponentListwhich is added to theAdapterduring initialisation.voidsetSharedComponentsProvider(SharedComponentProvider sharedComponentsProvider)SetsSharedComponentProviderwhich is used to addServiceas shared components to theAdapterduring initialisation.-
Methods inherited from class com.adaptris.tester.runtime.clients.JMXTestClient
applyService, init
-
-
-
-
Method Detail
-
initMBeanServerConnection
public javax.management.MBeanServerConnection initMBeanServerConnection(ServiceTestConfig config) throws ServiceTestException
Initialises anAdapterusing theAdapterManager, shared components can be added usingsetSharedComponents(SharedComponentList).- Specified by:
initMBeanServerConnectionin classJMXTestClient- Returns:
MBeanServerConnectionto be used inJMXTestClient.init(ServiceTestConfig config)- Throws:
ServiceTestException- wrapping any thrown exception
-
close
public void close() throws java.io.IOExceptionCloses theAdapterusing theAdapterManager,- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classJMXTestClient- Throws:
java.io.IOException- wrapping any thrown exception (dictated byCloseable.close()
-
setSharedComponents
public void setSharedComponents(SharedComponentList sharedComponentList)
SetSharedComponentListwhich is added to theAdapterduring initialisation.- Parameters:
sharedComponentList-SharedComponentListwhich is added to theAdapter
-
getSharedComponents
public SharedComponentList getSharedComponents()
ReturnsSharedComponentListwhich is added to theAdapterduring initialisation.- Returns:
SharedComponentListthat has been set.
-
setSharedComponentsProvider
public void setSharedComponentsProvider(SharedComponentProvider sharedComponentsProvider)
SetsSharedComponentProviderwhich is used to addServiceas shared components to theAdapterduring initialisation.- Parameters:
sharedComponentsProvider-SharedComponentProviderwhich is used to addServiceas shared components to theAdapterduring initialisation.
-
getSharedComponentsProvider
public SharedComponentProvider getSharedComponentsProvider()
ReturnsSharedComponentProviderwhich is used to addServiceas shared components to theAdapterduring initialisation.- Returns:
SharedComponentProviderthat has been set
-
-