Class GrpcChannelServiceImpl
java.lang.Object
com.atlassian.bamboo.grpc.authentication.GrpcChannelServiceImpl
- All Implemented Interfaces:
GrpcChannelService
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcChannelServiceImpl(ClusterNodeProperties clusterNodeProperties, BambooHomeLocator bambooHomeLocator, BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService) -
Method Summary
Modifier and TypeMethodDescription@NotNull io.grpc.ManagedChannelcreateClientChannel(String hostName, int port, Executor executor) Create client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLEDsetting.@NotNull io.grpc.ServerCredentialsGenerate ServerCredentials to be used with gRPC server when authentication is enabled.
-
Constructor Details
-
GrpcChannelServiceImpl
@Inject public GrpcChannelServiceImpl(ClusterNodeProperties clusterNodeProperties, BambooHomeLocator bambooHomeLocator, BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService)
-
-
Method Details
-
getServerCredentials
@NotNull public @NotNull io.grpc.ServerCredentials getServerCredentials()Description copied from interface:GrpcChannelServiceGenerate ServerCredentials to be used with gRPC server when authentication is enabled.- Specified by:
getServerCredentialsin interfaceGrpcChannelService- Returns:
- ServerCredentials with mutual TLS configured
-
createClientChannel
@NotNull public @NotNull io.grpc.ManagedChannel createClientChannel(String hostName, int port, Executor executor) Description copied from interface:GrpcChannelServiceCreate client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLEDsetting.- Specified by:
createClientChannelin interfaceGrpcChannelService- Parameters:
hostName- hostname to which the client will connect toport- port to which the client will connect toexecutor- executor used with this client- Returns:
- managed channel
-