Class ContainerConnectionSource<C extends org.testcontainers.containers.Container<?>>
java.lang.Object
org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource<C>
- Type Parameters:
C
- the generic container type
- All Implemented Interfaces:
OriginProvider
public final class ContainerConnectionSource<C extends org.testcontainers.containers.Container<?>>
extends Object
implements OriginProvider
Passed to
ContainerConnectionDetailsFactory
to provide details of the
@ServiceConnection
annotated Container
that provides
the service.- Since:
- 3.1.0
- Author:
- Moritz Halbritter, Andy Wilkinson, Phillip Webb
- See Also:
-
Method Summary
-
Method Details
-
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
-
getContainer
Return theContainer
that implements the service being connected to.- Returns:
- the
Container
providing the service
-
toString
-