@Immutable
public class ClientConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUDITOR_AUTHORIZATION_CREDENTIAL
scalar.dl.client.auditor.authorization.credential (Optional)An authorization credential for Auditor. |
static java.lang.String |
AUDITOR_ENABLED
Optional.
|
static java.lang.String |
AUDITOR_HOST
scalar.dl.client.auditor.host (Optional)A hostname or an IP address of the auditor ("localhost" by default). |
static java.lang.String |
AUDITOR_LINEARIZABLE_VALIDATION_CONTRACT_ID
scalar.dl.client.auditor.linearizable_validation.contract_id (Optional)The ID of ValidateLedger contract ("validate-ledger" by default). |
static java.lang.String |
AUDITOR_PORT
scalar.dl.client.auditor.port (Optional)A hostname or an IP address of the auditor ("localhost" by default). |
static java.lang.String |
AUDITOR_PRIVILEGED_PORT
scalar.dl.client.auditor.privileged_port (Optional)A port number of the auditor for privileged services (40052 by default). |
static java.lang.String |
AUDITOR_TLS_CA_ROOT_CERT_PATH
scalar.dl.client.auditor.tls.ca_root_cert_path (Optional)A custom CA root certificate (file path) for TLS communication for Auditor. |
static java.lang.String |
AUDITOR_TLS_CA_ROOT_CERT_PEM
scalar.dl.client.auditor.tls.ca_root_cert_pem (Optional)A custom CA root certificate (PEM data) for TLS communication for Auditor. |
static java.lang.String |
AUDITOR_TLS_ENABLED
scalar.dl.client.auditor.tls.enabled (Optional)A flag to enable TLS communication for Auditor (false by default). |
static java.lang.String |
AUDITOR_TLS_OVERRIDE_AUTHORITY
scalar.dl.client.auditor.tls.override_authority (Optional)A custom authority for TLS communication for Auditor. |
static java.lang.String |
AUTHENTICATION_METHOD
scalar.dl.client.authentication_method (Optional)The authentication method for a client and servers. |
static java.lang.String |
AUTHORIZATION_CREDENTIAL
scalar.dl.client.authorization.credential (Optional)An authorization credential for Ledger. |
static java.lang.String |
CERT_HOLDER_ID
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity_id instead. |
static java.lang.String |
CERT_PATH
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity.identity.digital_signature.cert_path instead. |
static java.lang.String |
CERT_PEM
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity.identity.digital_signature.cert_pem instead. |
static java.lang.String |
CERT_VERSION
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity.identity.digital_signature.cert_version instead. |
static java.lang.String |
DS_CERT_PATH
scalar.dl.client.entity.identity.digital_signature.cert_path PEM-encoded certificate data, which is required if scalar.dl.client.entity.identity.digital_signature.cert_pem is empty. |
static java.lang.String |
DS_CERT_PEM
scalar.dl.client.entity.identity.digital_signature.cert_pem The path of a certificate file in PEM format, which is required if scalar.dl.client.entity.identity.digital_signature.cert_path is empty. |
static java.lang.String |
DS_CERT_VERSION
scalar.dl.client.entity.identity.digital_signature.cert_version (Optional)The version of the certificate 1 by default. |
static java.lang.String |
DS_PRIVATE_KEY_PATH
scalar.dl.client.entity.identity.digital_signature.private_key_path The path of a private key file in PEM format, which corresponds to the specified certificate. |
static java.lang.String |
DS_PRIVATE_KEY_PEM
scalar.dl.client.entity.identity.digital_signature.private_key_pem PEM-encoded private key data. |
static java.lang.String |
ENTITY_ID
scalar.dl.client.entity.id A unique ID of a requester (e.g., a user or a device). |
static java.lang.String |
GRPC_DEADLINE_DURATION_MILLIS
scalar.dl.client.grpc.deadline_duration_millis (Optional)A deadline that is after the given duration from now for each request. |
static java.lang.String |
GRPC_MAX_INBOUND_MESSAGE_SIZE
scalar.dl.client.grpc.max_inbound_message_size (Optional)The maximum message size allowed for a single gRPC frame. |
static java.lang.String |
GRPC_MAX_INBOUND_METADATA_SIZE
scalar.dl.client.grpc.max_inbound_metadata_size (Optional)The maximum size of metadata allowed to be received. |
static java.lang.String |
HMAC_SECRET_KEY
scalar.dl.client.entity.identity.hmac.secret_key A secret key for HMAC, which is required if HMAC is used for authentication. |
static java.lang.String |
HMAC_SECRET_KEY_VERSION
scalar.dl.client.entity.identity.hmac.secret_key_version (Optional)The version of the HMAC key. |
static java.lang.String |
MODE
scalar.dl.client.mode (Optional)A client mode. |
static java.lang.String |
PRIVATE_KEY_PATH
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity.identity.digital_signature.private_key_path instead. |
static java.lang.String |
PRIVATE_KEY_PEM
Deprecated.
This variable will be deleted in release 5.0.0. Use
scalar.dl.client.entity.identity.digital_signature.private_key_pem instead. |
static java.lang.String |
SERVER_HOST
scalar.dl.client.server.host (Optional)A hostname or an IP address of the server ("localhost" by default). |
static java.lang.String |
SERVER_PORT
scalar.dl.client.server.port (Optional)A port number of the server (50051 by default). |
static java.lang.String |
SERVER_PRIVILEGED_PORT
scalar.dl.client.server.privileged_port (Optional)A port number of the server for privileged services (50052 by default). |
static java.lang.String |
TLS_CA_ROOT_CERT_PATH
scalar.dl.client.tls.ca_root_cert_path (Optional)A custom CA root certificate (file path) for TLS communication for Ledger. |
static java.lang.String |
TLS_CA_ROOT_CERT_PEM
scalar.dl.client.tls.ca_root_cert_pem (Optional)A custom CA root certificate (PEM data) for TLS communication for Ledger. |
static java.lang.String |
TLS_ENABLED
scalar.dl.client.tls.enabled (Optional)A flag to enable TLS communication for Ledger (false by default). |
static java.lang.String |
TLS_OVERRIDE_AUTHORITY
scalar.dl.client.tls.override_authority (Optional)A custom authority for TLS communication for Ledger. |
Constructor and Description |
---|
ClientConfig(java.io.File propertiesFile) |
ClientConfig(java.io.InputStream stream) |
ClientConfig(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
SpotBugs detects Bug Type "CT_CONSTRUCTOR_THROW" saying that "The object under construction
remains partially initialized and may be vulnerable to Finalizer attacks."
|
java.lang.String |
getAuditorLinearizableValidationContractId() |
com.scalar.dl.ledger.config.TargetConfig |
getAuditorTargetConfig() |
com.scalar.dl.ledger.config.AuthenticationMethod |
getAuthenticationMethod() |
ClientMode |
getClientMode() |
DigitalSignatureIdentityConfig |
getDigitalSignatureIdentityConfig() |
com.scalar.dl.ledger.config.GrpcClientConfig |
getGrpcClientConfig() |
HmacIdentityConfig |
getHmacIdentityConfig() |
com.scalar.dl.ledger.config.TargetConfig |
getLedgerTargetConfig() |
boolean |
isAuditorEnabled() |
public static final java.lang.String SERVER_HOST
scalar.dl.client.server.host
(Optional)public static final java.lang.String SERVER_PORT
scalar.dl.client.server.port
(Optional)public static final java.lang.String SERVER_PRIVILEGED_PORT
scalar.dl.client.server.privileged_port
(Optional)@Deprecated public static final java.lang.String CERT_HOLDER_ID
scalar.dl.client.entity_id
instead.scalar.dl.client.cert_holder_id
scalar.dl.client.cert_holder_id
and scalar.dl.client.entity_id
are
specified, scalar.dl.client.entity_id
will be used.@Deprecated public static final java.lang.String CERT_VERSION
scalar.dl.client.entity.identity.digital_signature.cert_version
instead.scalar.dl.client.cert_version
@Deprecated public static final java.lang.String CERT_PATH
scalar.dl.client.entity.identity.digital_signature.cert_path
instead.scalar.dl.client.cert_path
@Deprecated public static final java.lang.String CERT_PEM
scalar.dl.client.entity.identity.digital_signature.cert_pem
instead.scalar.dl.client.cert_pem
@Deprecated public static final java.lang.String PRIVATE_KEY_PATH
scalar.dl.client.entity.identity.digital_signature.private_key_path
instead.scalar.dl.client.private_key_path
@Deprecated public static final java.lang.String PRIVATE_KEY_PEM
scalar.dl.client.entity.identity.digital_signature.private_key_pem
instead.scalar.dl.client.private_key_pem
public static final java.lang.String ENTITY_ID
scalar.dl.client.entity.id
public static final java.lang.String HMAC_SECRET_KEY
scalar.dl.client.entity.identity.hmac.secret_key
public static final java.lang.String HMAC_SECRET_KEY_VERSION
scalar.dl.client.entity.identity.hmac.secret_key_version
(Optional)public static final java.lang.String DS_CERT_PATH
scalar.dl.client.entity.identity.digital_signature.cert_path
scalar.dl.client.entity.identity.digital_signature.cert_pem
is empty.public static final java.lang.String DS_CERT_PEM
scalar.dl.client.entity.identity.digital_signature.cert_pem
scalar.dl.client.entity.identity.digital_signature.cert_path
is empty.public static final java.lang.String DS_CERT_VERSION
scalar.dl.client.entity.identity.digital_signature.cert_version
(Optional)public static final java.lang.String DS_PRIVATE_KEY_PATH
scalar.dl.client.entity.identity.digital_signature.private_key_path
scalar.dl.client.entity.identity.digital_signature.private_key_pem
is
empty.public static final java.lang.String DS_PRIVATE_KEY_PEM
scalar.dl.client.entity.identity.digital_signature.private_key_pem
scalar.dl.client.entity.identity.digital_signature.private_key_path
is empty.public static final java.lang.String AUTHENTICATION_METHOD
scalar.dl.client.authentication_method
(Optional)"digital-signature"
(default)
or "hmac"
.public static final java.lang.String TLS_ENABLED
scalar.dl.client.tls.enabled
(Optional)public static final java.lang.String TLS_CA_ROOT_CERT_PATH
scalar.dl.client.tls.ca_root_cert_path
(Optional)public static final java.lang.String TLS_CA_ROOT_CERT_PEM
scalar.dl.client.tls.ca_root_cert_pem
(Optional)public static final java.lang.String TLS_OVERRIDE_AUTHORITY
scalar.dl.client.tls.override_authority
(Optional)public static final java.lang.String AUTHORIZATION_CREDENTIAL
scalar.dl.client.authorization.credential
(Optional)public static final java.lang.String GRPC_DEADLINE_DURATION_MILLIS
scalar.dl.client.grpc.deadline_duration_millis
(Optional)public static final java.lang.String GRPC_MAX_INBOUND_MESSAGE_SIZE
scalar.dl.client.grpc.max_inbound_message_size
(Optional)public static final java.lang.String GRPC_MAX_INBOUND_METADATA_SIZE
scalar.dl.client.grpc.max_inbound_metadata_size
(Optional)public static final java.lang.String MODE
scalar.dl.client.mode
(Optional)public static final java.lang.String AUDITOR_ENABLED
public static final java.lang.String AUDITOR_HOST
scalar.dl.client.auditor.host
(Optional)public static final java.lang.String AUDITOR_PORT
scalar.dl.client.auditor.port
(Optional)public static final java.lang.String AUDITOR_PRIVILEGED_PORT
scalar.dl.client.auditor.privileged_port
(Optional)public static final java.lang.String AUDITOR_TLS_ENABLED
scalar.dl.client.auditor.tls.enabled
(Optional)public static final java.lang.String AUDITOR_TLS_CA_ROOT_CERT_PATH
scalar.dl.client.auditor.tls.ca_root_cert_path
(Optional)public static final java.lang.String AUDITOR_TLS_CA_ROOT_CERT_PEM
scalar.dl.client.auditor.tls.ca_root_cert_pem
(Optional)public static final java.lang.String AUDITOR_TLS_OVERRIDE_AUTHORITY
scalar.dl.client.auditor.tls.override_authority
(Optional)public static final java.lang.String AUDITOR_AUTHORIZATION_CREDENTIAL
scalar.dl.client.auditor.authorization.credential
(Optional)public static final java.lang.String AUDITOR_LINEARIZABLE_VALIDATION_CONTRACT_ID
scalar.dl.client.auditor.linearizable_validation.contract_id
(Optional)public ClientConfig(java.io.File propertiesFile) throws java.io.IOException
java.io.IOException
public ClientConfig(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public ClientConfig(java.util.Properties properties) throws java.io.IOException
java.io.IOException
protected final void finalize()
finalize
in class java.lang.Object
public com.scalar.dl.ledger.config.AuthenticationMethod getAuthenticationMethod()
@Nullable public DigitalSignatureIdentityConfig getDigitalSignatureIdentityConfig()
@Nullable public HmacIdentityConfig getHmacIdentityConfig()
@Nonnull public com.scalar.dl.ledger.config.TargetConfig getLedgerTargetConfig()
@Nullable public com.scalar.dl.ledger.config.TargetConfig getAuditorTargetConfig()
public ClientMode getClientMode()
public boolean isAuditorEnabled()
public java.lang.String getAuditorLinearizableValidationContractId()
public com.scalar.dl.ledger.config.GrpcClientConfig getGrpcClientConfig()