public class RequestIocContext extends Object implements IocContext
Constructor and Description |
---|
RequestIocContext(javax.servlet.ServletRequest req) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
清空缓存,注销资源,执行完后,当前上下文对象恢复到初始状态
|
void |
depose()
销毁当前上下文对象,清空资源,执行完后,当前上下文对象将不再可用
|
ObjectProxy |
fetch(String name)
根据对象的名称获取上下文环境中的一个对象
|
javax.servlet.ServletRequest |
getReq() |
Set<String> |
names() |
boolean |
remove(String scope,
String name)
从上下文环境中删一个对象。实现类根据 scope 信息来决定是否删除
|
boolean |
save(String scope,
String name,
ObjectProxy obj)
存储一个对象,根据对象的级别,各个实现类可以决定是否真的存储
|
public void clear()
IocContext
clear
in interface IocContext
public void depose()
IocContext
depose
in interface IocContext
public ObjectProxy fetch(String name)
IocContext
fetch
in interface IocContext
name
- 对象的名称public boolean remove(String scope, String name)
IocContext
remove
in interface IocContext
scope
- 对象范围name
- 对象的名称public boolean save(String scope, String name, ObjectProxy obj)
IocContext
save
in interface IocContext
scope
- 对象范围name
- 对象的名称obj
- 对象本身public javax.servlet.ServletRequest getReq()
public Set<String> names()
names
in interface IocContext
Copyright © 2017. All rights reserved.