org.apache.avalon.framework.context
Interface Context
- All Known Implementing Classes:
- DefaultContext
- public interface Context
The context is the interface through which the Component
and it's Container communicate.
Each Container-Component relationship will also involve defining
a contract between two entities. This contract will specify the
services, settings and information that is supplied by the
Container to the Component.
This relationship should be documented in a well known place.
It is sometimes convenient to derive from Context to provide
a particular style of Context for your Component-Container
relationship. The documentation for required entries in context
can then be defined there. (examples include MailetContext,
BlockContext etc.)
- Author:
- Federico Barbieri, Pierpaolo Fumagalli, Stefano Mazzocchi, Peter Donald
Method Summary |
java.lang.Object |
get(java.lang.Object key)
Retrieve an object from Context. |
get
public java.lang.Object get(java.lang.Object key)
throws ContextException
- Retrieve an object from Context.
- Parameters:
key
- the key into context- Returns:
- the object
- Throws:
ContextException
- if object not found. Note that this
means that either Component is asking for invalid entry
or the Container is not living up to contract.
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.