avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hawkes" <jhaw...@adsnm.com>
Subject Re: State of the Aspect
Date Mon, 08 Mar 2004 19:39:51 GMT
It might help if you can come up with a more specific use case.  What does
LoggerAspect actually do?  And what does SecurityAspect actually do?  And
how is it dependent on LoggerAspect?

So in type 3 form,

public class LoggerAspectImpl implements LoggerAspect {
    public LoggerAspectImpl(Logger logger) {
        //whatever...
    }
    //whatever...
}

public class SecurityAspectImpl implements SecurityAspect {
    public SecurityAspectImpl(Logger logger) {
        //whatever...
    }
    //whatever...
}

I'm just trying to understand the issue.  LoggerAspect and SecurityAspect
want to use the same Logger service?  Is this it?


----- Original Message ----- 
From: "Hamilton Verissimo de Oliveira (Engenharia - SPO)"
<hamilton.oliveira@agenciaclick.com.br>
To: "Avalon Developers List" <dev@avalon.apache.org>
Sent: Monday, March 08, 2004 12:33 PM
Subject: Re: State of the Aspect


> > So I'm close to just disallowing any explicit dependencies.
>
> Do you see any possiblity of dependencies that aren't loggers?
>
> So, instead of
>
>   LoggerAspect loggerAspect = new LoggerAspectImpl( something );
>   kernel.addAspect( loggerAspect );
>
>   SecurityAspect secAspect = new SecurityAspectImpl( loggerAspect );
>   kernel.addAspect( secAspect );
>
> We can have:
>
>   LoggerAspect loggerAspect = new LoggerAspectImpl( something );
>   kernel.addAspect( loggerAspect );
>
>   SecurityAspect secAspect = new SecurityAspectImpl(
> loggerAspect.getRootLogger() );
>   kernel.addAspect( secAspect );
>
>                              ...
>
> public class SecurityAspectImpl implements SecurityAspect
> {
>   public SecurityAspectImpl()
>   {
>     this( new NullLogger() );
>   }
>
>   public SecurityAspectImpl( Logger logger )
>   {
>     m_logger = logger;
>   }
> }
>
>                              *or*
>
>
> public class SecurityAspectImpl extends AbstractLogEnabled implements
> SecurityAspect
> {
>   public SecurityAspectImpl()
>   {
>     this( new NullLogger() );
>   }
>
>   public SecurityAspectImpl( Logger logger )
>   {
>     enableLogging( logger );
>   }
> }
>
>
> --
> hammett
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message