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


Java ResteasyProviderFactory.getInstance方法代码示例

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


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

示例1: contextInitialized

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
public void contextInitialized(ServletContextEvent event) {
    super.contextInitialized(event);

    ResteasyProviderFactory dispatcher = ResteasyProviderFactory.getInstance();

    dispatcher.registerProvider(OctetStreamWriter.class, false);
    dispatcher.registerProvider(PlainTextReader.class, false);

    restRuntime = new RestRuntime();

    initPortalConfiguration(event);

    restRuntime.start(dispatcher,
                      findConfigurationFile(event.getServletContext(), "log4j.properties"),
                      findConfigurationFile(event.getServletContext(),
                                            File.separator + "config" + File.separator + "network" +
                                                                       File.separator + "server.ini"));
}
 
开发者ID:ow2-proactive,项目名称:scheduling,代码行数:19,代码来源:MyResteasyBootstrap.java

示例2: init

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
@Override
public void init(ConnectionInfo connectionInfo) throws Exception {
    HttpClient client = new HttpClientBuilder().insecure(connectionInfo.isInsecure()).useSystemProperties().build();
    SchedulerRestClient restApiClient = new SchedulerRestClient(connectionInfo.getUrl(),
                                                                new ApacheHttpClient4Engine(client));

    ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
    factory.register(new WildCardTypeReader());
    factory.register(new OctetStreamReader());
    factory.register(new TaskResultReader());

    setApiClient(restApiClient);

    this.connectionInfo = connectionInfo;
    this.initialized = true;

    renewSession();
}
 
开发者ID:ow2-proactive,项目名称:scheduling,代码行数:19,代码来源:SchedulerClient.java

示例3: doRestCall

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
/**
 * Get the deployment URL, create the RestEasy Client Proxy Invoker for the given TestMethod and return the result.
 * 
 * @param testMethod
 * @param httpMethods
 * @return
 */
private Response doRestCall(Method testMethod, Set<String> httpMethods)
{
    URI baseUri = getBaseURL();
    ClientExecutor executor = ClientRequest.getDefaultExecutor();
    ResteasyProviderFactory providerFactory = ResteasyProviderFactory.getInstance();
    providerFactory.addBuiltInMessageBodyWriter(MyHeaderDecorator.class);
    EntityExtractorFactory extractorFactory = new DefaultEntityExtractorFactory();

    ArqClientInvoker invoker = new ArqClientInvoker(baseUri, testMethod.getDeclaringClass(), testMethod, providerFactory, executor,
                extractorFactory);
    invoker.getAttributes().putAll(new HashMap<String, Object>());

    ClientInvokerInterceptorFactory.applyDefaultInterceptors(invoker, providerFactory, testMethod.getDeclaringClass(), testMethod);
    invoker.setHttpMethod(httpMethods.iterator().next());

    return invoker.request(new Object[] { null });
}
 
开发者ID:windup,项目名称:windup-rulesets,代码行数:25,代码来源:RestInvoker.java

示例4: SchedulerRestClient

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
public SchedulerRestClient(String restEndpointURL, ClientHttpEngine httpEngine) {
    this.restEndpointURL = restEndpointURL;
    this.httpEngine = httpEngine;

    providerFactory = ResteasyProviderFactory.getInstance();
    if (!providerFactory.isRegistered(JacksonContextResolver.class)) {
        providerFactory.registerProvider(JacksonContextResolver.class);
    }

    scheduler = createRestProxy(providerFactory, restEndpointURL, httpEngine);
}
 
开发者ID:ow2-proactive,项目名称:scheduling,代码行数:12,代码来源:SchedulerRestClient.java

示例5: initialise

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
/**
 * Register Exception Mappers
 */
@PostConstruct
public void initialise() {
    if(!configurationService.getBooleanConfiguration("testing.enabled", false)) {
        ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
        register(factory);
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:11,代码来源:ExceptionMapperServiceImpl.java

示例6: ResteasyClientFactoryImpl

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
@Inject
public ResteasyClientFactoryImpl(final ShutdownManager manager,
                                 final RemoteExceptionClientResponseFilter remoteExceptionClientResponseFilter,
                                 final JAXBContextResolver jaxbContextResolver)
{
	this.resteasyProviderFactory = ResteasyProviderFactory.getInstance();
	resteasyProviderFactory.registerProviderInstance(jaxbContextResolver);

	// Register the joda param converters
	resteasyProviderFactory.registerProviderInstance(new CommonTypesParamConverterProvider());

	// Register the LogReport reader
	// TODO find a better way to handle registration for external applications?
	resteasyProviderFactory.registerProviderInstance(new LogReportMessageBodyWriter());

	// Register the exception processor
	if (remoteExceptionClientResponseFilter != null)
		resteasyProviderFactory.registerProviderInstance(remoteExceptionClientResponseFilter);

	// Set up the Connection Manager
	this.connectionManager = new PoolingHttpClientConnectionManager();
	connectionManager.setDefaultMaxPerRoute(maxConnectionsPerRoute);
	connectionManager.setMaxTotal(maxConnectionsTotal);

	if (manager != null)
		manager.register(this);
}
 
开发者ID:petergeneric,项目名称:stdlib,代码行数:28,代码来源:ResteasyClientFactoryImpl.java

示例7: setUp

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
/** Setup the test environment. */
protected void setUp() {

	ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
	factory.addMessageBodyReader(new JacksonJsonProvider());

	RegisterBuiltin.register(factory);
}
 
开发者ID:n-moser,项目名称:Conference,代码行数:9,代码来源:ResourceTest.java

示例8: createTokenService

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
TokenService createTokenService() {
    ResteasyProviderFactory pf = ResteasyProviderFactory.getInstance();
    pf.addClientErrorInterceptor(clientErrorInterceptor);
    return ProxyFactory.create(TokenService.class,
                               config.getServerUrl());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:7,代码来源:AuthTokenManager.java

示例9: getInstance

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
public ResteasyProviderFactory getInstance() {
    if (instance == null) {
        instance = ResteasyProviderFactory.getInstance();
    }
    return this.instance;
}
 
开发者ID:jurgendl,项目名称:hql-builder,代码行数:7,代码来源:ResteasyProvidersBean.java

示例10: initialize

import org.jboss.resteasy.spi.ResteasyProviderFactory; //导入方法依赖的package包/类
@PostConstruct
protected void initialize() {
    ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();

    register(factory);
}
 
开发者ID:apache,项目名称:marmotta,代码行数:7,代码来源:InterceptorServiceImpl.java


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