@ThreadSafe public final class BinderServer extends java.lang.Object implements io.grpc.internal.InternalServer, LeakSafeOneWayBinder.TransactionHandler
Multiple incoming connections transports may be active at a time. IMPORTANT: This implementation must comply with this published wire format. https://github.com/grpc/proposal/blob/master/L73-java-binderchannel/wireformat.md
| Constructor and Description |
|---|
BinderServer(AndroidComponentAddress listenAddress,
io.grpc.internal.ObjectPool<java.util.concurrent.ScheduledExecutorService> executorServicePool,
java.util.List<? extends io.grpc.ServerStreamTracer.Factory> streamTracerFactories,
ServerSecurityPolicy serverSecurityPolicy,
InboundParcelablePolicy inboundParcelablePolicy) |
| Modifier and Type | Method and Description |
|---|---|
android.os.IBinder |
getHostBinder()
Return the binder we're listening on.
|
java.net.SocketAddress |
getListenSocketAddress() |
java.util.List<? extends java.net.SocketAddress> |
getListenSocketAddresses() |
io.grpc.InternalInstrumented<io.grpc.InternalChannelz.SocketStats> |
getListenSocketStats() |
java.util.List<io.grpc.InternalInstrumented<io.grpc.InternalChannelz.SocketStats>> |
getListenSocketStatsList() |
boolean |
handleTransaction(int code,
android.os.Parcel parcel) |
void |
shutdown() |
void |
start(io.grpc.internal.ServerListener serverListener) |
java.lang.String |
toString() |
public BinderServer(AndroidComponentAddress listenAddress, io.grpc.internal.ObjectPool<java.util.concurrent.ScheduledExecutorService> executorServicePool, java.util.List<? extends io.grpc.ServerStreamTracer.Factory> streamTracerFactories, ServerSecurityPolicy serverSecurityPolicy, InboundParcelablePolicy inboundParcelablePolicy)
public android.os.IBinder getHostBinder()
public void start(io.grpc.internal.ServerListener serverListener)
throws java.io.IOException
start in interface io.grpc.internal.InternalServerjava.io.IOExceptionpublic java.net.SocketAddress getListenSocketAddress()
getListenSocketAddress in interface io.grpc.internal.InternalServerpublic java.util.List<? extends java.net.SocketAddress> getListenSocketAddresses()
getListenSocketAddresses in interface io.grpc.internal.InternalServerpublic io.grpc.InternalInstrumented<io.grpc.InternalChannelz.SocketStats> getListenSocketStats()
getListenSocketStats in interface io.grpc.internal.InternalServer@Nullable public java.util.List<io.grpc.InternalInstrumented<io.grpc.InternalChannelz.SocketStats>> getListenSocketStatsList()
getListenSocketStatsList in interface io.grpc.internal.InternalServerpublic void shutdown()
shutdown in interface io.grpc.internal.InternalServerpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean handleTransaction(int code,
android.os.Parcel parcel)
handleTransaction in interface LeakSafeOneWayBinder.TransactionHandler