本文整理了Java中org.restlet.Restlet.getContext
方法的一些代码示例,展示了Restlet.getContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Restlet.getContext
方法的具体详情如下:
包路径:org.restlet.Restlet
类名称:Restlet
方法名:getContext
[英]Returns the context.
[中]返回上下文。
代码示例来源:origin: org.restlet/org.restlet.ext.spring
/**
* Constructor with a parent Restlet.
*/
public SpringRouter(Restlet parent) {
super(parent.getContext());
}
代码示例来源:origin: org.restlet/org.restlet
@Override
public Context getContext() {
return wrappedRestlet.getContext();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public Context getContext() {
return wrappedRestlet.getContext();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the helped Restlet context.
*
* @return The helped Restlet context.
*/
public Context getContext() {
return getHelped().getContext();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Constructor.
*
* @param router
* The parent router.
* @param next
* The next Restlet.
*/
public Route(Router router, Restlet next) {
super((router != null) ? router.getContext() : (next != null) ? next
.getContext() : null, next);
this.router = router;
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the helped Restlet context.
*
* @return The helped Restlet context.
*/
public Context getContext() {
return getHelped().getContext();
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the helped Restlet logger.
*
* @return The helped Restlet logger.
*/
public Logger getLogger() {
return (getHelped().getContext() != null) ? getHelped().getContext()
.getLogger() : Context.getCurrentLogger();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the outbound root Restlet.
*
* @param outboundRoot
* The outbound root Restlet.
*/
public synchronized void setOutboundRoot(Restlet outboundRoot) {
this.outboundRoot = outboundRoot;
if ((outboundRoot != null) && (outboundRoot.getContext() == null)) {
outboundRoot.setContext(getContext());
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the next Restlet.
*
* In addition, this method will set the context of the next Restlet if it
* is null by passing a reference to its own context.
*
* @param next
* The next Restlet.
*/
public void setNext(Restlet next) {
if ((next != null) && (next.getContext() == null)) {
next.setContext(getContext());
}
this.next = next;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the inbound root Restlet.
*
* @param inboundRoot
* The inbound root Restlet.
*/
public synchronized void setInboundRoot(Restlet inboundRoot) {
this.inboundRoot = inboundRoot;
if ((inboundRoot != null) && (inboundRoot.getContext() == null)) {
inboundRoot.setContext(getContext());
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Checks the context and sets it if necessary.
*
* @param target
* The target Restlet.
*/
protected void checkContext(Restlet target) {
if ((target.getContext() == null) && (this.parentContext != null)) {
target.setContext(this.parentContext.createChildContext());
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the helped Restlet logger.
*
* @return The helped Restlet logger.
*/
public Logger getLogger() {
if (getHelped() != null && getHelped().getContext() != null) {
return getHelped().getContext().getLogger();
}
return Context.getCurrentLogger();
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the helped Restlet parameters.
*
* @return The helped Restlet parameters.
*/
public Series<Parameter> getHelpedParameters() {
Series<Parameter> result = null;
if ((getHelped() != null) && (getHelped().getContext() != null)) {
result = getHelped().getContext().getParameters();
} else {
result = new Form();
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the helped Restlet parameters.
*
* @return The helped Restlet parameters.
*/
public Series<Parameter> getHelpedParameters() {
Series<Parameter> result = null;
if ((getHelped() != null) && (getHelped().getContext() != null)) {
result = getHelped().getContext().getParameters();
} else {
result = new Series<Parameter>(Parameter.class);
}
return result;
}
代码示例来源:origin: org.restlet/org.restlet
@Override
public Route attach(String uriPattern, Restlet target) {
if (target.getContext() == null) {
target
.setContext(getContext()
.createChildContext());
}
return super.attach(uriPattern, target);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public TemplateRoute attach(Restlet target) {
if (target.getContext() == null) {
target.setContext(getContext().createChildContext());
}
return super.attach(target);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public TemplateRoute attachDefault(Restlet defaultTarget) {
if (defaultTarget.getContext() == null) {
defaultTarget.setContext(getContext().createChildContext());
}
return super.attachDefault(defaultTarget);
}
代码示例来源:origin: org.restlet/org.restlet
@Override
public Route attach(Restlet target) {
if (target.getContext() == null) {
target
.setContext(getContext()
.createChildContext());
}
return super.attach(target);
}
代码示例来源:origin: org.restlet/org.restlet
@Override
public Route attachDefault(Restlet defaultTarget) {
if (defaultTarget.getContext() == null) {
defaultTarget.setContext(getContext()
.createChildContext());
}
return super.attachDefault(defaultTarget);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public TemplateRoute attach(String uriPattern, Restlet target) {
if (target.getContext() == null) {
target.setContext(getContext().createChildContext());
}
return super.attach(uriPattern, target);
}
内容来源于网络,如有侵权,请联系作者删除!