public String getHostAndPort ( ) { if ( enablePlaintextPort ) { if ( plaintextPort < 0 ) { return HostAndPort . fromString ( host ) . toString ( ) ; } else { return HostAndPort . fromParts ( host , plaintextPort ) . toString ( ) ; } } return null ; }
Returns host and port together as something that can be used as part of a URI .