|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.advisor.AdvisletRegistry
public abstract class AdvisletRegistry
The AdvisletRegistry allows an Advislet
to be associated with a
given URI prefix. This is achieved by use of the advisor-registry.xml
file which specifies what advislets should be registered and against
which URI prefixes.
Field Summary |
---|
Fields inherited from interface com.bea.p13n.advisor.AdvisletRegistryConstants |
---|
AD_IMPL_CLASS_TAG, AD_METADATA_TAG, AD_PARAMETERS_TAG, AD_URI_TAG, CA_SEQUENCE_TAG, MD_AUTHOR_TAG, MD_DESC_TAG, MD_NAME_TAG, MD_VERSION_TAG, PM_CUSTOM_TAG, RT_ADVICE_TRANSFORM_TAG, RT_ADVISLET_TAG, RT_COMPOUND_ADVISLET_TAG, VN_BUILD_NUM_TAG, VN_DESC_TAG, VN_MAJOR_TAG, VN_MINOR_TAG |
Constructor Summary | |
---|---|
AdvisletRegistry()
|
Method Summary | |
---|---|
static AdvisletChainElement |
get(String key)
Retrieves the AdvisletChainElement associated with a given key. |
static AdviceTransform |
getAdviceTransform(String key)
Retrieves the AdviceTransform associated with a key. |
static Advislet |
getAdvislet(String uriPrefix)
Retrieves the Advislet associated with a URI prefix. |
static String |
getUriPrefix(String uri)
Trims a URI of the form: protocol://arguments and returns the protocol component. |
static void |
initialize()
Initializes the registry by reading the default xml configuration file, loading the advislets defined and registering them against the URI prefixes supplied. |
static void |
initialize(InputStream inputStream)
Initializes the registry by the xml configuration from an InputStream, loading the advislets defined and registering them against the URI prefixes supplied. |
static void |
register(String key,
AdvisletChainElement advisletElement)
Registers an AdvisletChainElement and associates it with a key,
which in the case of an Advislet is expected to be the URI prefix
which will be used to refer to it. |
static void |
unregister(String key,
AdvisletChainElement advisletElement)
Unregisters an AdvisletChainElement and disassociates from with a key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdvisletRegistry()
Method Detail |
---|
public static void register(String key, AdvisletChainElement advisletElement)
AdvisletChainElement
and associates it with a key,
which in the case of an Advislet is expected to be the URI prefix
which will be used to refer to it.
key
- The key to associate with the given element.advisletElement
- The element to register.public static void unregister(String key, AdvisletChainElement advisletElement)
AdvisletChainElement
and disassociates from with a key.
key
- The key of the associated element.advisletElement
- The element to unregister.public static AdvisletChainElement get(String key) throws ElementNotFoundException
AdvisletChainElement
associated with a given key.
key
- The key to use to lookup the AdvisletChainElement.
AdvisletNotFoundException
- thrown when no element is
registered against the supplied key
ElementNotFoundException
public static Advislet getAdvislet(String uriPrefix) throws ElementNotFoundException
Advislet
associated with a URI prefix.
uriPrefix
- The prefix to use to lookup the Advislet.
AdvisletNotFoundException
- thrown when no advislet is
registered against the supplied prefix
ElementNotFoundException
public static AdviceTransform getAdviceTransform(String key) throws ElementNotFoundException
AdviceTransform
associated with a key.
key
- The key to use to lookup the AdviceTransform.
ElementNotFoundException
public static String getUriPrefix(String uri)
uri
- The URI to be trimmed.
IllegalArgumentException
- thrown when URI parsing failspublic static void initialize(InputStream inputStream)
public static void initialize()
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |