@Test public void tls_failsOnNullSslContext() { thrown.expect(NullPointerException.class); ProtocolNegotiators.tls(null, "authority"); }
public static ProtocolNegotiator tls(SslContext sslContext, String authority) { Preconditions.checkNotNull(sslContext, "sslContext"); URI uri = GrpcUtil.authorityToUri(Preconditions.checkNotNull(authority, "authority")); String host; int port; if (uri.getHost() != null) { host = uri.getHost(); port = uri.getPort(); } else { host = authority; port = -1; } return new TlsNegotiator(sslContext, host, port); }
ProtocolNegotiators { public static ProtocolNegotiator tls(SslContext sslContext, String authority) { Preconditions.checkNotNull(sslContext, "sslContext"); URI uri = GrpcUtil.authorityToUri(Preconditions.checkNotNull(authority, "authority")); String host; int port; if (uri.getHost() != null) { host = uri.getHost(); port = uri.getPort(); } else { host = authority; port = -1; } return new TlsNegotiator(sslContext, host, port); } }
ProtocolNegotiators { public static ProtocolNegotiator tls(SslContext sslContext, String authority) { Preconditions.checkNotNull(sslContext, "sslContext"); URI uri = GrpcUtil.authorityToUri(Preconditions.checkNotNull(authority, "authority")); String host; int port; if (uri.getHost() != null) { host = uri.getHost(); port = uri.getPort(); } else { host = authority; port = -1; } return new TlsNegotiator(sslContext, host, port); } private  ProtocolNegotiators(); }
ProtocolNegotiators { public static ProtocolNegotiator tls(SslContext sslContext, String authority) { Preconditions.checkNotNull(sslContext, "sslContext"); URI uri = GrpcUtil.authorityToUri(Preconditions.checkNotNull(authority, "authority")); String host; int port; if (uri.getHost() != null) { host = uri.getHost(); port = uri.getPort(); } else { host = authority; port = -1; } return new TlsNegotiator(sslContext, host, port); } private  ProtocolNegotiators(); static ProtocolNegotiator serverPlaintext(); static ProtocolNegotiator serverTls(final SslContext sslContext); static ProtocolNegotiator tls(SslContext sslContext, String authority); static ProtocolNegotiator plaintextUpgrade(); static ProtocolNegotiator plaintext(); }
ProtocolNegotiators { public static ProtocolNegotiator tls(SslContext sslContext, String authority) { Preconditions.checkNotNull(sslContext, "sslContext"); URI uri = GrpcUtil.authorityToUri(Preconditions.checkNotNull(authority, "authority")); String host; int port; if (uri.getHost() != null) { host = uri.getHost(); port = uri.getPort(); } else { host = authority; port = -1; } return new TlsNegotiator(sslContext, host, port); } private  ProtocolNegotiators(); static ProtocolNegotiator serverPlaintext(); static ProtocolNegotiator serverTls(final SslContext sslContext); static ProtocolNegotiator tls(SslContext sslContext, String authority); static ProtocolNegotiator plaintextUpgrade(); static ProtocolNegotiator plaintext();  }