當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。