![JAR search and dependency download from the Maven repository](/logo.png)
org.xins.server.Interceptor Maven / Gradle / Ivy
package org.xins.server;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.xins.common.manageable.Manageable;
/**
* Intercepter are similar in concept to Servlet filters except for the following points:
*
* - More anchor points: before the calling convention, before the function request,
* after the function request and after the calling convention.
*
- They are manageable, bootstrap properties, runtime properties, runtime changes.
*
- They could be added and removed at runtime
*
*
* Example of uses: Statistics, transaction logging, load balancing and fail over.
*
* @author Anthony Goubard
*/
public class Interceptor extends Manageable {
public boolean beforeCallingConvention(HttpServletRequest httpRequest) {
return true;
}
public boolean beforeFunctionCall(HttpServletRequest httpRequest, FunctionRequest functionRequest) {
return true;
}
public boolean afterFunctionCall(FunctionResult xinsResult, HttpServletResponse httpResponse, Map backpack) {
return true;
}
public boolean afterCallingConvention(FunctionResult xinsResult, HttpServletResponse httpResponse, Map backpack) {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy