Class GrpcChannelServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.grpc.authentication.GrpcChannelServiceImpl
-
- All Implemented Interfaces:
GrpcChannelService
public class GrpcChannelServiceImpl extends Object implements GrpcChannelService
-
-
Constructor Summary
Constructors Constructor Description GrpcChannelServiceImpl(ClusterNodeProperties clusterNodeProperties, BambooHomeLocator bambooHomeLocator, BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull io.grpc.ManagedChannel
createClientChannel(String hostName, int port, Executor executor)
Create client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLED
setting.@NotNull io.grpc.ServerCredentials
getServerCredentials()
Generate ServerCredentials to be used with gRPC server when authentication is enabled.
-
-
-
Constructor Detail
-
GrpcChannelServiceImpl
@Inject public GrpcChannelServiceImpl(ClusterNodeProperties clusterNodeProperties, BambooHomeLocator bambooHomeLocator, BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService)
-
-
Method Detail
-
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
-
-