Class FakeDns.NameServiceListener
java.lang.Object
io.debezium.testing.testcontainers.util.FakeDns.NameServiceListener
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
- FakeDns
NameServiceListener with a NameService implementation to fallback to.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNameServiceListener(Object fallbackNameService) CreatesFakeDns.NameServiceListenerwith fallback NameService The parameter is untyped asjava.net.InetAddress$NameServiceis private -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetHostByAddr(byte[] addr) private <T,P> T invokeFallBackMethod(String methodName, Class<T> returnType, P param) private InetAddress[]lookupAllHostAddr(String host)
-
Field Details
-
fallbackNameService
-
-
Constructor Details
-
NameServiceListener
NameServiceListener(Object fallbackNameService) CreatesFakeDns.NameServiceListenerwith fallback NameService The parameter is untyped asjava.net.InetAddress$NameServiceis private- Parameters:
fallbackNameService- fallback NameService
-
-
Method Details
-
lookupAllHostAddr
- Throws:
UnknownHostException
-
getHostByAddr
- Throws:
UnknownHostException
-
invokeFallBackMethod
private <T,P> T invokeFallBackMethod(String methodName, Class<T> returnType, P param) throws UnknownHostException - Throws:
UnknownHostException
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-