org.jboss.resteasy.spi.Registry.removeRegistrations()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(99)

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

Registry.removeRegistrations介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-dubbo

@Override
public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: weibocom/motan

@Override
public void unexport() {
  server.getDeployment().getRegistry().removeRegistrations(provider.getInterface());
  String protocolKey = MotanFrameworkUtil.getProtocolKey(url);
  @SuppressWarnings("unchecked")
  Exporter<T> exporter = (Exporter<T>) exporterMap.remove(protocolKey);
  if (exporter != null) {
    exporter.destroy();
  }
  LoggerUtil.info("RestfulExporter unexport Success: url={}", url);
}

代码示例来源:origin: HotswapProjects/HotswapAgent

registry.removeRegistrations(original);
registry.removeRegistrations(c);

代码示例来源:origin: alipay/sofa-rpc

@Override
public void unRegisterProcessor(ProviderConfig providerConfig, boolean closeIfNoEntry) {
  if (!isStarted()) {
    return;
  }
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("Unregister jaxrs service to port {} and base path is {}", serverConfig.getPort(),
      serverConfig.getContextPath());
  }
  try {
    httpServer.getDeployment().getRegistry()
      .removeRegistrations(providerConfig.getRef().getClass(), serverConfig.getContextPath());
    invokerCnt.decrementAndGet();
  } catch (Exception e) {
    LOGGER.error("Unregister jaxrs service error", e);
  }
  // 如果最后一个需要关闭,则关闭
  if (closeIfNoEntry && invokerCnt.get() == 0) {
    stop();
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
public void unRegisterProcessor(ProviderConfig providerConfig, boolean closeIfNoEntry) {
  if (!isStarted()) {
    return;
  }
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("Unregister jaxrs service to port {} and base path is {}", serverConfig.getPort(),
      serverConfig.getContextPath());
  }
  try {
    httpServer.getDeployment().getRegistry()
      .removeRegistrations(providerConfig.getRef().getClass(), serverConfig.getContextPath());
    invokerCnt.decrementAndGet();
  } catch (Exception e) {
    LOGGER.error("Unregister jaxrs service error", e);
  }
  // 如果最后一个需要关闭,则关闭
  if (closeIfNoEntry && invokerCnt.get() == 0) {
    stop();
  }
}

代码示例来源:origin: resteasy/Resteasy

@Override
public void removeRegistrations(ResourceClass resourceClass)
{
 delegate.removeRegistrations(resourceClass);
}

代码示例来源:origin: resteasy/Resteasy

@Override
public void removeRegistrations(Class<?> clazz)
{
 delegate.removeRegistrations(clazz);
}

代码示例来源:origin: resteasy/Resteasy

@Override
public void removeRegistrations(Class<?> clazz, String base)
{
 delegate.removeRegistrations(clazz, base);
}

代码示例来源:origin: resteasy/Resteasy

/**
  * Register all of the resources into RESTEasy only when Spring finishes it's
  * life-cycle and the spring singleton bean creation is completed.
  * @param event application event
  */
  @Override
  public void onApplicationEvent(ApplicationEvent event)
  {
   for (SpringResourceFactory resourceFactory : resourceFactories.values())
   {
     getRegistry().removeRegistrations(resourceFactory.getScannableClass());
   }

//  The following code would re-process the bean factory, in case the configuration changed.
//  However, it needs work.
//      if (event.getSource() instanceof XmlWebApplicationContext)
//      {
//         ConfigurableListableBeanFactory beanFactory = ((XmlWebApplicationContext) event.getSource()).getBeanFactory();
//         postProcessBeanFactory(beanFactory);
//      }
   for (SpringResourceFactory resourceFactory : resourceFactories.values())
   {
     getRegistry().addResourceFactory(resourceFactory, resourceFactory.getContext());
   }
  }

代码示例来源:origin: org.jboss.resteasy/resteasy-vertx

@Override
public void removeRegistrations(Class<?> clazz)
{
 delegate.removeRegistrations(clazz);
}

代码示例来源:origin: org.jboss.resteasy/resteasy-vertx

@Override
public void removeRegistrations(Class<?> clazz, String base)
{
 delegate.removeRegistrations(clazz, base);
}

代码示例来源:origin: org.jboss.resteasy/resteasy-vertx

@Override
public void removeRegistrations(ResourceClass resourceClass)
{
 delegate.removeRegistrations(resourceClass);
}

代码示例来源:origin: com.alibaba/dubbo

@Override
public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: org.apache.dubbo/dubbo-rpc-rest

@Override
public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: org.apache.dubbo/dubbo

@Override
public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: remoting/dubbox

public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: remoting/dubbox

public void undeploy(Class resourceDef) {
  getDeployment().getRegistry().removeRegistrations(resourceDef);
}

代码示例来源:origin: info.magnolia.rest/magnolia-rest-integration

protected void unregisterEndpoint(String endpointReferenceId) {
  Object endpoint = endpoints.remove(endpointReferenceId);
  if (endpoint != null) {
    Class<?> endpointClass = endpoint.getClass();
    if (supportDynamicPath(endpointClass) && endpoint instanceof AbstractEndpoint) {
      String configuredPath = ((AbstractEndpoint) endpoint).getEndpointDefinition().getEndpointPath();
      String path = StringUtils.isEmpty(configuredPath) ? getBasePath(endpointReferenceId) : truncatePath(configuredPath);
      super.getDispatcher().getRegistry().removeRegistrations(endpointClass, path);
      log.debug("Unregister endpoint {} with base path {} from registry.", endpointReferenceId, path);
    } else {
      super.getDispatcher().getRegistry().removeRegistrations(endpointClass);
      log.debug("Unregister endpoint which has reference id: {} from registry.", endpointReferenceId);
    }
  }
}

代码示例来源:origin: org.switchyard.components/switchyard-component-resteasy

/**
   * Unregisters RESTEasy resources from the servlet.
   * @param alias alias
   * @param resourceClasses resource classes
   */
  public void unregisterRESTEasyResources(String alias, List<Class<?>> resourceClasses) {
    OsgiRESTEasyServletWrapper servlet = getRegisteredRESTEasyServlet(alias);
    if (servlet == null) {
      throw new IllegalArgumentException("No servlet is registered for the alias '" + alias + "'");
    }

    Registry registry = servlet.getDispatcher().getRegistry();
    for (Class<?> clazz : resourceClasses) {
      registry.removeRegistrations(clazz);
    }
  }
}

相关文章