@Test(expected = IllegalArgumentException.class) public void shouldValidateSniHostName() throws Exception { new SniNettyRouteSource(null, SSLContext.getDefault()).validate(); }
@Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } }
SniNettyRouteSource implements SniRouteSource { @Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } } }
SniNettyRouteSource implements SniRouteSource { @Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } } SniNettyRouteSource(String sniHostName, SSLContext sslContext);  SniNettyRouteSource(String sniHostName, String keyStoreFileName, char[] keyStorePassword); }
SniNettyRouteSource implements SniRouteSource { @Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } } SniNettyRouteSource(String sniHostName, SSLContext sslContext);  SniNettyRouteSource(String sniHostName, String keyStoreFileName, char[] keyStorePassword); @Override SSLContext getSslContext(); @Override String getSniHostName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override void validate(); }
SniNettyRouteSource implements SniRouteSource { @Override public void validate() { if (sniHostName == null || "".equals(sniHostName)) { throw new IllegalArgumentException("SNI Host name can not be null"); } if (jdkContext == null) { throw new IllegalArgumentException("JDK SSL Context must not be null"); } } SniNettyRouteSource(String sniHostName, SSLContext sslContext);  SniNettyRouteSource(String sniHostName, String keyStoreFileName, char[] keyStorePassword); @Override SSLContext getSslContext(); @Override String getSniHostName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override void validate();  }