ClientCalls$CallToStreamObserverAdapter.smali
.class Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;
.super Lio/grpc/stub/ClientCallStreamObserver;
.source "ClientCalls.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/grpc/stub/ClientCalls;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0xa
name = "CallToStreamObserverAdapter"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lio/grpc/stub/ClientCallStreamObserver<",
"TT;>;"
}
.end annotation
# instance fields
.field private autoFlowControlEnabled:Z
.field private final call:Lio/grpc/ClientCall;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/grpc/ClientCall<",
"TT;*>;"
}
.end annotation
.end field
.field private frozen:Z
.field private onReadyHandler:Ljava/lang/Runnable;
# direct methods
.method public constructor <init>(Lio/grpc/ClientCall;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/grpc/ClientCall<",
"TT;*>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lio/grpc/stub/ClientCallStreamObserver;-><init>()V
const/4 v0, 0x1
.line 2
iput-boolean v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->autoFlowControlEnabled:Z
.line 3
iput-object p1, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
return-void
.end method
.method static synthetic access$300(Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;)V
.registers 1
.line 1
invoke-direct {p0}, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->freeze()V
return-void
.end method
.method static synthetic access$400(Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;)Z
.registers 1
.line 1
iget-boolean p0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->autoFlowControlEnabled:Z
return p0
.end method
.method static synthetic access$500(Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;)Ljava/lang/Runnable;
.registers 1
.line 1
iget-object p0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->onReadyHandler:Ljava/lang/Runnable;
return-object p0
.end method
.method private freeze()V
.registers 2
const/4 v0, 0x1
.line 1
iput-boolean v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->frozen:Z
return-void
.end method
# virtual methods
.method public disableAutoInboundFlowControl()V
.registers 3
.line 1
iget-boolean v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->frozen:Z
if-nez v0, :cond_8
const/4 v0, 0x0
.line 2
iput-boolean v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->autoFlowControlEnabled:Z
return-void
.line 3
:cond_8
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Cannot disable auto flow control call started"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public isReady()Z
.registers 2
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
invoke-virtual {v0}, Lio/grpc/ClientCall;->isReady()Z
move-result v0
return v0
.end method
.method public onCompleted()V
.registers 2
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
invoke-virtual {v0}, Lio/grpc/ClientCall;->halfClose()V
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 4
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
const-string v1, "Cancelled by client with StreamObserver.onError()"
invoke-virtual {v0, v1, p1}, Lio/grpc/ClientCall;->cancel(Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
invoke-virtual {v0, p1}, Lio/grpc/ClientCall;->sendMessage(Ljava/lang/Object;)V
return-void
.end method
.method public request(I)V
.registers 3
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
invoke-virtual {v0, p1}, Lio/grpc/ClientCall;->request(I)V
return-void
.end method
.method public setMessageCompression(Z)V
.registers 3
.line 1
iget-object v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->call:Lio/grpc/ClientCall;
invoke-virtual {v0, p1}, Lio/grpc/ClientCall;->setMessageCompression(Z)V
return-void
.end method
.method public setOnReadyHandler(Ljava/lang/Runnable;)V
.registers 3
.line 1
iget-boolean v0, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->frozen:Z
if-nez v0, :cond_7
.line 2
iput-object p1, p0, Lio/grpc/stub/ClientCalls$CallToStreamObserverAdapter;->onReadyHandler:Ljava/lang/Runnable;
return-void
.line 3
:cond_7
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Cannot alter onReadyHandler after call started"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method