-
- All Implemented Interfaces:
-
android.os.IBinder.DeathRecipient,io.grpc.InternalInstrumented,io.grpc.InternalWithLogId,io.grpc.binder.internal.Bindable.Observer,io.grpc.binder.internal.LeakSafeOneWayBinder.TransactionHandler,io.grpc.internal.ClientTransport,io.grpc.internal.ConnectionClientTransport,io.grpc.internal.ManagedClientTransport
@ThreadSafe()@Internal() public final class BinderTransport.BinderClientTransport extends BinderTransport implements ConnectionClientTransport, Bindable.Observer
Concrete client-side transport implementation.
-
-
Constructor Summary
Constructors Constructor Description BinderTransport.BinderClientTransport(Context sourceContext, BinderChannelCredentials channelCredentials, AndroidComponentAddress targetAddress, UserHandle targetUserHandle, BindServiceFlags bindServiceFlags, Executor mainThreadExecutor, ObjectPool<ScheduledExecutorService> executorServicePool, ObjectPool<out Executor> offloadExecutorPool, SecurityPolicy securityPolicy, InboundParcelablePolicy inboundParcelablePolicy, Attributes eagAttrs)
-
Method Summary
Modifier and Type Method Description synchronized voidonBound(IBinder binder)We're now bound to the service. synchronized voidonUnbound(Status reason)We've disconnected from (or failed to bind to) the service. synchronized Runnablestart(ManagedClientTransport.Listener clientTransportListener)synchronized ClientStreamnewStream(MethodDescriptor<out Object, out Object> method, Metadata headers, CallOptions callOptions, Array<ClientStreamTracer> tracers)voidping(ClientTransport.PingCallback callback, Executor executor)synchronized voidshutdown(Status reason)synchronized voidshutdownNow(Status reason)voidnotifyShutdown(Status status)voidnotifyTerminated()-
Methods inherited from class io.grpc.binder.internal.BinderTransport
binderDied, getAttributes, getLogId, getScheduledExecutorService, getStats, handleTransaction -
Methods inherited from class io.grpc.binder.internal.LeakSafeOneWayBinder.TransactionHandler
handleTransaction -
Methods inherited from class android.os.IBinder.DeathRecipient
binderDied -
Methods inherited from class io.grpc.internal.ConnectionClientTransport
getAttributes -
Methods inherited from class io.grpc.internal.ManagedClientTransport
shutdown, shutdownNow, start -
Methods inherited from class io.grpc.internal.ClientTransport
newStream, ping -
Methods inherited from class io.grpc.InternalInstrumented
getStats -
Methods inherited from class io.grpc.InternalWithLogId
getLogId -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BinderTransport.BinderClientTransport
BinderTransport.BinderClientTransport(Context sourceContext, BinderChannelCredentials channelCredentials, AndroidComponentAddress targetAddress, UserHandle targetUserHandle, BindServiceFlags bindServiceFlags, Executor mainThreadExecutor, ObjectPool<ScheduledExecutorService> executorServicePool, ObjectPool<out Executor> offloadExecutorPool, SecurityPolicy securityPolicy, InboundParcelablePolicy inboundParcelablePolicy, Attributes eagAttrs)
-
-
Method Detail
-
onBound
synchronized void onBound(IBinder binder)
We're now bound to the service. Only called once, and only if the binding succeeded.
-
onUnbound
synchronized void onUnbound(Status reason)
We've disconnected from (or failed to bind to) the service. This will only be called once,after which no other calls will be made (but see note on threading above).
- Parameters:
reason- why the connection failed or couldn't be established in the first place
-
start
@CheckReturnValue() synchronized Runnable start(ManagedClientTransport.Listener clientTransportListener)
-
newStream
synchronized ClientStream newStream(MethodDescriptor<out Object, out Object> method, Metadata headers, CallOptions callOptions, Array<ClientStreamTracer> tracers)
-
shutdown
synchronized void shutdown(Status reason)
-
shutdownNow
synchronized void shutdownNow(Status reason)
-
notifyShutdown
void notifyShutdown(Status status)
-
notifyTerminated
void notifyTerminated()
-
-
-
-