Class ContainerConnectionDetailsFactory.ContainerConnectionDetails<C extends org.testcontainers.containers.Container<?>>
java.lang.Object
org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory.ContainerConnectionDetails<C>
- Type Parameters:
C
- the container type
- All Implemented Interfaces:
Aware
,InitializingBean
,ConnectionDetails
,OriginProvider
,ApplicationContextAware
- Enclosing class:
- ContainerConnectionDetailsFactory<C extends org.testcontainers.containers.Container<?>,
D extends ConnectionDetails>
protected static class ContainerConnectionDetailsFactory.ContainerConnectionDetails<C extends org.testcontainers.containers.Container<?>>
extends Object
implements ConnectionDetails, OriginProvider, InitializingBean, ApplicationContextAware
Base class for
ConnectionDetails
results that are backed by a
ContainerConnectionSource
.-
Constructor Summary
ModifierConstructorDescriptionprotected
Create a newContainerConnectionDetailsFactory.ContainerConnectionDetails
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected final C
Return the container that back this connection details instance.Return the source origin ornull
if the origin is not known.void
setApplicationContext
(ApplicationContext applicationContext) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
ContainerConnectionDetails
Create a newContainerConnectionDetailsFactory.ContainerConnectionDetails
instance.- Parameters:
source
- the sourceContainerConnectionSource
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Throws:
Exception
-
getContainer
Return the container that back this connection details instance. This method can only be called once the connection details bean has been initialized.- Returns:
- the container instance
-
getOrigin
Description copied from interface:OriginProvider
Return the source origin ornull
if the origin is not known.- Specified by:
getOrigin
in interfaceOriginProvider
- Returns:
- the origin or
null
-
setApplicationContext
@Deprecated(since="3.4.0", forRemoval=true) public void setApplicationContext(ApplicationContext applicationContext) throws BeansException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-