public class Services extends Object
| Constructor and Description |
|---|
Services() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getCacheVersion()
Returns the current cache version.
|
static Provider |
getProvider(String name)
Returns the provider with the specified name.
|
static ArrayList<Provider> |
getProviders()
Returns the actual registered providers.
|
static Provider.Service |
getSecureRandomService()
Returns the default SecureRandom service description.
|
static ArrayList<Provider.Service> |
getServices(String type)
Looks up the requested service by type.
|
static ArrayList<Provider.Service> |
getServices(String type,
String algorithm)
Looks up the requested service by type and algorithm.
|
static int |
insertProviderAt(Provider provider,
int position)
Inserts a provider at a specified 1-based position.
|
static void |
removeProvider(int providerNumber)
Removes the provider at the specified 1-based position.
|
static void |
setNeedRefresh()
In addition to being used here when the list of providers
changes, this method is also used by the Provider
implementation to indicate that a provides list of services has
changed.
|
public static ArrayList<Provider> getProviders()
public static Provider getProvider(String name)
public static int insertProviderAt(Provider provider, int position)
public static void removeProvider(int providerNumber)
public static ArrayList<Provider.Service> getServices(String type)
type and
should be provided in the same format used when registering a service
with a provider, for example, "KeyFactory". Callers can cache the
returned service information but such caches should be validated against
the result of Service.getCacheVersion() before use. Returns null
if there are no services of the given type found.public static ArrayList<Provider.Service> getServices(String type, String algorithm)
type and should be provided in the same format used when
registering a service with a provider, for example, "KeyFactory" and
"RSA". Callers can cache the returned service information but such caches
should be validated against the result of Service.getCacheVersion()
before use. Returns null if there are no services found.public static Provider.Service getSecureRandomService()
public static void setNeedRefresh()
public static int getCacheVersion()