本文整理了Java中org.restlet.resource.Directory.getContext()
方法的一些代码示例,展示了Directory.getContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.getContext()
方法的具体详情如下:
包路径:org.restlet.resource.Directory
类名称:Directory
方法名:getContext
暂无
代码示例来源:origin: com.whizzosoftware.hobson.hub/hobson-hub-setup
public Context getContext() {
// Get the context from the parent
Context context = super.getContext();
// Wrapper the context's client dispatcher in an object that will force it to use the OSGi bundle classloader
// rather than the classloader that created the dispatcher. Also, the same Context object may run through
// this many times so we have to make sure we don't wrapper multiple times -- otherwise evil hilarity will ensue
// (i.e stack overflows)
if (!(context.getClientDispatcher() instanceof CLAPCustomClassLoaderDispatcher)) {
context.setClientDispatcher(new CLAPCustomClassLoaderDispatcher(context.getClientDispatcher(), bundleClassloader));
}
return context;
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
public void doInit() throws ResourceException {
this.directory = (Directory) getRequestAttributes().get("org.restlet.directory");
this.directoryClientDispatcher = getDirectory().getContext() != null ?
getDirectory().getContext().getClientDispatcher() :
null;
if (getClientDispatcher() == null) {
内容来源于网络,如有侵权,请联系作者删除!