List of usage examples for org.springframework.vault.core.lease.event SecretLeaseEvent getSource
@Override
public RequestedSecret getSource()
From source file:org.springframework.vault.core.env.LeaseAwareVaultPropertySource.java
/** * Hook method to handle a {@link SecretLeaseEvent}. * * @param leaseEvent must not be {@literal null}. * @param properties reference to property storage of this property source. *//*from w w w . j a va 2s . c om*/ protected void handleLeaseEvent(SecretLeaseEvent leaseEvent, Map<String, String> properties) { if (leaseEvent.getSource() != getRequestedSecret()) { return; } if (leaseEvent instanceof SecretLeaseExpiredEvent || leaseEvent instanceof BeforeSecretLeaseRevocationEvent || leaseEvent instanceof SecretLeaseCreatedEvent) { properties.clear(); } if (leaseEvent instanceof SecretLeaseCreatedEvent) { SecretLeaseCreatedEvent created = (SecretLeaseCreatedEvent) leaseEvent; properties.putAll(doTransformProperties(toStringMap(created.getSecrets()))); } }