当前位置: 首页>>代码示例>>Java>>正文


Java SystemProperties.setPropertyValue方法代码示例

本文整理汇总了Java中com.helger.commons.system.SystemProperties.setPropertyValue方法的典型用法代码示例。如果您正苦于以下问题:Java SystemProperties.setPropertyValue方法的具体用法?Java SystemProperties.setPropertyValue怎么用?Java SystemProperties.setPropertyValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.helger.commons.system.SystemProperties的用法示例。


在下文中一共展示了SystemProperties.setPropertyValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setJavaCommonComponentsDebugMode

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Set the debug mode for the common Java components:
 * <ul>
 * <li>JAXP</li>
 * <li>Javax Activation</li>
 * <li>Javax Mail</li>
 * </ul>
 *
 * @param bDebugMode
 *        <code>true</code> to enable debug mode, <code>false</code> to
 *        disable it
 */
public static void setJavaCommonComponentsDebugMode (final boolean bDebugMode)
{
  // Set JAXP debugging!
  // Note: this property is read-only on Ubuntu, defined by the following
  // policy file: /etc/tomcat6/policy.d/04webapps.policy
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JAXP_DEBUG, bDebugMode);

  // Set javax.activation debugging
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JAVAX_ACTIVATION_DEBUG, bDebugMode);

  // Set javax.mail debugging
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_MAIL_DEBUG, bDebugMode);

  // Set serialization debugging
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_SERIALIZATION_DEBUG, bDebugMode);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:29,代码来源:GlobalDebug.java

示例2: enableSoapLogging

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Enable the JAX-WS SOAP debugging. This shows the exchanged SOAP messages in
 * the log file. By default this logging is disabled.
 *
 * @param bServerDebug
 *        <code>true</code> to enable server debugging, <code>false</code> to
 *        disable it.
 * @param bClientDebug
 *        <code>true</code> to enable client debugging, <code>false</code> to
 *        disable it.
 */
public static void enableSoapLogging (final boolean bServerDebug, final boolean bClientDebug)
{
  // Server debug mode
  String sDebug = Boolean.toString (bServerDebug);
  SystemProperties.setPropertyValue ("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", sDebug);
  SystemProperties.setPropertyValue ("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", sDebug);

  // Client debug mode
  sDebug = Boolean.toString (bClientDebug);
  SystemProperties.setPropertyValue ("com.sun.xml.ws.transport.http.HttpTransportPipe.dump", sDebug);
  SystemProperties.setPropertyValue ("com.sun.xml.internal.ws.transport.http.HttpTransportPipe.dump", sDebug);

  // Enlarge dump size
  if (bServerDebug || bClientDebug)
  {
    final String sValue = Integer.toString (2 * CGlobal.BYTES_PER_MEGABYTE);
    SystemProperties.setPropertyValue ("com.sun.xml.ws.transport.http.HttpAdapter.dumpTreshold", sValue);
    SystemProperties.setPropertyValue ("com.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold", sValue);
  }
  else
  {
    SystemProperties.removePropertyValue ("com.sun.xml.ws.transport.http.HttpAdapter.dumpTreshold");
    SystemProperties.removePropertyValue ("com.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold");
  }
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:37,代码来源:WSHelper.java

示例3: setMetroDebugSystemProperties

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Enable advanced JAX-WS debugging on more or less all relevant layers. This
 * method internally calls {@link #enableSoapLogging(boolean)} so it does not
 * need to be called explicitly. By default all this logging is disabled.
 *
 * @param bDebug
 *        <code>true</code> to enabled debugging, <code>false</code> to
 *        disable it.
 */
public static void setMetroDebugSystemProperties (final boolean bDebug)
{
  // Depending on the used JAX-WS version, the property names are
  // different....
  enableSoapLogging (bDebug);

  SystemProperties.setPropertyValue ("com.sun.xml.ws.transport.http.HttpAdapter.dump", Boolean.toString (bDebug));
  SystemProperties.setPropertyValue ("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump",
                                     Boolean.toString (bDebug));

  SystemProperties.setPropertyValue ("com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace",
                                     bDebug ? null : "false");

  SystemProperties.setPropertyValue ("com.sun.metro.soap.dump", Boolean.toString (bDebug));
  SystemProperties.setPropertyValue ("com.sun.xml.wss.provider.wsit.SecurityTubeFactory.dump",
                                     Boolean.toString (bDebug));
  SystemProperties.setPropertyValue ("com.sun.xml.wss.jaxws.impl.SecurityServerTube.dump", Boolean.toString (bDebug));
  SystemProperties.setPropertyValue ("com.sun.xml.wss.jaxws.impl.SecurityClientTube.dump", Boolean.toString (bDebug));
  SystemProperties.setPropertyValue ("com.sun.xml.ws.rx.rm.runtime.ClientTube.dump", Boolean.toString (bDebug));
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:30,代码来源:WSHelper.java

示例4: startNinetyServer

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
public static void startNinetyServer () throws Exception
{
  SystemProperties.setPropertyValue ("as4.server.configfile",
                                     new ClassPathResource ("test-as4-9090.properties").getAsFile ()
                                                                                       .getAbsolutePath ());
  final JettyRunner aJetty = new JettyRunner ();
  aJetty.setPort (PORT).setStopPort (STOP_PORT).setAllowAnnotationBasedConfig (false);
  aJetty.startServer ();
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:10,代码来源:RunInJettyAS4TEST9090.java

示例5: applyAsSystemProperties

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * This is a utility method, that takes the provided property names, checks if
 * they are defined in the configuration and if so, applies applies them as
 * System properties. It does it only when the configuration file was read
 * correctly.
 *
 * @param aPropertyNames
 *        The property names to consider.
 * @since 8.5.3
 */
public void applyAsSystemProperties (@Nullable final String... aPropertyNames)
{
  if (isRead () && aPropertyNames != null)
    for (final String sProperty : aPropertyNames)
    {
      final String sConfigFileValue = getAsString (sProperty);
      if (sConfigFileValue != null)
      {
        SystemProperties.setPropertyValue (sProperty, sConfigFileValue);
        s_aLogger.info ("Set Java system property from configuration: " + sProperty + "=" + sConfigFileValue);
      }
    }
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:24,代码来源:ConfigFile.java

示例6: enableCustomLogger

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
public static void enableCustomLogger (final boolean bEnable)
{
  if (bEnable)
    SystemProperties.setPropertyValue (SYS_PROP_POI_LOGGER, POISLF4JLogger.class.getName ());
  else
    SystemProperties.removePropertyValue (SYS_PROP_POI_LOGGER);
}
 
开发者ID:phax,项目名称:ph-poi,代码行数:8,代码来源:POISetup.java

示例7: setXMLEntityExpansionLimit

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the number of entity expansions.<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sEntityExpansionLimit
 *        A positive integer as a String. Values &le; 0 are treated as no
 *        limit. <code>null</code> means the property is deleted
 */
public static void setXMLEntityExpansionLimit (@Nullable final String sEntityExpansionLimit)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_ENTITY_EXPANSION_LIMIT, sEntityExpansionLimit);
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_ENTITY_EXPANSION_LIMIT, sEntityExpansionLimit);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:16,代码来源:XMLSystemProperties.java

示例8: setXMLElementAttributeLimit

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the number of attributes an element can have.<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sElementAttributeLimit
 *        A positive integer. Values &le; 0 are treated as no limit.
 *        <code>null</code> means the property is deleted
 * @since 8.6.2
 */
public static void setXMLElementAttributeLimit (@Nullable final String sElementAttributeLimit)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT, sElementAttributeLimit);
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_ELEMENT_ATTRIBUTE_LIMIT, sElementAttributeLimit);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:XMLSystemProperties.java

示例9: setXMLMaxOccur

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the number of content model nodes that may be created when building a
 * grammar for a W3C XML Schema that contains maxOccurs attributes with values
 * other than "unbounded".<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sMaxOccur
 *        A positive integer. Values &le; 0 are treated as no limit.
 *        <code>null</code> means the property is deleted.
 * @since 8.6.2
 */
public static void setXMLMaxOccur (@Nullable final String sMaxOccur)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_MAX_OCCUR, sMaxOccur);
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_MAX_OCCUR, sMaxOccur);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:19,代码来源:XMLSystemProperties.java

示例10: setXMLMaxGeneralEntitySizeLimit

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the maximum size of any general entities. It is recommended that
 * users set the limit to the smallest possible number so that malformed xml
 * files can be caught quickly.<br>
 * This is available since JDK 1.7.0_45/1.8.<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sMaxGeneralEntitySizeLimit
 *        A positive integer. Values &le; 0 are treated as no limit.
 *        <code>null</code> means the property is deleted.
 * @since 8.6.2
 */
public static void setXMLMaxGeneralEntitySizeLimit (@Nullable final String sMaxGeneralEntitySizeLimit)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_MAX_GENERAL_ENTITY_SIZE_LIMIT,
                                     sMaxGeneralEntitySizeLimit);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:20,代码来源:XMLSystemProperties.java

示例11: setXMLMaxParameterEntitySizeLimit

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the maximum size of any parameter entities, including the result of
 * nesting multiple parameter entities. It is recommended that users set the
 * limit to the smallest possible number so that malformed xml files can be
 * caught quickly.<br>
 * This is available since JDK 1.7.0_45/1.8.<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sMaxParameterEntitySizeLimit
 *        A positive integer. Values &le; 0 are treated as no limit.
 *        <code>null</code> means the property is deleted.
 * @since 8.6.2
 */
public static void setXMLMaxParameterEntitySizeLimit (@Nullable final String sMaxParameterEntitySizeLimit)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_MAX_PARAMETER_ENTITY_SIZE_LIMIT,
                                     sMaxParameterEntitySizeLimit);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:21,代码来源:XMLSystemProperties.java

示例12: setXMLTotalEntitySizeLimit

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Limit the total size of all entities that include general and parameter
 * entities. The size is calculated as an aggregation of all entities.<br>
 * This is available since JDK 1.7.0_45/1.8.<br>
 * This setting only takes effect if a parser with <b>explicitly</b> disabled
 * "Secure processing" feature is used. Otherwise this setting has no effect!
 *
 * @param sTotalEntitySizeLimit
 *        A positive integer. Values &le; 0 are treated as no limit.
 *        <code>null</code> means the property is deleted.
 * @since 8.6.2
 */
public static void setXMLTotalEntitySizeLimit (@Nullable final String sTotalEntitySizeLimit)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JDX_XML_TOTAL_ENTITY_SIZE_LIMIT, sTotalEntitySizeLimit);
  _onSystemPropertyChange ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:18,代码来源:XMLSystemProperties.java

示例13: setJavaNetDebugMode

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Enable or disable Java net debugging.
 *
 * @param sValue
 *        Debug property value. Valid values are:
 *        <ul>
 *        <li><code>null</code></li>
 *        <li>all</li>
 *        <li>ssl</li>
 *        <li>ssl:xxx (see Java docs what xxx can be)</li>
 *        </ul>
 * @since 8.6.1
 */
public static void setJavaNetDebugMode (@Nullable final String sValue)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JAVAX_NET_DEBUG, sValue);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:18,代码来源:GlobalDebug.java

示例14: setJavaSecurityDebugMode

import com.helger.commons.system.SystemProperties; //导入方法依赖的package包/类
/**
 * Enable or disable Java security debugging.
 *
 * @param sValue
 *        Debug property value. Valid values are:
 *        <ul>
 *        <li><code>null</code></li>
 *        <li>all</li>
 *        <li>access</li>
 *        <li>certpath</li>
 *        <li>combiner</li>
 *        <li>gssloginconfig</li>
 *        <li>configfile</li>
 *        <li>configparser</li>
 *        <li>jar</li>
 *        <li>logincontext</li>
 *        <li>policy</li>
 *        <li>provider</li>
 *        <li>scl</li>
 *        </ul>
 * @since 8.6.1
 */
public static void setJavaSecurityDebugMode (@Nullable final String sValue)
{
  SystemProperties.setPropertyValue (SYSTEM_PROPERTY_JAVA_SECURITY_DEBUG, sValue);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:27,代码来源:GlobalDebug.java


注:本文中的com.helger.commons.system.SystemProperties.setPropertyValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。