gpt4 book ai didi

org.opensaml.core.xml.config.XMLObjectProviderRegistry类的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 07:09:05 31 4
gpt4 key购买 nike

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

XMLObjectProviderRegistry介绍

[英]Configuration registry component for registering and retrieving implementation instances and related configuration relevant to working with XMLObjects, including builders, marshallers and unmarshallers.

The registry instance to use would typically be retrieved from the org.opensaml.core.config.ConfigurationService.
[中]配置注册表组件,用于注册和检索与使用XMLObjects(包括构建器、封送器和解封器)相关的实现实例和相关配置。
要使用的注册表实例通常会从组织中检索。opensaml。果心配置。配置服务。

代码示例

代码示例来源:origin: org.jasig.cas/cas-server-support-saml

if (registry == null) {
    LOGGER.debug("XMLObjectProviderRegistry did not exist in ConfigurationService, will be created");
    registry = new XMLObjectProviderRegistry();
    ConfigurationService.register(XMLObjectProviderRegistry.class, registry);
registry.setParserPool(this.parserPool);
this.builderFactory = registry.getBuilderFactory();
Assert.notNull(this.builderFactory, "parserPool cannot be null");
this.marshallerFactory = registry.getMarshallerFactory();
Assert.notNull(this.marshallerFactory, "marshallerFactory cannot be null");
this.unmarshallerFactory = registry.getUnmarshallerFactory();
Assert.notNull(this.unmarshallerFactory, "unmarshallerFactory cannot be null");

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common

/**
 * Get the configured ParserPool.
 *
 * @return the configured ParserPool
 */
public static ParserPool getParserPool() {
  return providerRegistry.getParserPool();
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Deregister an attribute as having a type of ID.
 * 
 * @param attributeName the QName of the ID attribute to be de-registered
 */
public static void deregisterIDAttribute(QName attributeName) {
  ConfigurationService.get(XMLObjectProviderRegistry.class).deregisterIDAttribute(attributeName);
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Removes the builder, marshaller, and unmarshaller registered to the given key.
 * 
 * @param key the key of the builder, marshaller, and unmarshaller to be removed
 */
public static void deregisterObjectProvider(@Nonnull final QName key) {
  XMLObjectProviderRegistry registry = ConfigurationService.get(XMLObjectProviderRegistry.class);
  registry.getBuilderFactory().deregisterBuilder(key);
  registry.getMarshallerFactory().deregisterMarshaller(key);
  registry.getUnmarshallerFactory().deregisterUnmarshaller(key);
}

代码示例来源:origin: org.pac4j/pac4j-saml

@Override
public void configure() {
  XMLObjectProviderRegistry registry;
  synchronized (ConfigurationService.class) {
    registry = ConfigurationService.get(XMLObjectProviderRegistry.class);
    if (registry == null) {
      registry = new XMLObjectProviderRegistry();
      ConfigurationService.register(XMLObjectProviderRegistry.class, registry);
    }
  }
  try {
    InitializationService.initialize();
  } catch (final InitializationException e) {
    throw new RuntimeException("Exception initializing OpenSAML", e);
  }
  ParserPool parserPool = initParserPool();
  registry.setParserPool(parserPool);
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Set the currently configured ParserPool instance.
 * 
 * @param newParserPool the new ParserPool instance to configure
 */
public static void setParserPool(@Nullable final ParserPool newParserPool) {
  ConfigurationService.get(XMLObjectProviderRegistry.class).setParserPool(newParserPool);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

if (reg == null) {
  log.debug("XMLObjectProviderRegistry did not exist in ConfigurationService, will be created");
  reg = new XMLObjectProviderRegistry();
  ConfigurationService.register(XMLObjectProviderRegistry.class, reg);

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Gets the XMLObject builder factory that has been configured with information from loaded configuration files.
 * 
 * @return the XMLObject builder factory
 */
public static XMLObjectBuilderFactory getBuilderFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getBuilderFactory();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
 * Gets the XMLObject unmarshaller factory that has been configured with information from loaded configuration
 * files.
 * 
 * @return the XMLObject unmarshaller factory
 */
public static UnmarshallerFactory getUnmarshallerFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getUnmarshallerFactory();
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Gets the XMLObject marshaller factory that has been configured with information from loaded configuration files.
 * 
 * @return the XMLObject marshaller factory
 */
public static MarshallerFactory getMarshallerFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getMarshallerFactory();
}

代码示例来源:origin: org.opensaml/opensaml-core

final Unmarshaller unmarshaller = (Unmarshaller) createClassInstance(configuration);
getRegistry().registerObjectProvider(objectProviderName, builder, marshaller, unmarshaller);
log.error("Error initializing object provier {}", objectProvider, e);
getRegistry().deregisterObjectProvider(objectProviderName);
throw e;

代码示例来源:origin: org.opensaml/opensaml-core

/** {@inheritDoc} */
public void init() throws InitializationException {
  BasicParserPool pp = new BasicParserPool();
  pp.setMaxPoolSize(50);
  try {
    pp.initialize();
  } catch (ComponentInitializationException e) {
    throw new InitializationException("Error initializing parser pool", e);
  }
  
  XMLObjectProviderRegistry registry = null;
  synchronized(ConfigurationService.class) {
    registry = ConfigurationService.get(XMLObjectProviderRegistry.class);
    if (registry == null) {
      log.debug("XMLObjectProviderRegistry did not exist in ConfigurationService, will be created");
      registry = new XMLObjectProviderRegistry();
      ConfigurationService.register(XMLObjectProviderRegistry.class, registry);
    }
  }
  
  registry.setParserPool(pp);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
 * Removes the builder, marshaller, and unmarshaller registered to the given key.
 * 
 * @param key the key of the builder, marshaller, and unmarshaller to be removed
 */
public static void deregisterObjectProvider(@Nonnull final QName key) {
  XMLObjectProviderRegistry registry = ConfigurationService.get(XMLObjectProviderRegistry.class);
  registry.getBuilderFactory().deregisterBuilder(key);
  registry.getMarshallerFactory().deregisterMarshaller(key);
  registry.getUnmarshallerFactory().deregisterUnmarshaller(key);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
 * Set the currently configured ParserPool instance.
 * 
 * @param newParserPool the new ParserPool instance to configure
 */
public static void setParserPool(@Nullable final ParserPool newParserPool) {
  ConfigurationService.get(XMLObjectProviderRegistry.class).setParserPool(newParserPool);
}

代码示例来源:origin: org.opensaml/opensaml-core

if (reg == null) {
  log.debug("XMLObjectProviderRegistry did not exist in ConfigurationService, will be created");
  reg = new XMLObjectProviderRegistry();
  ConfigurationService.register(XMLObjectProviderRegistry.class, reg);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
 * Gets the XMLObject builder factory that has been configured with information from loaded configuration files.
 * 
 * @return the XMLObject builder factory
 */
public static XMLObjectBuilderFactory getBuilderFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getBuilderFactory();
}

代码示例来源:origin: org.opensaml/opensaml-core

/**
 * Gets the XMLObject unmarshaller factory that has been configured with information from loaded configuration
 * files.
 * 
 * @return the XMLObject unmarshaller factory
 */
public static UnmarshallerFactory getUnmarshallerFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getUnmarshallerFactory();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/**
 * Gets the XMLObject marshaller factory that has been configured with information from loaded configuration files.
 * 
 * @return the XMLObject marshaller factory
 */
public static MarshallerFactory getMarshallerFactory() {
  return ConfigurationService.get(XMLObjectProviderRegistry.class).getMarshallerFactory();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

final Unmarshaller unmarshaller = (Unmarshaller) createClassInstance(configuration);
getRegistry().registerObjectProvider(objectProviderName, builder, marshaller, unmarshaller);
log.error("Error initializing object provier {}", objectProvider, e);
getRegistry().deregisterObjectProvider(objectProviderName);
throw e;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml

/** {@inheritDoc} */
public void init() throws InitializationException {
  BasicParserPool pp = new BasicParserPool();
  pp.setMaxPoolSize(50);
  try {
    pp.initialize();
  } catch (ComponentInitializationException e) {
    throw new InitializationException("Error initializing parser pool", e);
  }
  
  XMLObjectProviderRegistry registry = null;
  synchronized(ConfigurationService.class) {
    registry = ConfigurationService.get(XMLObjectProviderRegistry.class);
    if (registry == null) {
      log.debug("XMLObjectProviderRegistry did not exist in ConfigurationService, will be created");
      registry = new XMLObjectProviderRegistry();
      ConfigurationService.register(XMLObjectProviderRegistry.class, registry);
    }
  }
  
  registry.setParserPool(pp);
}

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