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

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

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

Application.getConnectorService介绍

[英]Returns the connector service. The service is enabled by default.
[中]返回连接器服务。默认情况下,该服务处于启用状态。

代码示例

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

/**
 * Returns the connector service associated to a request.
 * 
 * @return The connector service associated to a request.
 */
public static org.restlet.service.ConnectorService getConnectorService() {
  org.restlet.service.ConnectorService result = null;
  org.restlet.Application application = org.restlet.Application
      .getCurrent();
  if (application != null) {
    result = application.getConnectorService();
  } else {
    result = new org.restlet.service.ConnectorService();
  }
  return result;
}

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

Application application = (Application) next;
if (application.getConnectorService() != null) {
  if (application.getConnectorService()
      .getClientProtocols() != null) {
    for (Protocol clientProtocol : application
        .getConnectorService().getClientProtocols()) {
      boolean clientFound = false;
  if (application.getConnectorService()
      .getServerProtocols() != null) {
    for (Protocol serverProtocol : application
        .getConnectorService().getServerProtocols()) {
      boolean serverFound = false;

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

if (getConnectorService() != null) {
  getConnectorService().start();

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

public synchronized void stop() throws Exception {
  if (isStarted()) {
    if (getConnectorService() != null) {
      getConnectorService().stop();

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

.getChild();
if (!application.getConnectorService().getClientProtocols()
    .contains(protocol)) {
  getLogger()

相关文章