View Javadoc
1 /* 2 * AspectCfg.java 3 * Created on August 16, 2003 4 * 5 * The Blues Framework - A lightweight application framework 6 * Copyright (C) 2003 Lonnie Pryor 7 * http://blues.lonniepryor.com 8 * 9 * This library is free software; you can redistribute it and/or modify it under the 10 * terms of the GNU Lesser General Public License as published by the Free Software 11 * Foundation; either version 2.1 of the License, or (at your option) any later 12 * version. 13 * 14 * This library is distributed in the hope that it will be useful, but WITHOUT ANY 15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 16 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License along 19 * with this library; if not, write to: 20 * 21 * The Free Software Foundation, Inc. 22 * 59 Temple Place, Suite 330 23 * Boston, MA 02111-1307 USA 24 * 25 */ 26 package com.lonniepryor.blues.cfg; 27 28 import com.lonniepryor.blues.aop.After; 29 import com.lonniepryor.blues.aop.AfterReturning; 30 import com.lonniepryor.blues.aop.AfterThrowing; 31 import com.lonniepryor.blues.aop.Around; 32 import com.lonniepryor.blues.aop.Before; 33 import com.lonniepryor.blues.aop.Pointcut; 34 import com.lonniepryor.blues.util.Types; 35 36 /*** 37 * Defines the requirements for a Blues advice configuration. 38 * 39 * @author Lonnie Pryor 40 * @version $Revision: 1.1 $ 41 */ 42 public interface AdviceCfg { 43 /*** A specification satisfied by JavaBeans that implement an advice interface. */ 44 Types validAdviceTypes = Types.javaBeans().and( 45 Types.assignableTo(Before.class).or(Types.assignableTo(Around.class)) 46 .or(Types.assignableTo(AfterReturning.class)) 47 .or(Types.assignableTo(AfterThrowing.class)).or( 48 Types.assignableTo(After.class))); 49 50 /*** 51 * Return the type used to implement the advice. 52 * 53 * @return The type used to implement the advice. 54 */ 55 Class getAdviceType (); 56 57 /*** 58 * Returns the specification used to evaluate join points for this advice. 59 * 60 * @return The specification used to evaluate join points for this advice. 61 */ 62 Pointcut getPointcutToAdvise (); 63 64 /*** 65 * Configures an instance of the advice type. 66 * 67 * @param adviceInstance The instance of the advice type to coinfigure. 68 * @param serviceDirectory The directory to look up refrenced services in. 69 */ 70 void configure (Object adviceInstance, Directory serviceDirectory); 71 }

This page was automatically generated by Maven