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

com.dakuupa.interceptor.AroundInterceptor Maven / Gradle / Ivy

Go to download

Provides Struts 2 developers with easy to use framework for building CRUD (Create, read, update, delete) applications using convention over configuration. Includes several utility classes to facilitate quick Struts 2 app development.

The newest version!
package com.dakuupa.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

/**
 * An abstract interceptor that provides simple access to before/after callouts.
 * from OpenSymphony XWork
 */
public abstract class AroundInterceptor implements Interceptor {

    public void destroy() {
    }

    public void init() {
    }

    public String intercept(ActionInvocation invocation) throws Exception {
        String result = null;

        before(invocation);
        result = invocation.invoke();
        after(invocation, result);
        return result;
    }

    protected abstract void after(ActionInvocation dispatcher, String result) throws Exception;

    protected abstract void before(ActionInvocation invocation) throws Exception;

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy