Class JKLogCrossCuttingService
java.lang.Object
com.jk.services.server.JKAbstractRestController
com.jk.services.crosscutting.logging.JKLogCrossCuttingService
This class represents a REST web service end-point for logging in the
 cross-cutting application.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Field Summary
Fields inherited from class com.jk.services.server.JKAbstractRestController
logger - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseThis method is an end-point to add a log entry.protected voidThis method caches logs for a specific remote application.jakarta.ws.rs.core.ResponseThis method is an end-point to retrieve logs for a specific application.jakarta.ws.rs.core.ResponsegetLogsCount(String appName, boolean resetCounter) This method is an end-point to retrieve the count of logs for a specific application.Methods inherited from class com.jk.services.server.JKAbstractRestController
accepted, badRequest, forbidden, getHeader, getRemoteIp, getRemoteRole, getRemoteUser, getTenantId, interalServerError, notFound, ok, status, unauthorized 
- 
Constructor Details
- 
JKLogCrossCuttingService
public JKLogCrossCuttingService() 
 - 
 - 
Method Details
- 
add
This method is an end-point to add a log entry.- Parameters:
 model- Specifies theJKLogmodel representing the log entry to be added.- Returns:
 - the response indicating the success of the log addition.
 
 - 
getLogsCount
@GET @Path("/logs/count/{app-name}/{reset-counter}") public jakarta.ws.rs.core.Response getLogsCount(@PathParam("app-name") String appName, @PathParam("reset-counter") boolean resetCounter) This method is an end-point to retrieve the count of logs for a specific application.- Parameters:
 appName- Specifies the name of the application for which logs are counted.resetCounter- Indicates whether to reset the log counter after retrieval or not.- Returns:
 - the response containing the count of logs for the specified application.
 
 - 
getLogs
@GET @Path("/logs/{app-name}/{reset-counter}") public jakarta.ws.rs.core.Response getLogs(@PathParam("app-name") String appName, @PathParam("reset-counter") boolean resetCounter) This method is an end-point to retrieve logs for a specific application.- Parameters:
 appName- Specifies the name of the application for which logs are counted.resetCounter- Indicates whether to reset the log counter after retrieval or not.- Returns:
 - the response containing the list of logs for the specified application.
 
 - 
cacheLog
This method caches logs for a specific remote application.- Parameters:
 remoteAppName- Specifies the name of the remote application.model- Specifies theJKLogmodel representing the log entry to be cached.
 
 -