public class CredentialDTO extends java.lang.Object implements Credential
Modifier and Type | Class and Description |
---|---|
static class |
CredentialDTO.Builder
Builder class for constructing CredentialDTO instances.
|
CREDENTIAL_TYPE, EXPIRE_TIME_IN_MS
Modifier and Type | Method and Description |
---|---|
static CredentialDTO.Builder |
builder() |
java.util.Map<java.lang.String,java.lang.String> |
credentialInfo()
Returns credential information.
|
java.lang.String |
credentialType()
Returns the type of the credential.
|
boolean |
equals(java.lang.Object o) |
long |
expireTimeInMs()
Returns the expiration time of the credential in milliseconds since the epoch, 0 means not
expire.
|
int |
hashCode() |
void |
initialize(java.util.Map<java.lang.String,java.lang.String> credentialInfo,
long expireTimeInMs)
Initialize the credential with the credential information.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toProperties
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String credentialType()
Credential
credentialType
in interface Credential
public long expireTimeInMs()
Credential
expireTimeInMs
in interface Credential
public java.util.Map<java.lang.String,java.lang.String> credentialInfo()
Credential
credentialInfo
in interface Credential
public void initialize(java.util.Map<java.lang.String,java.lang.String> credentialInfo, long expireTimeInMs)
Credential
This method is invoked to deserialize the credential in client side.
initialize
in interface Credential
credentialInfo
- The credential information from Credential.credentialInfo()
.expireTimeInMs
- The expire-time from Credential.expireTimeInMs()
.public static CredentialDTO.Builder builder()