public abstract class Provider extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BERLIB_PROPFILE
The default file searched for on CP to load default provider props.
|
static String |
BERLIB_PROVIDER
BER Library provider class name property
|
static String |
DEFAULT_PROVIDER
Default BER Library provider class name
|
static String |
PROVIDER_MONITOR_KEY
A provider monitor key.
|
static String |
USING_DEFAULTS_MSG
Message to use when using defaults
|
Modifier | Constructor and Description |
---|---|
protected |
Provider(String name,
String vendor)
Creates an instance of a Provider.
|
Modifier and Type | Method and Description |
---|---|
abstract ProviderDecoder |
getDecoder(BinaryAttributeDetector binaryAttributeDetector,
int maxPDUSize)
Gets the decoder associated with this provider.
|
abstract ProviderEncoder |
getEncoder()
Gets the encoder associated with this provider.
|
static Properties |
getEnvironment()
Loads the properties for the effective environment.
|
String |
getName()
Gets the descriptive name for this Provider.
|
static Provider |
getProvider()
Gets an instance of the configured Provider.
|
static Provider |
getProvider(Hashtable<Object,Object> env)
Gets an instance of the Provider specified by the
asn.1.berlib.provider
property value. |
String |
getVendor()
Gets this Providers vendor name if it was provided.
|
public static final String DEFAULT_PROVIDER
public static final String BERLIB_PROVIDER
public static final String BERLIB_PROPFILE
public static final String PROVIDER_MONITOR_KEY
public static final String USING_DEFAULTS_MSG
public final String getName()
public final String getVendor()
public abstract ProviderEncoder getEncoder() throws ProviderException
ProviderException
- if the provider or its encoder cannot be foundpublic abstract ProviderDecoder getDecoder(BinaryAttributeDetector binaryAttributeDetector, int maxPDUSize) throws ProviderException
binaryAttributeDetector
- detects whether or not attributes are binarymaxPDUSize
- the maximum size a PDU can beProviderException
- if the provider or its decoder cannot be foundpublic static Provider getProvider() throws ProviderException
asn.1.berlib.provider
property. The property is searched for within berlib.properties files
that are on the java.class.path. If at least one berlib.properties is not
found the default provider is used. The resultant value (default or
otherwise) for the property can be overridden by command line properties.ProviderException
- if the provider cannot be foundpublic static Provider getProvider(Hashtable<Object,Object> env) throws ProviderException
asn.1.berlib.provider
property value. The property is searched for within properties object
passed in as a parameter for this method only.env
- the environment used to locate the providerProviderException
- if the provider cannot be foundpublic static Properties getEnvironment()
-Dproperty=value
java command-line arguments.Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.