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
ConstructorsModifierConstructorDescriptionprotectedCreate a newContainerConnectionDetailsFactory.ContainerConnectionDetailsinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected final CReturn the container that back this connection details instance.Return the source origin ornullif the origin is not known.protected SslBundleReturn theSslBundleto use with this connection ornull.protected booleanhasAnnotation(Class<? extends Annotation> annotationType) Whether the field or bean is annotated with the given annotation.voidsetApplicationContext(ApplicationContext applicationContext) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
ContainerConnectionDetails
Create a newContainerConnectionDetailsFactory.ContainerConnectionDetailsinstance.- Parameters:
source- the sourceContainerConnectionSource
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin 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 theSslBundleto 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:OriginProviderReturn the source origin ornullif the origin is not known.- Specified by:
getOriginin 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:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-