Class KeyStoreCertificateStore
java.lang.Object
org.eclipse.milo.opcua.stack.core.security.KeyStoreCertificateStore
- All Implemented Interfaces:
Closeable,AutoCloseable,CertificateStore
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.eclipse.milo.opcua.stack.core.security.CertificateStore
CertificateStore.Entry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanCheck if thisCertificateStorehas an entry forcertificateTypeId.static KeyStoreCertificateStoreCreate andinitialize()a newKeyStoreCertificateStoreinstance.Get theCertificateStore.EntryforcertificateTypeId.protected StringGet the alias to use when accessing certificates of typecertificateTypeId.voidprotected voidCallget(NodeId)for each of the supported certificate types to pre-emptively load them into memory.Remove theCertificateStore.EntryforcertificateTypeId.voidset(NodeId certificateTypeId, CertificateStore.Entry entry) Set theCertificateStore.EntryforcertificateTypeId.
-
Constructor Details
-
KeyStoreCertificateStore
-
-
Method Details
-
initialize
- Throws:
Exception
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
contains
Description copied from interface:CertificateStoreCheck if thisCertificateStorehas an entry forcertificateTypeId.- Specified by:
containsin interfaceCertificateStore- Parameters:
certificateTypeId- the id to check.- Returns:
trueif thisCertificateStoreis managing an entry forcertificateTypeId.- Throws:
Exception- if an error occurs while checking.
-
get
Description copied from interface:CertificateStoreGet theCertificateStore.EntryforcertificateTypeId.- Specified by:
getin interfaceCertificateStore- Parameters:
certificateTypeId- the id of the certificate type to get theCertificateStore.Entryfor.- Returns:
- the
CertificateStore.EntryforcertificateTypeId, ornullif no entry exists forcertificateTypeId. - Throws:
Exception- if an error occurs while getting theCertificateStore.Entry.
-
remove
Description copied from interface:CertificateStoreRemove theCertificateStore.EntryforcertificateTypeId.- Specified by:
removein interfaceCertificateStore- Parameters:
certificateTypeId- the id of the certificate type to remove theCertificateStore.Entryfor.- Returns:
- the
CertificateStore.Entrythat was removed, ornullif no entry exists forcertificateTypeId. - Throws:
Exception- if an error occurs while removing theCertificateStore.Entry.
-
set
Description copied from interface:CertificateStoreSet theCertificateStore.EntryforcertificateTypeId.- Specified by:
setin interfaceCertificateStore- Parameters:
certificateTypeId- the alias to set theCertificateStore.Entryfor.entry- theCertificateStore.Entryto set.- Throws:
Exception- if an error occurs while setting theCertificateStore.Entry.
-
getAlias
Get the alias to use when accessing certificates of typecertificateTypeId.- Parameters:
certificateTypeId- theNodeIdof the certificate type.- Returns:
- the alias to use when accessing certificates of type
certificateTypeId.
-
loadEntries
Callget(NodeId)for each of the supported certificate types to pre-emptively load them into memory.- Throws:
Exception- if an error occurs while loading the entries.
-
createAndInitialize
public static KeyStoreCertificateStore createAndInitialize(KeyStoreCertificateStore.Settings settings) throws Exception Create andinitialize()a newKeyStoreCertificateStoreinstance.- Parameters:
settings- theKeyStoreCertificateStore.Settingsto use.- Returns:
- an initialized
KeyStoreCertificateStoreinstance. - Throws:
Exception- if an error occurs while initializing theKeyStoreCertificateStore.
-