Package org.apache.gravitino.credential
Class CredentialFactory
java.lang.Object
org.apache.gravitino.credential.CredentialFactory
Create a specific credential according to the credential information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CredentialCreates aCredentialinstance based on the provided credential type, information, and expiration time.
-
Constructor Details
-
CredentialFactory
public CredentialFactory()
-
-
Method Details
-
create
public static Credential create(String credentialType, Map<String, String> credentialInfo, long expireTimeInMs) Creates aCredentialinstance based on the provided credential type, information, and expiration time.- Parameters:
credentialType- The type of the credential to be created. This string is used to look up the corresponding credential class.credentialInfo- AMapcontaining key-value pairs of information needed to initialize the credential.expireTimeInMs- The expiration time of the credential in milliseconds.- Returns:
- A newly created and initialized
Credentialobject.
-