Top Description Fields Constructors Methods
org.springframework.aop.aspectj

public Class AspectJWeaverMessageHandler

extends Object
implements IMessageHandler
Class Inheritance
All Implemented Interfaces
org.aspectj.bridge.IMessageHandler
Imports
org.apache.commons.logging.Log, .LogFactory, org.aspectj.bridge.AbortException, .IMessage, .IMessage.Kind, .IMessageHandler

Implementation of AspectJ's IMessageHandler interface that routes AspectJ weaving messages through the same logging system as the regular Spring messages.

Pass the option...

-XmessageHandlerClass:org.springframework.aop.aspectj.AspectJWeaverMessageHandler

to the weaver; for example, specifying the following in a "META-INF/aop.xml file:

<weaver options="..."/>

Authors
Adrian Colyer, Juergen Hoeller
Since
2.0

Field Summary

Modifier and TypeField and Description
private static final String
private static final Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dontIgnore(IMessage.Kind messageKind)

Implements org.aspectj.bridge.IMessageHandler.dontIgnore.

Allow fine grained configuration after initialization.
public boolean
handleMessage(IMessage
the IMessage to handle - never null
message
)

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message, by reporting and/or throwing an AbortException.
public void
ignore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.ignore.

Allow fine grained configuration after initialization.
public boolean
isIgnoring(IMessage.Kind messageKind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type.
private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AJ_IDback to summary
private static final String AJ_ID
loggerback to summary
private static final Log logger

Constructor Detail

AspectJWeaverMessageHandlerback to summary
public AspectJWeaverMessageHandler()

Method Detail

dontIgnoreback to summary
public void dontIgnore(IMessage.Kind messageKind)

Implements org.aspectj.bridge.IMessageHandler.dontIgnore.

Doc from org.aspectj.bridge.IMessageHandler.dontIgnore.

Allow fine grained configuration after initialization. Minaly used in LTW. Most of the implementation can have this method be a no-op.

Annotations
@Override
handleMessageback to summary
public boolean handleMessage(IMessage message) throws AbortException

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Doc from org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message, by reporting and/or throwing an AbortException.

Parameters
message:IMessage

the IMessage to handle - never null

Returns:boolean

true if this message was handled by this handler

Annotations
@Override
Exceptions
AbortException:
depending on handler logic.
ignoreback to summary
public void ignore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.ignore.

Doc from org.aspectj.bridge.IMessageHandler.ignore.

Allow fine grained configuration after initialization.

Annotations
@Override
isIgnoringback to summary
public boolean isIgnoring(IMessage.Kind messageKind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Doc from org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.

Returns:boolean

true if this handler is ignoring all messages of this type

Annotations
@Override
makeMessageForback to summary
private String makeMessageFor(IMessage aMessage)