All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xins.server.Interceptor Maven / Gradle / Ivy

There is a newer version: 3.0
Show newest version
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