|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.aop.advice.AspectDefinition
public class AspectDefinition
Definition of an aspect or interceptor.
This class is used by JBoss AOP to manage all configured informations regarding
aspects and interceptors, and can be used to define new aspects and interceptors
dynamically.
AspectManager.addAspectDefinition(AspectDefinition)
Field Summary | |
---|---|
Map<Advisor,Boolean> |
advisors
Deprecated. should not call this directly |
protected boolean |
deployed
Indicates whether this definition has been deployed in the domain . |
protected AspectFactory |
factory
Aspect's factory, responsible for creating the aspect instances. |
protected String |
name
Name of the aspect. |
protected Scope |
scope
Scope of the aspect, defines how many times it must be created during execution. |
Constructor Summary | |
---|---|
AspectDefinition()
|
|
AspectDefinition(String name,
Scope scope,
AspectFactory factory)
Creates an aspect definition. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compares this aspect definition with obj for equality. |
AspectFactory |
getFactory()
Returns the factory of this aspect definition, responsible for providing the instances at runtime. |
String |
getName()
Returns the name of this aspect definition. |
Scope |
getScope()
Returns the scope of this aspect definition. |
int |
hashCode()
|
boolean |
isDeployed()
Returns true if this aspect definition is deployed in its
domain .An aspect definition is considered to be deployed if it
is active in the domain, and can intercept joinpoints. |
void |
registerAdvisor(Advisor advisor)
Registers advisor as being a client of this definition. |
void |
setFactory(AspectFactory factory)
Sets the factory of this aspect definition, responsible for providing the instances at runtime. |
void |
setName(String name)
Sets the name of this aspect definition. |
void |
setScope(Scope scope)
Sets the scope of this aspect definition. |
void |
undeploy()
Undeploys the aspect definition from its domain. |
void |
unregisterAdvisor(Advisor advisor)
Unregisters advisor as being a client of this definition. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
domain
.
protected Scope scope
protected AspectFactory factory
protected boolean deployed
domain
.
public Map<Advisor,Boolean> advisors
Constructor Detail |
---|
public AspectDefinition(String name, Scope scope, AspectFactory factory)
name
- the name of the aspect. This name is used by the domain to
identify the aspect, so it must be unique in the AOP
domain
.scope
- the aspect scope, indicates how many aspects instances must
be created during execution. Defaults to PER_VM if null
.factory
- factory responsible for creating the aspect instancesAspectFactory
,
GenericAspectFactory
public AspectDefinition()
Method Detail |
---|
public void undeploy()
public boolean isDeployed()
true
if this aspect definition is deployed in its
domain
.An aspect definition is considered to be deployed if it
is active in the domain, and can intercept joinpoints. It is not deployed when it
is inactive and won't intercept any joinpoints.
true
if this aspect definition is active in its domainpublic void setName(String name)
domain
.
name
- the new name of this aspect definition.public void setScope(Scope scope)
scope
- the new scope of this aspect definition.public void setFactory(AspectFactory factory)
factory
- the new factory of this aspect definitionpublic AspectFactory getFactory()
public String getName()
domain
.
domain
public void registerAdvisor(Advisor advisor)
advisor
as being a client of this definition. This means
that advisor
uses an instance of the defined aspect for interception
of one or more joinpoints.
For internal use only
advisor
- an advisor responsible for managing joinpoints and their
interception executionpublic void unregisterAdvisor(Advisor advisor)
advisor
as being a client of this definition. This means
that advisor
no more uses an instance of the defined aspect for
interception.
For internal use only
advisor
- responsible for managing a set of joinpoints and their
interception executionpublic Scope getScope()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
obj
for equality. Returns
true
if and only if obj
is an aspect definition with the same
name
as this one.
equals
in class Object
obj
- the obj for comparison.
true
if obj
is an aspect definition with the same
name
as this one.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |