use of bisq.network.p2p.MailboxMessage in project bisq-core by bisq-network.
the class SellerAsMakerProtocol method doApplyMailboxMessage.
// /////////////////////////////////////////////////////////////////////////////////////////
// Mailbox
// /////////////////////////////////////////////////////////////////////////////////////////
@Override
public void doApplyMailboxMessage(NetworkEnvelope networkEnvelop, Trade trade) {
this.trade = trade;
NodeAddress peerNodeAddress = ((MailboxMessage) networkEnvelop).getSenderNodeAddress();
if (networkEnvelop instanceof DepositTxPublishedMessage)
handle((DepositTxPublishedMessage) networkEnvelop, peerNodeAddress);
else if (networkEnvelop instanceof CounterCurrencyTransferStartedMessage)
handle((CounterCurrencyTransferStartedMessage) networkEnvelop, peerNodeAddress);
else
log.error("We received an unhandled MailboxMessage" + networkEnvelop.toString());
}
use of bisq.network.p2p.MailboxMessage in project bisq-core by bisq-network.
the class SellerAsTakerProtocol method doApplyMailboxMessage.
// /////////////////////////////////////////////////////////////////////////////////////////
// Mailbox
// /////////////////////////////////////////////////////////////////////////////////////////
@Override
public void doApplyMailboxMessage(NetworkEnvelope networkEnvelop, Trade trade) {
this.trade = trade;
if (networkEnvelop instanceof MailboxMessage) {
NodeAddress peerNodeAddress = ((MailboxMessage) networkEnvelop).getSenderNodeAddress();
if (networkEnvelop instanceof PublishDepositTxRequest)
handle((PublishDepositTxRequest) networkEnvelop, peerNodeAddress);
else if (networkEnvelop instanceof CounterCurrencyTransferStartedMessage)
handle((CounterCurrencyTransferStartedMessage) networkEnvelop, peerNodeAddress);
else
log.error("We received an unhandled MailboxMessage" + networkEnvelop.toString());
}
}
use of bisq.network.p2p.MailboxMessage in project bisq-core by bisq-network.
the class BuyerAsMakerProtocol method doApplyMailboxMessage.
// /////////////////////////////////////////////////////////////////////////////////////////
// Mailbox
// /////////////////////////////////////////////////////////////////////////////////////////
@Override
public void doApplyMailboxMessage(NetworkEnvelope networkEnvelop, Trade trade) {
this.trade = trade;
if (networkEnvelop instanceof MailboxMessage) {
MailboxMessage mailboxMessage = (MailboxMessage) networkEnvelop;
NodeAddress peerNodeAddress = mailboxMessage.getSenderNodeAddress();
if (networkEnvelop instanceof DepositTxPublishedMessage)
handle((DepositTxPublishedMessage) networkEnvelop, peerNodeAddress);
else if (networkEnvelop instanceof PayoutTxPublishedMessage)
handle((PayoutTxPublishedMessage) networkEnvelop, peerNodeAddress);
else
log.error("We received an unhandled MailboxMessage" + networkEnvelop.toString());
}
}
use of bisq.network.p2p.MailboxMessage in project bisq-core by bisq-network.
the class BuyerAsTakerProtocol method doApplyMailboxMessage.
// /////////////////////////////////////////////////////////////////////////////////////////
// Mailbox
// /////////////////////////////////////////////////////////////////////////////////////////
@Override
public void doApplyMailboxMessage(NetworkEnvelope networkEnvelop, Trade trade) {
this.trade = trade;
final NodeAddress senderNodeAddress = ((MailboxMessage) networkEnvelop).getSenderNodeAddress();
if (networkEnvelop instanceof PublishDepositTxRequest)
handle((PublishDepositTxRequest) networkEnvelop, senderNodeAddress);
else if (networkEnvelop instanceof PayoutTxPublishedMessage) {
handle((PayoutTxPublishedMessage) networkEnvelop, senderNodeAddress);
} else
log.error("We received an unhandled MailboxMessage" + networkEnvelop.toString());
}
Aggregations