com.xenonsoft.bridgetown.aop
Interface IPointCut

All Known Subinterfaces:
IMethodPointCut
All Known Implementing Classes:
DefaultMethodPointCut

public interface IPointCut

A contract interface for a pointcut

In aspect-oriented computer programming, a pointcut is a set of join points. Whenever the program execution reaches one of the join points described in the pointcut, a piece of code associated with the pointcut (called advice) is executed.

A join point is a point in the flow of a program, general computer science In aspect-oriented programming a set of join points is described, so that it can be referred to as a pointcut.

In aspect-oriented programming an advice is a piece of code that is executed when a join point is reached, that is associated with the pointcut of the advice.

An aspect is the AOP equivalent of a class, except that it encapsulates one or more cross-cutting concerns and formally describes to how weave advice over pointcuts. Just as a object oriented class contains methods and fields, an aspect contains advice and rules for applying advice.

A pointcut has a interceptor IMethodInterceptor in order to execute an aspect oriented behaviour. A pointcut also has a unique name

Version:
$Id: IPointCut.java,v 1.6 2005/02/23 01:28:14 peter_pilgrim Exp $
Author:
Peter Pilgrim, Sep 20, 2004 21:50:59 PM

Method Summary
 void addJoinPoint(IJoinPoint joinpoint)
          Registers a join point to this point cut
 java.lang.Object getContext()
          Gets the AOP implementation defined context associated with this pointcut.
 int getJoinPointCount()
          Returns the number of join points that associated with this pointcut.
 IJoinPoint[] getJoinPoints()
          Returns the array of join points that associated with this pointcut.
 IMethodInterceptor getMethodInterceptor()
          Specifies the advice, the invocation method, that will be executed on this pointcut.
 java.lang.String getName()
          Get the point cut name
 java.lang.Object getParameter(java.lang.String name)
          Retrieves the named parameter
 java.util.Iterator getParameterNames()
          Retrieves iterator that enables to the caller to cycle throught the elements in the pointcuts parameter collection.
 ITransactionConfig getTransactionConfig()
          Gets the transaction configuration relevant to this pointcut.
 void setMethodInterceptor(IMethodInterceptor interceptor)
          Sets the interceptor of the pointcut NB: Only assembler factories should change this value.
 void setName(java.lang.String name)
          Sets the name of the pointcut.
 void setParameter(java.lang.String name, java.lang.Object value)
          Stores the value inside the named parameter
 void setTransactionConfig(ITransactionConfig transConfig)
          Sets the transaction configuration relevant to this pointcut.
 

Method Detail

getName

public java.lang.String getName()
Get the point cut name

Returns:
the name of the pointcut

getContext

public java.lang.Object getContext()
Gets the AOP implementation defined context associated with this pointcut.

CAUTION

: This object is obviously opaque data in terms of the Brigetown IoC Framework assembly. The context can be used by the particular Aspect Oriented Framework implementation. You may be able to retrieve additional implementation defined behaviour or data throught this method call. For instance more information about the particular point-cut, obviously you need to read the documentation for you AOP implementation for more information.

Returns:
the implementation data required for AOP plug-in implementation, or just return null

getJoinPointCount

public int getJoinPointCount()
Returns the number of join points that associated with this pointcut.

Returns:
the number of join points

getJoinPoints

public IJoinPoint[] getJoinPoints()
Returns the array of join points that associated with this pointcut.

Returns:
the array of join points.

addJoinPoint

public void addJoinPoint(IJoinPoint joinpoint)
Registers a join point to this point cut

Parameters:
joinpoint - the joinpoint to add

getMethodInterceptor

public IMethodInterceptor getMethodInterceptor()
Specifies the advice, the invocation method, that will be executed on this pointcut.

Returns:
the method interceptor

setName

public void setName(java.lang.String name)
Sets the name of the pointcut.

NB: Only assembler factories should change this value.

Parameters:
name - the name

setMethodInterceptor

public void setMethodInterceptor(IMethodInterceptor interceptor)
Sets the interceptor of the pointcut

NB: Only assembler factories should change this value.

Parameters:
interceptor -

getTransactionConfig

public ITransactionConfig getTransactionConfig()
Gets the transaction configuration relevant to this pointcut.

Returns:
the transaction information

setTransactionConfig

public void setTransactionConfig(ITransactionConfig transConfig)
Sets the transaction configuration relevant to this pointcut.

Parameters:
transConfig - the transaction information

getParameterNames

public java.util.Iterator getParameterNames()
Retrieves iterator that enables to the caller to cycle throught the elements in the pointcuts parameter collection. The method returns an iterator that tracing the parameter names, which can therefore be use in getParameter(String)

Returns:
the iterator

getParameter

public java.lang.Object getParameter(java.lang.String name)
Retrieves the named parameter

Parameters:
name - the parameter name
Returns:
the value of the parameter to return or null if the parameter does not exits.

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value)
Stores the value inside the named parameter

Parameters:
name - the parameter name
value - the new value of the named parameter


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.