.class Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock; .super Ljava/lang/Object; .source "WebsocketConnection.java" # interfaces .implements Lcom/google/firebase/database/connection/WebsocketConnection$WSClient; .implements Lcom/google/firebase/database/tubesock/WebSocketEventHandler; # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/google/firebase/database/connection/WebsocketConnection; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x1 name = "WSClientTubesock" .end annotation # instance fields .field public final synthetic this$0:Lcom/google/firebase/database/connection/WebsocketConnection; .field private ws:Lcom/google/firebase/database/tubesock/WebSocket; # direct methods .method private constructor (Lcom/google/firebase/database/connection/WebsocketConnection;Lcom/google/firebase/database/tubesock/WebSocket;)V .locals 0 .line 2 iput-object p1, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-direct {p0}, Ljava/lang/Object;->()V .line 3 iput-object p2, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; .line 4 invoke-virtual {p2, p0}, Lcom/google/firebase/database/tubesock/WebSocket;->setEventHandler(Lcom/google/firebase/database/tubesock/WebSocketEventHandler;)V return-void .end method .method public synthetic constructor (Lcom/google/firebase/database/connection/WebsocketConnection;Lcom/google/firebase/database/tubesock/WebSocket;Lcom/google/firebase/database/connection/WebsocketConnection$1;)V .locals 0 .line 1 invoke-direct {p0, p1, p2}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->(Lcom/google/firebase/database/connection/WebsocketConnection;Lcom/google/firebase/database/tubesock/WebSocket;)V return-void .end method .method private shutdown()V .locals 3 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; invoke-virtual {v0}, Lcom/google/firebase/database/tubesock/WebSocket;->close()V .line 2 :try_start_0 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; invoke-virtual {v0}, Lcom/google/firebase/database/tubesock/WebSocket;->blockClose()V :try_end_0 .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v0 .line 3 iget-object v1, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v1}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v1 const-string v2, "Interrupted while shutting down websocket threads" invoke-virtual {v1, v2, v0}, Lcom/google/firebase/database/logging/LogWrapper;->error(Ljava/lang/String;Ljava/lang/Throwable;)V :goto_0 return-void .end method # virtual methods .method public close()V .locals 1 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; invoke-virtual {v0}, Lcom/google/firebase/database/tubesock/WebSocket;->close()V return-void .end method .method public connect()V .locals 4 .line 1 :try_start_0 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; invoke-virtual {v0}, Lcom/google/firebase/database/tubesock/WebSocket;->connect()V :try_end_0 .catch Lcom/google/firebase/database/tubesock/WebSocketException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v0 .line 2 iget-object v1, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v1}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v1 invoke-virtual {v1}, Lcom/google/firebase/database/logging/LogWrapper;->logsDebug()Z move-result v1 if-eqz v1, :cond_0 iget-object v1, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v1}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v1 const/4 v2, 0x0 new-array v2, v2, [Ljava/lang/Object; const-string v3, "Error connecting" invoke-virtual {v1, v3, v0, v2}, Lcom/google/firebase/database/logging/LogWrapper;->debug(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V .line 3 :cond_0 invoke-direct {p0}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->shutdown()V :goto_0 return-void .end method .method public onClose()V .locals 2 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$400(Lcom/google/firebase/database/connection/WebsocketConnection;)Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 new-instance v1, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$3; invoke-direct {v1, p0}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$3;->(Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;)V invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V return-void .end method .method public onError(Lcom/google/firebase/database/tubesock/WebSocketException;)V .locals 2 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$400(Lcom/google/firebase/database/connection/WebsocketConnection;)Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 new-instance v1, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$4; invoke-direct {v1, p0, p1}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$4;->(Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;Lcom/google/firebase/database/tubesock/WebSocketException;)V invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V return-void .end method .method public onLogMessage(Ljava/lang/String;)V .locals 2 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v0 invoke-virtual {v0}, Lcom/google/firebase/database/logging/LogWrapper;->logsDebug()Z move-result v0 if-eqz v0, :cond_0 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v0 const-string v1, "Tubesock: " invoke-static {v1, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p1 const/4 v1, 0x0 new-array v1, v1, [Ljava/lang/Object; invoke-virtual {v0, p1, v1}, Lcom/google/firebase/database/logging/LogWrapper;->debug(Ljava/lang/String;[Ljava/lang/Object;)V :cond_0 return-void .end method .method public onMessage(Lcom/google/firebase/database/tubesock/WebSocketMessage;)V .locals 3 .line 1 invoke-virtual {p1}, Lcom/google/firebase/database/tubesock/WebSocketMessage;->getText()Ljava/lang/String; move-result-object p1 .line 2 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v0 invoke-virtual {v0}, Lcom/google/firebase/database/logging/LogWrapper;->logsDebug()Z move-result v0 if-eqz v0, :cond_0 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$200(Lcom/google/firebase/database/connection/WebsocketConnection;)Lcom/google/firebase/database/logging/LogWrapper; move-result-object v0 const-string v1, "ws message: " invoke-static {v1, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v1 const/4 v2, 0x0 new-array v2, v2, [Ljava/lang/Object; invoke-virtual {v0, v1, v2}, Lcom/google/firebase/database/logging/LogWrapper;->debug(Ljava/lang/String;[Ljava/lang/Object;)V .line 3 :cond_0 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$400(Lcom/google/firebase/database/connection/WebsocketConnection;)Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 new-instance v1, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$2; invoke-direct {v1, p0, p1}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$2;->(Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;Ljava/lang/String;)V invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V return-void .end method .method public onOpen()V .locals 2 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->this$0:Lcom/google/firebase/database/connection/WebsocketConnection; invoke-static {v0}, Lcom/google/firebase/database/connection/WebsocketConnection;->access$400(Lcom/google/firebase/database/connection/WebsocketConnection;)Ljava/util/concurrent/ScheduledExecutorService; move-result-object v0 new-instance v1, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$1; invoke-direct {v1, p0}, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock$1;->(Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;)V invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V return-void .end method .method public send(Ljava/lang/String;)V .locals 1 .line 1 iget-object v0, p0, Lcom/google/firebase/database/connection/WebsocketConnection$WSClientTubesock;->ws:Lcom/google/firebase/database/tubesock/WebSocket; invoke-virtual {v0, p1}, Lcom/google/firebase/database/tubesock/WebSocket;->send(Ljava/lang/String;)V return-void .end method