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:
InitializingBean
,ConnectionDetails
,OriginProvider
- 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
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.
-
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
-