@ POST @ Path ( "{taskName}" ) public Response processTask ( @ PathParam ( "taskName" ) String taskName ) { checkNotNull ( requestParamsProvider . get ( ) ) ; checkNotNull ( taskName ) ; LOGGER . info ( "Processing task for {}..." , taskName ) ; for ( AdminTask adminTask : adminTasks ) { final Object body = adminTask . processTask ( taskName , requestParamsProvider . get ( ) ) ; LOGGER . info ( "Processed tasks for {}: {}" , taskName , body ) ; } return Response . ok ( ) . build ( ) ; }
Process an admin task . The admin task will be processed on the requesting thread .