gpt4 book ai didi

org.apache.xmlrpc.server.XmlRpcServerConfigImpl.setEnabledForExtensions()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:33:40 26 4
gpt4 key购买 nike

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

XmlRpcServerConfigImpl.setEnabledForExtensions介绍

暂无

代码示例

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-entity-similarity

public static void main(String[] args) {
    if (args.length != 1)
      System.err.println("Usage: ECServer port");
    int port = (new Integer(args[0])).intValue();
    
    try {
      System.out.println("Attempting to start XML-RPC Server...");
      WebServer server = new WebServer(port);
      XmlRpcServer xmlRpcServer = server.getXmlRpcServer();
      PropertyHandlerMapping phm = new PropertyHandlerMapping();
      phm.addHandler("EntityComparison", EntityComparison.class);
      xmlRpcServer.setHandlerMapping(phm);
      XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl)xmlRpcServer.getConfig();
      serverConfig.setEnabledForExtensions(true);
      serverConfig.setContentLengthOptional(false);
      server.start();
      System.out.println("Started successfully.");
      System.out.println("Accepting requests. (Halt program to stop.)");
    } 
    catch (Exception exception) {
      System.err.println("ECServer: " + exception);
    }
  }
}

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-wnsim

serverConfig.setEnabledForExtensions(true);
serverConfig.setContentLengthOptional(false);

代码示例来源:origin: edu.illinois.cs.cogcomp/DatalessClassification

public static void server(String indexDirectory, int port)
    throws IOException, XmlRpcException {
  log.info(
      "Starting descartes server at port {}, with index directory {}",
      Integer.valueOf(port), indexDirectory);
  DescartesServer.indexDirectory = indexDirectory;
  WebServer webServer = new WebServer(port);
  XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();
  PropertyHandlerMapping phm = new PropertyHandlerMapping();
  phm.addHandler("DescartesServer", DescartesServer.class);
  xmlRpcServer.setHandlerMapping(phm);
  XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlRpcServer
      .getConfig();
  serverConfig.setEnabledForExtensions(true);
  serverConfig.setContentLengthOptional(false);
  webServer.start();
  log.info("Descartes is ready!");
}

代码示例来源:origin: org.apache.continuum/continuum-xmlrpc-server

public void initServer()
  throws ServletException
{
  server = new ContinuumXmlRpcServletServer();
  try
  {
    securitySystem = (SecuritySystem) getPlexusContainer().lookup( SecuritySystem.ROLE );
  }
  catch ( ComponentLookupException e )
  {
    throw new ServletException( "Can't init the xml rpc server, unable to obtain security system", e );
  }
  try
  {
    XmlRpcServerConfigImpl cfg = (XmlRpcServerConfigImpl) server.getConfig();
    cfg.setEnabledForExtensions( true );
    PropertiesHandlerMapping mapping = (PropertiesHandlerMapping) lookup(
      PropertyHandlerMapping.class.getName() );
    mapping.setRequestProcessorFactoryFactory( (RequestProcessorFactoryFactory) lookup(
      RequestProcessorFactoryFactory.class.getName() ) );
    mapping.load();
    mapping.setAuthenticationHandler( getAuthenticationHandler() );
    server.setHandlerMapping( mapping );
  }
  catch ( XmlRpcException e )
  {
    throw new ServletException( "Can't init the xml rpc server", e );
  }
}

代码示例来源:origin: org.apache.maven.continuum/continuum-xmlrpc-server

public void initServer()
  throws ServletException
{
  server = new ContinuumXmlRpcServletServer();
  try
  {
    securitySystem = (SecuritySystem) getPlexusContainer().lookup( SecuritySystem.ROLE );
  }
  catch ( ComponentLookupException e )
  {
    throw new ServletException( "Can't init the xml rpc server, unable to obtain security system", e );
  }
  try
  {
    XmlRpcServerConfigImpl cfg = (XmlRpcServerConfigImpl) server.getConfig();
    cfg.setEnabledForExtensions( true );
    PropertiesHandlerMapping mapping =
      (PropertiesHandlerMapping) lookup( PropertyHandlerMapping.class.getName() );
    mapping.setRequestProcessorFactoryFactory(
      (RequestProcessorFactoryFactory) lookup( RequestProcessorFactoryFactory.class.getName() ) );
    mapping.load();
    mapping.setAuthenticationHandler( getAuthenticationHandler() );
    server.setHandlerMapping( mapping );
  }
  catch ( XmlRpcException e )
  {
    throw new ServletException( "Can't init the xml rpc server", e );
  }
}

代码示例来源:origin: rosjava/rosjava_core

serverConfig.setEnabledForExtensions(false);
serverConfig.setContentLengthOptional(false);
try {

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com