Class AccountingPointDataHandler
java.lang.Object
energy.eddie.regionconnector.de.eta.permission.handlers.AccountingPointDataHandler
- All Implemented Interfaces:
EventHandler<AcceptedEvent>
@Component
public class AccountingPointDataHandler
extends Object
implements EventHandler<AcceptedEvent>
Handles
AcceptedEvents 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 refresh token persisted on the AcceptedEvent; 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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(AcceptedEvent 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<AcceptedEvent>- Parameters:
event- event that indicates that a permission request has been changed
-