Ft/handler (#2)

This commit is contained in:
Anatolii Karlov 2019-06-03 10:44:17 +03:00 committed by GitHub
parent d4554df3e5
commit e0ec4d2dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 614 additions and 34 deletions

2
Jenkinsfile vendored
View File

@ -1,5 +1,5 @@
#!groovy
build('thrift-common-lib', 'docker-host') {
build('sink-common-lib', 'docker-host') {
checkoutRepo()
loadBuildUtils()

View File

@ -1,4 +1,4 @@
# thrift-common-lib
# sink-common-lib
Библиотека для переиспользования вздаимодействия с протоколами, обрабатываемые machinegun'ном:
- eventsink (hellgate)
- sinkievent (machinegun)

View File

@ -12,7 +12,7 @@
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>thrift-common-lib</artifactId>
<artifactId>sink-common-lib</artifactId>
<version>0.0.1</version>
<properties>

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.exception;
package com.rbkmoney.sink.common.exception;
public class ParseException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.exception;
package com.rbkmoney.sink.common.exception;
public class ThriftBinaryDeserializationException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.exception;
package com.rbkmoney.sink.common.exception;
public class ThriftBinarySerializationException extends RuntimeException {

View File

@ -0,0 +1,16 @@
package com.rbkmoney.sink.common.handle;
public interface EventHandler<E, B> {
default boolean accept(E payload) {
return true;
}
default void handle(E payload, B baseEvent) {
}
default void handle(E payload, B baseEvent, Integer changeId) {
}
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.EventHandler;
public interface MachineEventHandler<T> extends EventHandler<T, MachineEvent> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface PaymentEventHandler extends MachineEventHandler<EventPayload> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload;
import com.rbkmoney.damsel.payout_processing.EventPayload;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface PayoutEventHandler extends MachineEventHandler<EventPayload> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
import com.rbkmoney.damsel.payment_processing.CustomerChange;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface CustomerChangeEventHandler extends MachineEventHandler<CustomerChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
import com.rbkmoney.damsel.payment_processing.InvoiceChange;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface InvoiceChangeEventHandler extends MachineEventHandler<InvoiceChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface PartyChangeEventHandler extends MachineEventHandler<PartyChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
import com.rbkmoney.damsel.payout_processing.PayoutChange;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface PayoutChangeEventHandler extends MachineEventHandler<PayoutChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.claimeffect;
import com.rbkmoney.damsel.payment_processing.ClaimEffect;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
public interface ClaimEffectEventHandler extends MachineEventHandler<ClaimEffect> {
}

View File

@ -0,0 +1,35 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.impl;
import com.rbkmoney.damsel.payment_processing.ClaimEffect;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.claimeffect.ClaimEffectEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class ClaimEffectStatusAcceptedChangeMachineEventHandler implements PartyChangeEventHandler {
private final List<ClaimEffectEventHandler> eventsHandlers;
@Override
public boolean accept(PartyChange payload) {
return payload.isSetClaimStatusChanged()
&& payload.getClaimStatusChanged().getStatus().isSetAccepted()
&& payload.getClaimStatusChanged().getStatus().getAccepted().isSetEffects();
}
@Override
public void handle(PartyChange payload, MachineEvent baseEvent) {
for (int i = 0; i < payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().size(); i++) {
ClaimEffect effect = payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().get(i);
for (ClaimEffectEventHandler eventsHandler : eventsHandlers) {
if (eventsHandler.accept(effect)) {
eventsHandler.handle(effect, baseEvent, i);
}
}
}
}
}

View File

@ -0,0 +1,34 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
import com.rbkmoney.damsel.payment_processing.CustomerChange;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.CustomerChangeEventHandler;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
@Slf4j
@RequiredArgsConstructor
public class CustomerChangePaymentMachineEventHandler implements PaymentEventHandler {
private final List<CustomerChangeEventHandler> eventHandlers;
@Override
public boolean accept(EventPayload payload) {
return payload.isSetCustomerChanges();
}
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (CustomerChange change : payload.getCustomerChanges()) {
for (CustomerChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.damsel.payment_processing.InvoiceChange;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.InvoiceChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class InvoiceChangePaymentMachineEventHandler implements PaymentEventHandler {
private final List<InvoiceChangeEventHandler> eventHandlers;
@Override
public boolean accept(EventPayload payload) {
return payload.isSetInvoiceChanges();
}
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (InvoiceChange change : payload.getInvoiceChanges()) {
for (InvoiceChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PartyChangePaymentMachineEventHandler implements PaymentEventHandler {
private final List<PartyChangeEventHandler> eventHandlers;
@Override
public boolean accept(EventPayload payload) {
return payload.isSetPartyChanges();
}
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (PartyChange change : payload.getPartyChanges()) {
for (PartyChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
import com.rbkmoney.damsel.payout_processing.EventPayload;
import com.rbkmoney.damsel.payout_processing.PayoutChange;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PayoutChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PayoutChangePayoutMachineEventHandler implements PayoutEventHandler {
private final List<PayoutChangeEventHandler> eventHandlers;
@Override
public boolean accept(EventPayload payload) {
return payload.isSetPayoutChanges();
}
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (PayoutChange change : payload.getPayoutChanges()) {
for (PayoutChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,24 @@
package com.rbkmoney.sink.common.handle.machineevent.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PaymentEventMachineEventHandler implements MachineEventHandler<EventPayload> {
private final List<PaymentEventHandler> eventHandlers;
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (PaymentEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(payload)) {
eventHandler.handle(payload, baseEvent);
}
}
}
}

View File

@ -0,0 +1,24 @@
package com.rbkmoney.sink.common.handle.machineevent.impl;
import com.rbkmoney.damsel.payout_processing.EventPayload;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PayoutEventMachineEventHandler implements MachineEventHandler<EventPayload> {
private final List<PayoutEventHandler> eventHandlers;
@Override
public void handle(EventPayload payload, MachineEvent baseEvent) {
for (PayoutEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(payload)) {
eventHandler.handle(payload, baseEvent);
}
}
}
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.sink.common.handle.EventHandler;
public interface StockEventHandler<T> extends EventHandler<T, StockEvent> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event;
import com.rbkmoney.damsel.payment_processing.Event;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface PaymentEventHandler extends StockEventHandler<Event> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event;
import com.rbkmoney.damsel.payout_processing.Event;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface PayoutEventHandler extends StockEventHandler<Event> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change;
import com.rbkmoney.damsel.payment_processing.CustomerChange;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface CustomerChangeEventHandler extends StockEventHandler<CustomerChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change;
import com.rbkmoney.damsel.payment_processing.InvoiceChange;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface InvoiceChangeEventHandler extends StockEventHandler<InvoiceChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface PartyChangeEventHandler extends StockEventHandler<PartyChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change;
import com.rbkmoney.damsel.payout_processing.PayoutChange;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface PayoutChangeEventHandler extends StockEventHandler<PayoutChange> {
}

View File

@ -0,0 +1,8 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change.claimeffect;
import com.rbkmoney.damsel.payment_processing.ClaimEffect;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
public interface ClaimEffectEventHandler extends StockEventHandler<ClaimEffect> {
}

View File

@ -0,0 +1,35 @@
package com.rbkmoney.sink.common.handle.stockevent.event.change.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payment_processing.ClaimEffect;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.sink.common.handle.stockevent.event.change.PartyChangeEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.change.claimeffect.ClaimEffectEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class ClaimEffectStatusAcceptedChangeStockEventHandler implements PartyChangeEventHandler {
private final List<ClaimEffectEventHandler> eventsHandlers;
@Override
public boolean accept(PartyChange payload) {
return payload.isSetClaimStatusChanged()
&& payload.getClaimStatusChanged().getStatus().isSetAccepted()
&& payload.getClaimStatusChanged().getStatus().getAccepted().isSetEffects();
}
@Override
public void handle(PartyChange payload, StockEvent baseEvent) {
for (int i = 0; i < payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().size(); i++) {
ClaimEffect effect = payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().get(i);
for (ClaimEffectEventHandler eventsHandler : eventsHandlers) {
if (eventsHandler.accept(effect)) {
eventsHandler.handle(effect, baseEvent, i);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.stockevent.event.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payment_processing.CustomerChange;
import com.rbkmoney.damsel.payment_processing.Event;
import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.change.CustomerChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class CustomerChangePaymentStockEventHandler implements PaymentEventHandler {
private final List<CustomerChangeEventHandler> eventHandlers;
@Override
public boolean accept(Event payload) {
return payload.getPayload().isSetCustomerChanges();
}
@Override
public void handle(Event payload, StockEvent baseEvent) {
for (CustomerChange change : payload.getPayload().getCustomerChanges()) {
for (CustomerChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.stockevent.event.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payment_processing.Event;
import com.rbkmoney.damsel.payment_processing.InvoiceChange;
import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.change.InvoiceChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class InvoiceChangePaymentStockEventHandler implements PaymentEventHandler {
private final List<InvoiceChangeEventHandler> eventHandlers;
@Override
public boolean accept(Event payload) {
return payload.getPayload().isSetInvoiceChanges();
}
@Override
public void handle(Event payload, StockEvent baseEvent) {
for (InvoiceChange change : payload.getPayload().getInvoiceChanges()) {
for (InvoiceChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.stockevent.event.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payment_processing.Event;
import com.rbkmoney.damsel.payment_processing.PartyChange;
import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.change.PartyChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PartyChangePaymentStockEventHandler implements PaymentEventHandler {
private final List<PartyChangeEventHandler> eventHandlers;
@Override
public boolean accept(Event payload) {
return payload.getPayload().isSetPartyChanges();
}
@Override
public void handle(Event payload, StockEvent baseEvent) {
for (PartyChange change : payload.getPayload().getPartyChanges()) {
for (PartyChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
package com.rbkmoney.sink.common.handle.stockevent.event.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payout_processing.Event;
import com.rbkmoney.damsel.payout_processing.PayoutChange;
import com.rbkmoney.sink.common.handle.stockevent.event.PayoutEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.change.PayoutChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PayoutChangePayoutStockEventHandler implements PayoutEventHandler {
private final List<PayoutChangeEventHandler> eventHandlers;
@Override
public boolean accept(Event payload) {
return payload.getPayload().isSetPayoutChanges();
}
@Override
public void handle(Event payload, StockEvent baseEvent) {
for (PayoutChange change : payload.getPayload().getPayoutChanges()) {
for (PayoutChangeEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(change)) {
eventHandler.handle(change, baseEvent);
}
}
}
}
}

View File

@ -0,0 +1,30 @@
package com.rbkmoney.sink.common.handle.stockevent.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payment_processing.Event;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PaymentEventStockEventHandler implements StockEventHandler<StockEvent> {
private final List<PaymentEventHandler> eventHandlers;
@Override
public boolean accept(StockEvent payload) {
return payload.getSourceEvent().isSetProcessingEvent();
}
@Override
public void handle(StockEvent payload, StockEvent baseEvent) {
Event event = payload.getSourceEvent().getProcessingEvent();
for (PaymentEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(event)) {
eventHandler.handle(event, baseEvent);
}
}
}
}

View File

@ -0,0 +1,30 @@
package com.rbkmoney.sink.common.handle.stockevent.impl;
import com.rbkmoney.damsel.event_stock.StockEvent;
import com.rbkmoney.damsel.payout_processing.Event;
import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
import com.rbkmoney.sink.common.handle.stockevent.event.PayoutEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
@RequiredArgsConstructor
public class PayoutEventStockEventHandler implements StockEventHandler<StockEvent> {
private final List<PayoutEventHandler> eventHandlers;
@Override
public boolean accept(StockEvent payload) {
return payload.getSourceEvent().isSetPayoutEvent();
}
@Override
public void handle(StockEvent payload, StockEvent baseEvent) {
Event event = payload.getSourceEvent().getPayoutEvent();
for (PayoutEventHandler eventHandler : eventHandlers) {
if (eventHandler.accept(event)) {
eventHandler.handle(event, baseEvent);
}
}
}
}

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.parser;
package com.rbkmoney.sink.common.parser;
public interface Parser<F, T> {

View File

@ -1,9 +1,9 @@
package com.rbkmoney.thrift.common.parser.impl;
package com.rbkmoney.sink.common.parser.impl;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.thrift.common.exception.ParseException;
import com.rbkmoney.thrift.common.parser.Parser;
import com.rbkmoney.thrift.common.serialization.BinaryDeserializer;
import com.rbkmoney.sink.common.exception.ParseException;
import com.rbkmoney.sink.common.parser.Parser;
import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

View File

@ -1,7 +1,7 @@
package com.rbkmoney.thrift.common.parser.impl;
package com.rbkmoney.sink.common.parser.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.thrift.common.serialization.BinaryDeserializer;
import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
public class PaymentEventPayloadMachineEventParser extends MachineEventParser<EventPayload> {

View File

@ -1,7 +1,7 @@
package com.rbkmoney.thrift.common.parser.impl;
package com.rbkmoney.sink.common.parser.impl;
import com.rbkmoney.damsel.payout_processing.EventPayload;
import com.rbkmoney.thrift.common.serialization.BinaryDeserializer;
import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
public class PayoutEventPayloadMachineEventParser extends MachineEventParser<EventPayload> {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization;
package com.rbkmoney.sink.common.serialization;
public interface BinaryDeserializer<T> {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization;
package com.rbkmoney.sink.common.serialization;
public interface BinarySerializer<T> {

View File

@ -1,7 +1,7 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.thrift.common.exception.ThriftBinaryDeserializationException;
import com.rbkmoney.thrift.common.serialization.BinaryDeserializer;
import com.rbkmoney.sink.common.exception.ThriftBinaryDeserializationException;
import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
import lombok.extern.slf4j.Slf4j;
import org.apache.thrift.TBase;
import org.apache.thrift.TDeserializer;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.damsel.payout_processing.EventPayload;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.damsel.payment_processing.EventPayload;

View File

@ -1,7 +1,7 @@
package com.rbkmoney.thrift.common.serialization.impl;
package com.rbkmoney.sink.common.serialization.impl;
import com.rbkmoney.thrift.common.exception.ThriftBinarySerializationException;
import com.rbkmoney.thrift.common.serialization.BinarySerializer;
import com.rbkmoney.sink.common.exception.ThriftBinarySerializationException;
import com.rbkmoney.sink.common.serialization.BinarySerializer;
import lombok.extern.slf4j.Slf4j;
import org.apache.thrift.TBase;
import org.apache.thrift.TException;

View File

@ -1,11 +1,11 @@
package com.rbkmoney.thrift.common.parser;
package com.rbkmoney.sink.common.parser;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import com.rbkmoney.machinegun.msgpack.Value;
import com.rbkmoney.thrift.common.parser.impl.PaymentEventPayloadMachineEventParser;
import com.rbkmoney.thrift.common.serialization.impl.PaymentEventPayloadDeserializer;
import com.rbkmoney.thrift.common.serialization.impl.PaymentEventPayloadSerializer;
import com.rbkmoney.sink.common.parser.impl.PaymentEventPayloadMachineEventParser;
import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadSerializer;
import org.junit.Test;
import java.util.Collections;

View File

@ -1,8 +1,8 @@
package com.rbkmoney.thrift.common.serialization;
package com.rbkmoney.sink.common.serialization;
import com.rbkmoney.damsel.payment_processing.EventPayload;
import com.rbkmoney.thrift.common.serialization.impl.PaymentEventPayloadDeserializer;
import com.rbkmoney.thrift.common.serialization.impl.PaymentEventPayloadSerializer;
import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadSerializer;
import org.junit.Test;
import java.util.Collections;