mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-05-17 14:00:35 -04:00
Rename RequiresOwnerIsOnlineMessage to RequiresOwnerIsOnlinePayload
This commit is contained in:
parent
2a72912005
commit
3f54cb233e
4 changed files with 7 additions and 6 deletions
|
@ -25,7 +25,7 @@ import io.bitsquare.common.handlers.ResultHandler;
|
||||||
import io.bitsquare.common.util.JsonExclude;
|
import io.bitsquare.common.util.JsonExclude;
|
||||||
import io.bitsquare.locale.Country;
|
import io.bitsquare.locale.Country;
|
||||||
import io.bitsquare.p2p.NodeAddress;
|
import io.bitsquare.p2p.NodeAddress;
|
||||||
import io.bitsquare.p2p.storage.messages.RequiresOwnerIsOnlineMessage;
|
import io.bitsquare.p2p.storage.messages.RequiresOwnerIsOnlinePayload;
|
||||||
import io.bitsquare.p2p.storage.messages.StorageMessage;
|
import io.bitsquare.p2p.storage.messages.StorageMessage;
|
||||||
import io.bitsquare.payment.PaymentMethod;
|
import io.bitsquare.payment.PaymentMethod;
|
||||||
import io.bitsquare.trade.protocol.availability.OfferAvailabilityModel;
|
import io.bitsquare.trade.protocol.availability.OfferAvailabilityModel;
|
||||||
|
@ -47,7 +47,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
public final class Offer implements StorageMessage, RequiresOwnerIsOnlineMessage {
|
public final class Offer implements StorageMessage, RequiresOwnerIsOnlinePayload {
|
||||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||||
@JsonExclude
|
@JsonExclude
|
||||||
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
||||||
|
|
|
@ -22,6 +22,7 @@ import io.bitsquare.p2p.Message;
|
||||||
|
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
|
|
||||||
|
// TODO is that sent over wire????
|
||||||
public final class DecryptedMsgWithPubKey implements DirectMessage {
|
public final class DecryptedMsgWithPubKey implements DirectMessage {
|
||||||
// That object is sent over the wire, so we need to take care of version compatibility.
|
// That object is sent over the wire, so we need to take care of version compatibility.
|
||||||
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
private static final long serialVersionUID = Version.P2P_NETWORK_VERSION;
|
||||||
|
|
|
@ -137,9 +137,9 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
||||||
map.values().stream()
|
map.values().stream()
|
||||||
.forEach(protectedData -> {
|
.forEach(protectedData -> {
|
||||||
ExpirableMessage expirableMessage = protectedData.expirableMessage;
|
ExpirableMessage expirableMessage = protectedData.expirableMessage;
|
||||||
if (expirableMessage instanceof RequiresOwnerIsOnlineMessage) {
|
if (expirableMessage instanceof RequiresOwnerIsOnlinePayload) {
|
||||||
RequiresOwnerIsOnlineMessage requiresOwnerIsOnlineMessage = (RequiresOwnerIsOnlineMessage) expirableMessage;
|
RequiresOwnerIsOnlinePayload requiresOwnerIsOnlinePayload = (RequiresOwnerIsOnlinePayload) expirableMessage;
|
||||||
NodeAddress ownerNodeAddress = requiresOwnerIsOnlineMessage.getOwnerNodeAddress();
|
NodeAddress ownerNodeAddress = requiresOwnerIsOnlinePayload.getOwnerNodeAddress();
|
||||||
if (ownerNodeAddress.equals(connection.getPeersNodeAddressOptional().get())) {
|
if (ownerNodeAddress.equals(connection.getPeersNodeAddressOptional().get())) {
|
||||||
// We have a RequiresLiveOwnerData data object with the node address of the
|
// We have a RequiresLiveOwnerData data object with the node address of the
|
||||||
// disconnected peer. We remove that data from our map.
|
// disconnected peer. We remove that data from our map.
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.io.Serializable;
|
||||||
* This is used for the offers to avoid dead offers in case the offerer is in sleep/hibernate mode or the app has
|
* This is used for the offers to avoid dead offers in case the offerer is in sleep/hibernate mode or the app has
|
||||||
* terminated without sending the remove message (e.g. in case of a crash).
|
* terminated without sending the remove message (e.g. in case of a crash).
|
||||||
*/
|
*/
|
||||||
public interface RequiresOwnerIsOnlineMessage extends Serializable {
|
public interface RequiresOwnerIsOnlinePayload extends Serializable {
|
||||||
/**
|
/**
|
||||||
* @return NodeAddress of the data owner
|
* @return NodeAddress of the data owner
|
||||||
*/
|
*/
|
Loading…
Add table
Add a link
Reference in a new issue