@Override public void alter_sentry_role_add_groups( TAlterSentryRoleAddGroupsRequest request, TAlterSentryRoleAddGroupsResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_add_groups(new TAlterSentryRoleAddGroupsRequest(request), new TAlterSentryRoleAddGroupsResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void alter_sentry_role_delete_groups(TAlterSentryRoleDeleteGroupsRequest request, TAlterSentryRoleDeleteGroupsResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_delete_groups(new TAlterSentryRoleDeleteGroupsRequest(request), new TAlterSentryRoleDeleteGroupsResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void create_sentry_role(TCreateSentryRoleRequest request, TCreateSentryRoleResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.create_sentry_role(new TCreateSentryRoleRequest(request), new TCreateSentryRoleResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void drop_sentry_role(TDropSentryRoleRequest request, TDropSentryRoleResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.drop_sentry_role(new TDropSentryRoleRequest(request), new TDropSentryRoleResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void alter_sentry_role_grant_privilege(TAlterSentryRoleGrantPrivilegeRequest request, TAlterSentryRoleGrantPrivilegeResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_grant_privilege(new TAlterSentryRoleGrantPrivilegeRequest(request), new TAlterSentryRoleGrantPrivilegeResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void alter_sentry_role_revoke_privilege(TAlterSentryRoleRevokePrivilegeRequest request, TAlterSentryRoleRevokePrivilegeResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_revoke_privilege(new TAlterSentryRoleRevokePrivilegeRequest(request), new TAlterSentryRoleRevokePrivilegeResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void alter_sentry_role_add_users(TAlterSentryRoleAddUsersRequest request, TAlterSentryRoleAddUsersResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_add_users(new TAlterSentryRoleAddUsersRequest(request), new TAlterSentryRoleAddUsersResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Override public void alter_sentry_role_delete_users(TAlterSentryRoleDeleteUsersRequest request, TAlterSentryRoleDeleteUsersResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.alter_sentry_role_delete_users(new TAlterSentryRoleDeleteUsersRequest( request), new TAlterSentryRoleDeleteUsersResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } } }
@Test public void testDropSentryRole() throws Exception { TDropSentryRoleRequest request = new TDropSentryRoleRequest(); TDropSentryRoleResponse response = new TDropSentryRoleResponse(); invoker.drop_sentry_role(request, response); Mockito.verify(handler).drop_sentry_role(request, response); }
@Test public void testAlterSentryRoleDeleteGroups() throws Exception { TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest(); TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse(); invoker.alter_sentry_role_delete_groups(request, response); Mockito.verify(handler).alter_sentry_role_delete_groups(request, response); }
@Test public void testAlterSentryRoleAddGroups() throws Exception { TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest(); TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse(); invoker.alter_sentry_role_add_groups(request, response); Mockito.verify(handler).alter_sentry_role_add_groups(request, response); }
@Test public void testCreateSentryRole() throws Exception { TCreateSentryRoleRequest request = new TCreateSentryRoleRequest(); TCreateSentryRoleResponse response = new TCreateSentryRoleResponse(); invoker.create_sentry_role(request, response); Mockito.verify(handler).create_sentry_role(request, response); }