@Test public void testActiveLeaderIsAlwaysAllowed() { testIsCallAllowed( GrpcLeaderServerInterceptor.clusterMembershipAllowed(() -> true), newServerCall(getMethod(ClusterMembershipServiceGrpc.getServiceDescriptor(), "GetMembers")) ); testIsCallAllowed( GrpcLeaderServerInterceptor.clusterMembershipAllowed(() -> true), newServerCall(getMethod(SampleServiceGrpc.getServiceDescriptor(), "GetOneValue")) ); }
public static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus) { return new GrpcLeaderServerInterceptor(leaderActivationStatus, Collections.singletonList(ClusterMembershipServiceGrpc.getServiceDescriptor())); }
GrpcLeaderServerInterceptor implements ServerInterceptor { public static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus) { return new GrpcLeaderServerInterceptor(leaderActivationStatus, Collections.singletonList(ClusterMembershipServiceGrpc.getServiceDescriptor())); } }
GrpcLeaderServerInterceptor implements ServerInterceptor { public static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus) { return new GrpcLeaderServerInterceptor(leaderActivationStatus, Collections.singletonList(ClusterMembershipServiceGrpc.getServiceDescriptor())); } GrpcLeaderServerInterceptor(LeaderActivationStatus leaderActivationStatus,
                                       List<ServiceDescriptor> notProtectedServices); }
GrpcLeaderServerInterceptor implements ServerInterceptor { public static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus) { return new GrpcLeaderServerInterceptor(leaderActivationStatus, Collections.singletonList(ClusterMembershipServiceGrpc.getServiceDescriptor())); } GrpcLeaderServerInterceptor(LeaderActivationStatus leaderActivationStatus,
                                       List<ServiceDescriptor> notProtectedServices); @Override ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next); static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus); }
GrpcLeaderServerInterceptor implements ServerInterceptor { public static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus) { return new GrpcLeaderServerInterceptor(leaderActivationStatus, Collections.singletonList(ClusterMembershipServiceGrpc.getServiceDescriptor())); } GrpcLeaderServerInterceptor(LeaderActivationStatus leaderActivationStatus,
                                       List<ServiceDescriptor> notProtectedServices); @Override ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next); static GrpcLeaderServerInterceptor clusterMembershipAllowed(LeaderActivationStatus leaderActivationStatus);  }