public final class JedisURIHelper
extends java.lang.Object
redis[s]://[[username][:password]@] host[:port][/database]
Authentication details can be provided in the URI in the form of a username and password. Redis URIs may contain authentication details that effectively lead to usernames with passwords, password-only, or no authentication.
| Modifier and Type | Method and Description |
|---|---|
static int |
getDBIndex(java.net.URI uri) |
static HostAndPort |
getHostAndPort(java.net.URI uri) |
static java.lang.String |
getPassword(java.net.URI uri)
Extracts the password from the given URI.
|
static RedisProtocol |
getRedisProtocol(java.net.URI uri) |
static java.lang.String |
getUser(java.net.URI uri)
Extracts the user from the given URI.
|
static boolean |
isRedisScheme(java.net.URI uri) |
static boolean |
isRedisSSLScheme(java.net.URI uri) |
static boolean |
isValid(java.net.URI uri) |
public static HostAndPort getHostAndPort(java.net.URI uri)
public static java.lang.String getUser(java.net.URI uri)
For details on the URI format and authentication examples, see JedisURIHelper.
uri - the URI to extract the user fromURI.getUserInfo() info is missingpublic static java.lang.String getPassword(java.net.URI uri)
For details on the URI format and authentication examples, see JedisURIHelper.
uri - the URI to extract the password fromURI.getUserInfo() info is missingjava.lang.IllegalArgumentException - if URI.getUserInfo() is provided but does not contain
a passwordpublic static int getDBIndex(java.net.URI uri)
public static RedisProtocol getRedisProtocol(java.net.URI uri)
public static boolean isValid(java.net.URI uri)
public static boolean isRedisScheme(java.net.URI uri)
public static boolean isRedisSSLScheme(java.net.URI uri)
Copyright © 2025. All rights reserved.