001    package org.shiftone.jrat.integration.aop.nanning;
002    
003    
004    import org.codehaus.nanning.Invocation;
005    import org.shiftone.jrat.api.Command;
006    
007    
008    /**
009     * Adaptor that wraps a org.codehaus.nanning.Invocation and implements the
010     * org.aopalliance.intercept.MethodInvocation interface.
011     *
012     * @author jeff@shiftone.org (Jeff Drost)
013     */
014    public class NanningInvocationCommand implements Command {
015    
016        private final Invocation invocation;
017    
018        public NanningInvocationCommand(Invocation invocation) {
019            this.invocation = invocation;
020        }
021    
022    
023        public Object execute() throws Throwable {
024            return invocation.invokeNext();
025        }
026    }