Package anbxj
Class AnBx_Agent
java.lang.Object
anbxj.AnBx_Agent
- All Implemented Interfaces:
Serializable,Principal
AnBx Agent
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAnBx_Agent(String alias) Constructs an AnBx_Agent with the specified alias (no certificates).AnBx_Agent(String alias, AnB_Crypto_Wrapper lb) Constructs an AnBx_Agent with the specified alias and certificates retrieved from a Crypto_Wrapper (works for both AnB_Crypto_Wrapper and AnB_Session because AnB_Session extends AnB_Crypto_Wrapper).AnBx_Agent(String alias, Map<Crypto_KeyStoreType, Certificate> cert) Constructs an AnBx_Agent with the specified alias and certificates. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the certificate associated with the specifiedCrypto_KeyStoreType.getName()inthashCode()booleanChecks if the AnBx_Agent has certificates for all specified Crypto_KeyStoreTypes.toString()
-
Constructor Details
-
AnBx_Agent
Constructs an AnBx_Agent with the specified alias (no certificates).- Parameters:
alias- The alias for the AnBx_Agent.
-
AnBx_Agent
Constructs an AnBx_Agent with the specified alias and certificates.- Parameters:
alias- The alias for the AnBx_Agent.cert- The certificates associated with the AnBx_Agent.
-
AnBx_Agent
Constructs an AnBx_Agent with the specified alias and certificates retrieved from a Crypto_Wrapper (works for both AnB_Crypto_Wrapper and AnB_Session because AnB_Session extends AnB_Crypto_Wrapper).- Parameters:
alias- The alias for the AnBx_Agent.lb- The Crypto_Wrapper from which to retrieve certificates.
-
-
Method Details
-
isCertified
public boolean isCertified()Checks if the AnBx_Agent has certificates for all specified Crypto_KeyStoreTypes.- Returns:
trueif all certificate slots are non-null,falseotherwise.
-
equals
-
hashCode
public int hashCode() -
getCert
Retrieves the certificate associated with the specifiedCrypto_KeyStoreType.If the agent has no certificate map (i.e. it was constructed without certificates) or if simply no certificate is stored for the requested keystore type, this method returns
null.- Parameters:
kst- the keystore type for which to get the certificate; must not benull- Returns:
- the certificate for the given keystore type, or
nullif none is available - Throws:
NullPointerException- ifkstisnull
-
getName
-
toString
-