-
- All Implemented Interfaces:
-
io.grpc.binder.internal.LeakSafeOneWayBinder.TransactionHandler,io.grpc.internal.InternalServer
@ThreadSafe() public final class BinderServer implements InternalServer, LeakSafeOneWayBinder.TransactionHandler
A gRPC InternalServer which accepts connections via a host AndroidService.
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 Summary
Constructors Constructor Description BinderServer(AndroidComponentAddress listenAddress, ObjectPool<ScheduledExecutorService> executorServicePool, List<out ServerStreamTracer.Factory> streamTracerFactories, BinderTransportSecurity.ServerPolicyChecker serverPolicyChecker, InboundParcelablePolicy inboundParcelablePolicy, BinderTransportSecurity.ShutdownListener transportSecurityShutdownListener)
-
Method Summary
Modifier and Type Method Description IBindergetHostBinder()Return the binder we're listening on. synchronized voidstart(ServerListener serverListener)SocketAddressgetListenSocketAddress()List<out SocketAddress>getListenSocketAddresses()InternalInstrumented<InternalChannelz.SocketStats>getListenSocketStats()List<InternalInstrumented<InternalChannelz.SocketStats>>getListenSocketStatsList()synchronized voidshutdown()StringtoString()synchronized booleanhandleTransaction(int code, Parcel parcel)-
Methods inherited from class io.grpc.internal.InternalServer
getListenSocketAddress, getListenSocketAddresses, getListenSocketStats, getListenSocketStatsList, shutdown, start -
Methods inherited from class io.grpc.binder.internal.LeakSafeOneWayBinder.TransactionHandler
handleTransaction -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BinderServer
BinderServer(AndroidComponentAddress listenAddress, ObjectPool<ScheduledExecutorService> executorServicePool, List<out ServerStreamTracer.Factory> streamTracerFactories, BinderTransportSecurity.ServerPolicyChecker serverPolicyChecker, InboundParcelablePolicy inboundParcelablePolicy, BinderTransportSecurity.ShutdownListener transportSecurityShutdownListener)
- Parameters:
transportSecurityShutdownListener- represents resources that should be cleaned up oncethe server shuts down.
-
-
Method Detail
-
getHostBinder
IBinder getHostBinder()
Return the binder we're listening on.
-
start
synchronized void start(ServerListener serverListener)
-
getListenSocketAddress
SocketAddress getListenSocketAddress()
-
getListenSocketAddresses
List<out SocketAddress> getListenSocketAddresses()
-
getListenSocketStats
InternalInstrumented<InternalChannelz.SocketStats> getListenSocketStats()
-
getListenSocketStatsList
@Nullable() List<InternalInstrumented<InternalChannelz.SocketStats>> getListenSocketStatsList()
-
shutdown
synchronized void shutdown()
-
handleTransaction
synchronized boolean handleTransaction(int code, Parcel parcel)
-
-
-
-