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
ConstructorsModifierConstructorDescriptionprotected
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.protected SslBundle
Return theSslBundle
to use with this connection ornull
.protected boolean
hasAnnotation
(Class<? extends Annotation> annotationType) Whether the field or bean is annotated with the given annotation.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
-
getSslBundle
Return theSslBundle
to use with this connection ornull
.- Returns:
- the ssl bundle or
null
- Since:
- 3.5.0
-
hasAnnotation
Whether the field or bean is annotated with the given annotation.- Parameters:
annotationType
- the annotation to check- Returns:
- whether the field or bean is annotated with the annotation
- Since:
- 3.5.0
-
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
-