本文整理了Java中org.tinygroup.context.Context.putSubContext()
方法的一些代码示例,展示了Context.putSubContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.putSubContext()
方法的具体详情如下:
包路径:org.tinygroup.context.Context
类名称:Context
方法名:putSubContext
[英]添加子环境
[中]添加子环境
代码示例来源:origin: org.tinygroup/org.tinygroup.beancontext
public Context putSubContext(String contextName, Context subContext) {
return context.putSubContext(contextName, subContext);
}
代码示例来源:origin: org.tinygroup/org.tinygroup.velocity
/**
* 处理外部pagelet
*/
public void processTempleate(Context context, Writer writer, String path)
throws Exception {
TinyVelocityContext tinyVelocityContext = new TinyVelocityContext(
context);
if (initContext != null) {
context.putSubContext(BASE_CONTEXT, initContext);
}
VelocityContext velocityContext = new VelocityContext(
tinyVelocityContext);
String templatePath = findTemplatePath(path);
Template template = velocity.getTemplate(templatePath, ENCODING);
template.merge(velocityContext, writer, macroList);
writer.flush();
}
代码示例来源:origin: org.tinygroup/velocity
/**
* 处理外部pagelet
*/
public void processTempleate(Context context, Writer writer, String path)
throws Exception {
TinyVelocityContext tinyVelocityContext = new TinyVelocityContext(
context);
if (initContext != null) {
context.putSubContext(BASE_CONTEXT, initContext);
}
VelocityContext velocityContext = new VelocityContext(
tinyVelocityContext);
String templatePath = findTemplatePath(path);
Template template = velocity.getTemplate(templatePath, ENCODING);
template.merge(velocityContext, writer, macroList);
writer.flush();
}
代码示例来源:origin: org.tinygroup/velocity
context);
if (initContext != null) {
context.putSubContext(BASE_CONTEXT, initContext);
代码示例来源:origin: org.tinygroup/org.tinygroup.velocity
context);
if (initContext != null) {
context.putSubContext(BASE_CONTEXT, initContext);
代码示例来源:origin: org.tinygroup/org.tinygroup.servicehttpchannel
public void process(Event event) {
if (serverPath == null) {
throw new RuntimeException("服务器地址路径未配置");
}
String serviceId = event.getServiceRequest().getServiceId();
String url = serverPath + serviceId + ".mockservice";
Event result = execute(event, url);
Throwable throwable = result.getThrowable();
if (throwable != null) {// 如果有异常发生,则抛出异常
LOGGER.errorMessage("服务执行发生异常,serviceId:{},eventId:{}", throwable,
result.getServiceRequest().getServiceId(),
result.getEventId());
if (throwable instanceof RuntimeException) {
throw (RuntimeException) throwable;
} else {
throw new RuntimeException(throwable);// 此处的RuntimeException类型需要调整
}
}
event.getServiceRequest()
.getContext()
.putSubContext(result.getEventId(),
result.getServiceRequest().getContext());
}
代码示例来源:origin: org.tinygroup/org.tinygroup.imda
String requestName = null;
Context newContext=new ContextImpl();
newContext.putSubContext("webContext",context);
if (parameters != null && parameters.length() > 0) {
for (String parameter : parameters.split("&")) {
代码示例来源:origin: org.tinygroup/org.tinygroup.cepcorenettysc
event.getServiceRequest()
.getContext()
.putSubContext(newEvent.getEventId(),
newEvent.getServiceRequest().getContext());
代码示例来源:origin: org.tinygroup/org.tinygroup.cepcoremutiremoteimpl
event.getServiceRequest()
.getContext()
.putSubContext(newEvent.getEventId(),
newEvent.getServiceRequest().getContext());
内容来源于网络,如有侵权,请联系作者删除!