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.ManagedChannelcreateClientChannel(String hostName, int port, Executor executor)Create client channel respectingSystemProperty.BAMBOO_GRPC_AUTHENTICATION_ENABLEDsetting.@NotNull io.grpc.ServerCredentialsgetServerCredentials()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: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
-
-