BridgeGateway<SUBSCRIBER_MODEL extends DomainModel, PUBLISHER_MODEL extends DomainModel, SUBSCRIBER_INPUT extends DomainInput> constructor
BridgeGateway<SUBSCRIBER_MODEL extends DomainModel, PUBLISHER_MODEL extends DomainModel, SUBSCRIBER_INPUT extends DomainInput> ({})
Implementation
BridgeGateway({
required UseCase subscriberUseCase,
required UseCase publisherUseCase,
}) : _subscriberUseCase = subscriberUseCase,
_publisherUseCase = publisherUseCase {
_subscriberUseCase.subscribe<SUBSCRIBER_MODEL, SUBSCRIBER_INPUT>(
(output) {
return Either<FailureDomainInput, SUBSCRIBER_INPUT>.right(
onResponse(
_publisherUseCase.getDomainModel<PUBLISHER_MODEL>(),
),
);
},
);
}