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:
org.springframework.boot.origin.OriginProvider
public final class ContainerConnectionSource<C extends org.testcontainers.containers.Container<?>>
extends Object
implements org.springframework.boot.origin.OriginProvider
Passed to
ContainerConnectionDetailsFactory to provide details of the
@ServiceConnection annotated Container that provides
the service.- Since:
- 3.1.0
- See Also:
-
Method Summary
-
Method Details
-
accepts
public boolean accepts(String requiredConnectionName, Class<?> requiredContainerType, Class<?> requiredConnectionDetailsType) Return if this source accepts the given connection.- Parameters:
requiredConnectionName- the required connection name ornullrequiredContainerType- the required container typerequiredConnectionDetailsType- the required connection details type- Returns:
- if the connection is accepted by this source
- Since:
- 3.4.0
-
getOrigin
public org.springframework.boot.origin.Origin getOrigin()- Specified by:
getOriginin interfaceorg.springframework.boot.origin.OriginProvider
-
toString
-