package Ġcom . ol x . ps . vault Ċ Ċ import Ġcom . better cloud . vault . Ssl Config Ċ import Ġcom . better cloud . vault . Vault Ċ import Ġcom . better cloud . vault . Vault Config Ċ import Ġjava . util . concurrent . Executors Ċ import Ġjava . util . concurrent . Scheduled ExecutorService Ċ Ċ /** Ċ Ġ* ĠUsed Ġto Ġbuild Ġan Ġinstance Ġof Ġ[ com . better cloud . vault . Vault ] Ġfrom Ġa Ġ[ Vault Config ]. Ċ Ġ* Ċ Ġ* Ġ@ throws Ġ[ com . better cloud . vault . Vault Exception ] ĠIf Ġthe Ġaddress Ġis Ġnot Ġset Ġin Ġthe Ġcall Ġto Ġ[ config ]. Ċ Ġ*/ Ċ inline Ġfun Ġvault ( config : Ġ() Ġ-> ĠVault Config ): ĠVault Ġ= ĊĠĠĠ ĠVault ( config (). build ()) Ċ Ċ /** Ċ Ġ* ĠUsed Ġto Ġbuild Ġan Ġinstance Ġof Ġ[ Vault With Scheduled Executor ] Ġfrom Ġa Ġ[ Vault Config ]. ĠThe Ġdefault Ġvalue Ġfor Ġthe Ġ[ executor ] Ċ Ġ* Ġis Ġan Ġinstance Ġof Ġ[ Executors . new Single Thread Executor ]. Ċ Ġ* Ċ Ġ* Ġ@ throws Ġ[ com . better cloud . vault . Vault Exception ] ĠIf Ġthe Ġaddress Ġis Ġnot Ġset Ġin Ġthe Ġcall Ġto Ġ[ config ]. Ċ Ġ*/ Ċ inline Ġfun Ġvault With Scheduled Executor ( ĊĠĠĠ Ġexecutor : ĠScheduled ExecutorService Ġ= ĠExec utors . new Single Thread Scheduled Executor (), ĊĠĠĠ Ġconfig : Ġ() Ġ-> ĠVault Config Ċ ): ĠVault With Scheduled Executor Ġ= ĠVault With Scheduled Executor ( config (), Ġexecutor ) Ċ Ċ /** Ċ Ġ* ĠUsed Ġto Ġbuild Ġan Ġinstance Ġof Ġ[ com . better cloud . vault . Vault Config ]. Ċ Ġ* Ċ Ġ* Ġ@ throws Ġ[ com . better cloud . vault . Vault Exception ] ĠIf Ġthe Ġaddress Ġis Ġnot Ġset Ġin Ġthe Ġcall Ġto Ġ[ config ]. Ċ Ġ*/ Ċ inline Ġfun Ġconfig ( body : ĠVault Config . () Ġ-> ĠVault Config ): ĠVault Config Ġ= ĊĠĠĠ ĠVault Config (). body (). build () Ċ Ċ /** Ċ Ġ* Ġ[ com . better cloud . vault . Vault Config ] Ġextension Ġmethod Ġfor Ġsetting Ġ[ com . better cloud . vault . Ssl Config ]. Ċ Ġ*/ Ċ inline Ġfun ĠVault Config . ssl Config ( body : ĠS sl Config . () Ġ-> ĠS sl Config ): ĠVault Config Ġ= ĊĠĠĠ Ġthis . ssl Config ( Ssl Config (). body (). build ()) Ċ Ċ /** Ċ Ġ* ĠUsed Ġto Ġbuild Ġan Ġinstance Ġof Ġ[ com . better cloud . vault . Ssl Config ]. Ċ Ġ* Ċ Ġ* Ġ@ throws Ġ[ com . better cloud . vault . Vault Exception ] ĠIf ĠSSL Ġcertificate Ġverification Ġis Ġenabled , Ġand Ġany Ġproblem Ġoccurs Ċ Ġ* Ġwhile Ġtrying Ġto Ġbuild Ġan ĠSSL Context . Ċ Ġ*/ Ċ inline Ġfun Ġssl Config ( body : ĠS sl Config . () Ġ-> ĠS sl Config ): ĠS sl Config Ġ= ĊĠĠĠ ĠS sl Config (). body (). build () Ċ