|
You want to avoid using protocol-specific system information outside
of its relevant context.
- You have components and services that need access to system information.
- You want to decouple application components and services from the
protocol specifics of system information.
- You want to expose only the relevant APIs within a context.
Use a Context Object to encapsulate state in a protocol-independent
way to be shared throughout your application.
Class Diagram
Sequence Diagram
- Request Context Strategies
- Request Context Map Strategy
- Request Context POJO Strategy
- Request Context Validation Strategy
- Configuration Context Strategies
- JSTL Configuration Strategy
- Security Context Strategy
- General Context Object Strategies
- Context Object Factory Strategy
- Context Object Auto-Population Strategy
- Improves reusability and maintainability
- Improves testability
- Reduces constraints on evolution of interfaces
- Reduces performance
- Intercepting Filter
An Intercepting Filter can use a ContextFactory to create a Context
Object during web request handling.
- Front Controller
A Front Controller can use a ContextFactory to create a Context Object
during web request handling
- Application Controller
An Application Controller can use a ContextFactory to create a Context
Object during web request handling
- Transfer Object
A Transfer Object is used specifically to transfer state across remote
tiers to reduce network communication, while a Context Object is used
to hide implementation details, improving reuse and maintainability.
|