use of io.tbd.tbdex.protocol.core.MessageThreadProcessor in project tbdex-protocol by TBD54566975.
the class ProcessorModule method configure.
@Override
protected void configure() {
MessageThreadStore threadStore = new HibernateMessageThreadStore();
CircleClient circleClient = new RealCircleClient();
MessageThreadProcessor processor = new MessageThreadProcessor.Builder(threadStore).registerProcessor(MessageType.Ask, new AskProcessor()).registerProcessor(MessageType.Close, new CloseProcessor()).registerProcessor(MessageType.OfferAccept, new OfferAcceptProcessor()).registerProcessor(MessageType.SettlementDetails, new SettlementDetailsProcessor(new PaymentProcessor(circleClient))).build();
bind(MessageThreadProcessor.class).toInstance(processor);
bind(MessageThreadStore.class).toInstance(threadStore);
bind(CircleClient.class).toInstance(circleClient);
}
use of io.tbd.tbdex.protocol.core.MessageThreadProcessor in project tbdex-protocol by TBD54566975.
the class ProcessorTestModule method configure.
@Override
protected void configure() {
MessageThreadStore threadStore = new HibernateMessageThreadStore();
CircleClient circleClient = new MockCircleClient();
MessageThreadProcessor processor = new MessageThreadProcessor.Builder(threadStore).registerProcessor(MessageType.Ask, new AskProcessor()).registerProcessor(MessageType.Close, new CloseProcessor()).registerProcessor(MessageType.OfferAccept, new OfferAcceptProcessor()).registerProcessor(MessageType.SettlementDetails, new SettlementDetailsProcessor(new PaymentProcessor(circleClient))).build();
bind(MessageThreadProcessor.class).toInstance(processor);
bind(MessageThreadStore.class).toInstance(threadStore);
bind(CircleClient.class).toInstance(circleClient);
}
Aggregations