PaymentChannelClientConnection$2.smali

.class Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;
.super Ljava/lang/Object;
.source "PaymentChannelClientConnection.java"

# interfaces
.implements Lorg/bitcoinj/net/ProtobufConnection$Listener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;-><init>(Ljava/net/InetSocketAddress;ILorg/bitcoinj/wallet/Wallet;Lorg/bitcoinj/core/ECKey;Lorg/bitcoinj/core/Coin;Ljava/lang/String;JLorg/spongycastle/crypto/params/KeyParameter;Lorg/bitcoinj/protocols/channels/PaymentChannelClient$VersionSelector;)V
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lorg/bitcoinj/net/ProtobufConnection$Listener",
        "<",
        "Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;


# direct methods
.method constructor <init>(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)V
    .registers 2

    .prologue
    .line 195
    iput-object p1, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public connectionClosed(Lorg/bitcoinj/net/ProtobufConnection;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/bitcoinj/net/ProtobufConnection",
            "<",
            "Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 213
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->channelClient:Lorg/bitcoinj/protocols/channels/PaymentChannelClient;
    invoke-static {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->access$200(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)Lorg/bitcoinj/protocols/channels/PaymentChannelClient;

    move-result-object v0

    invoke-virtual {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClient;->connectionClosed()V

    .line 214
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->channelOpenFuture:Lcom/google/common/util/concurrent/ao;
    invoke-static {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->access$100(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)Lcom/google/common/util/concurrent/ao;

    move-result-object v0

    new-instance v1, Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException;

    const-string v2, "The TCP socket died"

    sget-object v3, Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;->CONNECTION_CLOSED:Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;

    invoke-direct {v1, v2, v3}, Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException;-><init>(Ljava/lang/String;Lorg/bitcoinj/protocols/channels/PaymentChannelCloseException$CloseReason;)V

    invoke-virtual {v0, v1}, Lcom/google/common/util/concurrent/ao;->setException(Ljava/lang/Throwable;)Z

    .line 216
    return-void
.end method

.method public connectionOpen(Lorg/bitcoinj/net/ProtobufConnection;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/bitcoinj/net/ProtobufConnection",
            "<",
            "Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 208
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->channelClient:Lorg/bitcoinj/protocols/channels/PaymentChannelClient;
    invoke-static {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->access$200(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)Lorg/bitcoinj/protocols/channels/PaymentChannelClient;

    move-result-object v0

    invoke-virtual {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClient;->connectionOpen()V

    .line 209
    return-void
.end method

.method public bridge synthetic messageReceived(Lorg/bitcoinj/net/ProtobufConnection;Lcom/google/protobuf/MessageLite;)V
    .registers 3

    .prologue
    .line 195
    check-cast p2, Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;

    invoke-virtual {p0, p1, p2}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->messageReceived(Lorg/bitcoinj/net/ProtobufConnection;Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;)V

    return-void
.end method

.method public messageReceived(Lorg/bitcoinj/net/ProtobufConnection;Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/bitcoinj/net/ProtobufConnection",
            "<",
            "Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;",
            ">;",
            "Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;",
            ")V"
        }
    .end annotation

    .prologue
    .line 199
    :try_start_0
    iget-object v0, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->channelClient:Lorg/bitcoinj/protocols/channels/PaymentChannelClient;
    invoke-static {v0}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->access$200(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)Lorg/bitcoinj/protocols/channels/PaymentChannelClient;

    move-result-object v0

    invoke-virtual {v0, p2}, Lorg/bitcoinj/protocols/channels/PaymentChannelClient;->receiveMessage(Lorg/bitcoin/paymentchannel/Protos$TwoWayChannelMessage;)V
    :try_end_9
    .catch Lorg/bitcoinj/core/InsufficientMoneyException; {:try_start_0 .. :try_end_9} :catch_a

    .line 204
    :goto_9
    return-void

    .line 200
    :catch_a
    move-exception v0

    .line 202
    iget-object v1, p0, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection$2;->this$0:Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;

    # getter for: Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->channelOpenFuture:Lcom/google/common/util/concurrent/ao;
    invoke-static {v1}, Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;->access$100(Lorg/bitcoinj/protocols/channels/PaymentChannelClientConnection;)Lcom/google/common/util/concurrent/ao;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/google/common/util/concurrent/ao;->setException(Ljava/lang/Throwable;)Z

    goto :goto_9
.end method