public final class AlfrescoGrpcChannelPoolextends io.grpc.Channel
implements AutoCloseable
Owns a fixed set of reusable gRPC channels to one Alfresco endpoint.
Each new RPC selects a channel in round-robin order. A streaming RPC keeps that channel for its entire
lifetime; individual messages are never routed separately. Selection is thread-safe and forwards call options
unchanged. The pool bounds channel count, not concurrent calls: each channel still multiplexes HTTP/2 streams.
Authentication remains the responsibility of the clients' shared TicketProvider.
Use this channel for ContentServiceClient and primary() for metadata and authentication.
The pool owns every underlying channel. Close it once after stopping callers; service clients and callers
borrowing the primary channel must not close channels individually.
Selects an underlying channel once for the complete RPC, preserving all configured call options.
Specified by:
newCall in class io.grpc.Channel
Type Parameters:
RequestT - request message type
ResponseT - response message type
Parameters:
method - RPC descriptor
callOptions - credentials, compression, deadlines and other caller options
Returns:
the call from the selected channel
Throws:
io.grpc.StatusRuntimeException - with UNAVAILABLE if the pool has been closed
close
publicvoidclose()
Stops admitting calls, allows at most five seconds in total for active calls, then cancels remaining work.
This operation is idempotent. An interrupted wait forces shutdown and restores the interrupt flag.