org.jboss.marshalling.Marshalling.loadMarshallerFactory()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(12.4k)|赞(0)|评价(0)|浏览(134)

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

Marshalling.loadMarshallerFactory介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

代码示例来源:origin: wildfly/wildfly

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: wildfly/wildfly

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

代码示例来源:origin: org.jboss.marshalling/jboss-marshalling-osgi

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

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

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory which is visible to this implementation, by name.  Uses the class loader of this API.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 */
public static MarshallerFactory getProvidedMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, Marshalling.class.getClassLoader());
    }
  }), name);
}

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

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: org.jboss.marshalling/jboss-marshalling-osgi

/**
 * Get a marshaller factory, by name.  Uses the given classloader to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @param classLoader the class loader to use
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 */
public static MarshallerFactory getMarshallerFactory(final String name, final ClassLoader classLoader) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class, classLoader);
    }
  }), name);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

代码示例来源:origin: org.jboss.marshalling/jboss-marshalling-osgi

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

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

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/**
 * Get a marshaller factory, by name.  Uses the thread's current context classloader, if available, to locate
 * the factory.
 *
 * @param name the name of the protocol to acquire
 * @return the marshaller factory, or {@code null} if no matching factory was found
 *
 * @see ServiceLoader
 *
 * @deprecated It is recommended that you use {@link #getProvidedMarshallerFactory(String)} instead; using the context
 * class loader to find a marshalling implementation is risky at best as the user may have just about anything on their
 * class path.
 */
@Deprecated
public static MarshallerFactory getMarshallerFactory(final String name) {
  return loadMarshallerFactory(doPrivileged(new PrivilegedAction<ServiceLoader<ProviderDescriptor>>() {
    public ServiceLoader<ProviderDescriptor> run() {
      return ServiceLoader.load(ProviderDescriptor.class);
    }
  }), name);
}

相关文章