Class AccountingPointDataHandler
java.lang.Object
energy.eddie.regionconnector.de.eta.permission.handlers.AccountingPointDataHandler
- All Implemented Interfaces:
EventHandler<PermissionEvent>
@Component
public class AccountingPointDataHandler
extends Object
implements EventHandler<PermissionEvent>
Handles
ACCEPTED permission events for permission requests whose data need is
AccountingPointDataNeed. Performs a single-shot fetch against the
accounting-point endpoint, publishes the payload to AccountingPointDataStream,
and commits the corresponding terminal event.
On 401 the handler attempts one in-flight refresh of the customer's access token using the persisted refresh token; the refreshed token is held only for the duration of the retry and is not persisted.
-
Constructor Summary
ConstructorsConstructorDescriptionAccountingPointDataHandler(EventBus eventBus, DePermissionRequestRepository repository, DataNeedsService dataNeedsService, EtaPlusApiClient apiClient, EtaAuthService authService, AccountingPointDataStream stream, Outbox outbox, DePermissionCredentialsRepository credentialsRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(PermissionEvent event) Subscription method for the event bus
-
Constructor Details
-
Method Details
-
accept
Description copied from interface:EventHandlerSubscription method for the event bus- Specified by:
acceptin interfaceEventHandler<PermissionEvent>- Parameters:
event- event that indicates that a permission request has been changed
-