org.restlet.Application.getInboundRoot()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.restlet.Application.getInboundRoot()方法的一些代码示例,展示了Application.getInboundRoot()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getInboundRoot()方法的具体详情如下:
包路径:org.restlet.Application
类名称:Application
方法名:getInboundRoot

Application.getInboundRoot介绍

[英]Returns the inbound root Restlet.
[中]返回入站根Restlet。

代码示例

代码示例来源:origin: ontopia/ontopia

@Get
public Representation getAPIInfo() throws IOException {
  TemplateRepresentation r = new TemplateRepresentation("net/ontopia/topicmaps/rest/resources/info.html", MediaType.TEXT_HTML);
  r.getEngine().addProperty(VelocityEngine.RESOURCE_LOADER, "classpath");
  r.getEngine().addProperty("classpath." + VelocityEngine.RESOURCE_LOADER + ".class", ClasspathResourceLoader.class.getName());
  
  Map<Restlet, String> allRoutes = new HashMap<>();
  list(allRoutes, getApplication().getInboundRoot(), "");
  Map<String, Object> data = new HashMap<>();
  data.put("util", this);
  data.put("root", getApplication().getInboundRoot());
  data.put("routes", allRoutes);
  data.put("cutil", ClassUtils.class);
  
  r.setDataModel(data);
  return r;
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Starts the application, all the enabled associated services then the
 * inbound and outbound roots.
 */
@Override
public synchronized void start() throws Exception {
  if (isStopped()) {
    if (isDebugging()) {
      getLogger().log(
          Level.INFO,
          "Starting " + getClass().getName()
              + " application in debug mode");
    } else {
      getLogger().log(Level.INFO,
          "Starting " + getClass().getName() + " application");
    }
    if (getHelper() != null) {
      getHelper().start();
    }
    getServices().start();
    if (getInboundRoot() != null) {
      getInboundRoot().start();
    }
    if (getOutboundRoot() != null) {
      getOutboundRoot().start();
    }
    // Must be invoked as a last step
    super.start();
  }
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stops the application, the inbound and outbound roots then all the
 * enabled associated services. Finally, it clears the internal cache of
 * annotations.
 */
@Override
public synchronized void stop() throws Exception {
  if (isStarted()) {
    // Must be invoked as a first step
    super.stop();
    if (getOutboundRoot() != null) {
      getOutboundRoot().stop();
    }
    if (getInboundRoot() != null) {
      getInboundRoot().stop();
    }
    getServices().stop();
    if (getHelper() != null) {
      getHelper().stop();
    }
    // Clear the annotations cache
    AnnotationUtils.getInstance().clearCache();
  }
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.apispark

application.getInboundRoot(), null /*

代码示例来源:origin: org.restlet.jse/org.restlet.ext.platform

application.getInboundRoot(), null /*

代码示例来源:origin: org.restlet.jee/org.restlet.ext.platform

application.getInboundRoot(), null /*

代码示例来源:origin: org.restlet.gae/org.restlet.ext.platform

application.getInboundRoot(), null /*

代码示例来源:origin: org.restlet.osgi/org.restlet.ext.platform

application.getInboundRoot(), null /*

代码示例来源:origin: org.restlet.osgi/org.restlet.ext.oauth

Reference ref = new Reference("riap://application"
    + HttpOAuthHelper.getAuthPage(getContext()));
getLogger().fine("Name = " + getApplication().getInboundRoot());
ref.addQueryParameter("client", session.getClientId());

代码示例来源:origin: org.restlet.osgi/org.restlet

setInboundNext(getHelped().getInboundRoot());

代码示例来源:origin: org.restlet.osgi/org.restlet

request.getResourceRef().setBaseRef(
    request.getResourceRef().getHostIdentifier());
application.getInboundRoot().handle(request, response);

相关文章