Class GrpcChannelServiceImpl
java.lang.Object
com.atlassian.bamboo.grpc.authentication.GrpcChannelServiceImpl
- All Implemented Interfaces:
GrpcChannelService
-
Constructor Summary
ConstructorDescriptionGrpcChannelServiceImpl
(ClusterNodeProperties clusterNodeProperties, BambooHomeLocator bambooHomeLocator, BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService) -
Method Summary
Modifier and TypeMethodDescription@NotNull io.grpc.ManagedChannel
createClientChannel
(String hostName, int port, Executor executor) Create client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLED
setting.@NotNull io.grpc.ServerCredentials
Generate 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:GrpcChannelService
Generate ServerCredentials to be used with gRPC server when authentication is enabled.- Specified by:
getServerCredentials
in 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:GrpcChannelService
Create client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLED
setting.- Specified by:
createClientChannel
in 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
-