本文整理汇总了Java中org.jboss.resteasy.plugins.providers.RegisterBuiltin类的典型用法代码示例。如果您正苦于以下问题:Java RegisterBuiltin类的具体用法?Java RegisterBuiltin怎么用?Java RegisterBuiltin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RegisterBuiltin类属于org.jboss.resteasy.plugins.providers包,在下文中一共展示了RegisterBuiltin类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendInquiry
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
public String sendInquiry(RentalOrder entityOrder, String processInstanceID) {
// parse RentalOrder object to Order object (which represents the agreed upon JSON format)
System.out.println("PARSING SENDING OBJECT");
User user = parseUser(entityOrder);
Collection<org.camunda.bpm.bvis.rest.send.dto.Car> cars = parseCars(entityOrder);
org.camunda.bpm.bvis.rest.send.dto.Insurance insurance = parseInsurance(entityOrder);
Order order = parseOrder(cars, insurance, user, entityOrder);
ContractDetailsDTO contractDetails = new ContractDetailsDTO();
contractDetails.setOrder(order);
contractDetails.setProcessinstance_id_bvis(processInstanceID);
System.out.println("SENDING OBJECT SUCCESSFULLY PARSED");
System.out.println("SENDING PARSED OBJECT ORDER ID: " + contractDetails.getOrder().getOrder_id());
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
ResteasyWebTarget target = new ResteasyClientBuilder().build().target(BASE_URI);
SendInquiryClient senderClient = target.proxy(SendInquiryClient.class);
String result = senderClient.sendInquiry(contractDetails);
return result;
}
开发者ID:derursm,项目名称:bvis,代码行数:20,代码来源:SendInquiry.java
示例2: sendContractConfirmation
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
public String sendContractConfirmation(RentalOrder entityOrder, String processInstanceIDBVIS,
String processInstanceIDCapitol, int contractStatus) {
ContractConfirmationDTO contractConfirmation = new ContractConfirmationDTO();
contractConfirmation.setProcessinstance_id_capitol(processInstanceIDBVIS);
contractConfirmation.setProcessinstance_id_capitol(processInstanceIDCapitol);
ContractConfirmationOrder order = new ContractConfirmationOrder();
order.setOrder_id(entityOrder.getOrderID());
order.setRequest_date(entityOrder.getRequestDate());
order.setContract_status(contractStatus);
contractConfirmation.setOrder(order);
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
ResteasyWebTarget target = new ResteasyClientBuilder().build().target(BASE_URI);
SendContractConfirmationClient senderClient = target.proxy(SendContractConfirmationClient.class);
String result = senderClient.sendClaim(contractConfirmation);
return result;
}
开发者ID:derursm,项目名称:bvis,代码行数:18,代码来源:SendContractConfirmation.java
示例3: ServerRuntime
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
public ServerRuntime(Options options,
GuiceResteasyBootstrapServletContextListener resteasyContextListener,
SwaggerServletContextListener swaggerContextListener,
HttpServletDispatcher httpServletDispatcher,
SecurityHandler securityHandler,
@Named("system.environment") String environment,
@Named("systemRuntime.resourceDir") String resourceDir) {
this.options = options;
this.resteasyContextListener = resteasyContextListener;
this.swaggerContextListener = swaggerContextListener;
this.httpServletDispatcher = httpServletDispatcher;
this.securityHandler = securityHandler;
this.environment = environment;
this.resourceDir = resourceDir;
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
}
开发者ID:labsai,项目名称:EDDI,代码行数:17,代码来源:ServerRuntime.java
示例4: sendClaim
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
public String sendClaim(org.camunda.bpm.bvis.entities.Claim claim, String processInstanceID) {
ClaimDetailsDTO claimDetails = new ClaimDetailsDTO();
claimDetails.setProcessinstance_id_bvis(processInstanceID);
claimDetails.setRequest_date(Calendar.getInstance());
Collection<Involved_party> involvedParties = this.parseInvolvedParties(claim);
claimDetails.setClaim(this.parseClaim(claim, involvedParties));
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
ResteasyWebTarget target = new ResteasyClientBuilder().build().target(BASE_URI);
SendClaimClient senderClient = target.proxy(SendClaimClient.class);
System.out.println("SENDING CLAIM FOR ORDER ID: " + claimDetails.getClaim().getOrder_id());
String result = senderClient.sendClaim(claimDetails);
return result;
}
开发者ID:derursm,项目名称:bvis,代码行数:14,代码来源:SendClaim.java
示例5: getProducts
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
public static List<String> getProducts(HttpServletRequest request)
{
SkeletonKeySession session = (SkeletonKeySession)request.getAttribute(SkeletonKeySession.class.getName());
ResteasyProviderFactory factory = new ResteasyProviderFactory();
RegisterBuiltin.register(factory);
ResteasyClient client = new ResteasyClientBuilder()
// .providerFactory(factory)
.trustStore(session.getMetadata().getTruststore())
.hostnameVerification(ResteasyClientBuilder.HostnameVerificationPolicy.ANY).build();
try
{
Response response = client.target("https://localhost:8443/database/products").request()
.header(HttpHeaders.AUTHORIZATION, "Bearer " + session.getToken()).get();
return response.readEntity(new GenericType<List<String>>(){});
}
finally
{
client.close();
}
}
开发者ID:resteasy,项目名称:resteasy-examples,代码行数:21,代码来源:ProductDatabaseClient.java
示例6: initializeProviderFactory
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
/**
* Initializes the providerFactory, so that it will be ready for use in Resteasy client proxies later on.
*/
@PostConstruct
public void initializeProviderFactory() {
/*
* This is a fairly annoying process where we have to --manually-- create the provider
* factory. We'd just like to configure the object mapper that the Resteasy provider uses,
* but ... Resteasy will discover the Jackson provider automatically via /META-INF/services
* and load it automatically --before-- we can configure it. Once added, we can't gain
* access to it and Resteasy will reject our customized version. So, we're going to create
* the provider factory from scratch and do the same things that it would do by default, but
* we won't register the built in providers until we've registered our special ones first.
*/
providerFactory = new ResteasyProviderFactory();
final JacksonJsonProvider jacksonProvider = new JacksonJsonProvider();
jacksonProvider.setMapper(BasicObjectMapperProvider.getInstance().getContext(Void.class));
providerFactory.registerProviderInstance(jacksonProvider);
/*
* OK, now that we have customized Jackson we let the built in (automatically discovered)
* providers be added to our providerFactory.
*/
RegisterBuiltin.register(providerFactory);
}
开发者ID:NovaOrdis,项目名称:playground,代码行数:30,代码来源:RestClientFactoryImpl.java
示例7: getProxy
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
/**
* Returns the Snmp proxy Object.
*/
public Snmp getProxy()
{
snmpServiceURL = snmpServiceURL + "/" + deviceIP + "/" + snmpPort + "/";
LOGGER.info( "[SNMP Service REST URL][" + snmpServiceURL + "]" );
ResteasyProviderFactory factory = new ResteasyProviderFactory();
RegisterBuiltin.register( factory );
factory.getClientExecutionInterceptorRegistry().register( new ClientExecutionInterceptor()
{
@Override
public ClientResponse execute( ClientExecutionContext ctx ) throws Exception
{
ClientResponse response = ctx.proceed();
if ( ( "application/xml".equals( response.getHeaders().getFirst( HttpHeaders.CONTENT_TYPE ) ) )
|| ( "text/plain".equals( response.getHeaders().getFirst( HttpHeaders.CONTENT_TYPE ) ) ) )
{
response.getHeaders().putSingle( HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML );
}
return response;
}
} );
this.snmp = ProxyFactory.create( Snmp.class, URI.create( snmpServiceURL ), new ApacheHttpClient4Executor(),
factory );
// this.snmp = ProxyFactory.create( Snmp.class, snmpServiceURL );
return snmp;
}
开发者ID:Comcast,项目名称:cats,代码行数:35,代码来源:SnmpServiceProxy.java
示例8: beforeTest
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
@BeforeTest
public void beforeTest() throws URISyntaxException {
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
final ClientRequestFactory clientRequestFactory = new ClientRequestFactory(
new ApacheHttpClientExecutor(
new HttpClient(new MultiThreadedHttpConnectionManager())
),
new URI("http://localhost:9095/api")
// new URI("http://localhost:8080/device/api")
);
api = clientRequestFactory.createProxy(Api.class);
}
开发者ID:halls,项目名称:wannatrak,代码行数:14,代码来源:ApiIntegrationTest.java
示例9: beforeTest
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
@BeforeTest
public void beforeTest() throws URISyntaxException {
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
final ClientRequestFactory clientRequestFactory = new ClientRequestFactory(
new ApacheHttpClientExecutor(
new HttpClient(new MultiThreadedHttpConnectionManager())
),
// new URI("http://localhost:9095/api")
new URI("http://localhost:8080/device/api")
// new URI("http://www.wannatrak.com/device/api")
);
api = clientRequestFactory.createProxy(Api.class);
trakApi = clientRequestFactory.createProxy(TrakApi.class);
}
开发者ID:halls,项目名称:wannatrak,代码行数:16,代码来源:TrakApiIntegrationTest.java
示例10: setUp
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的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
示例11: setUpBeforeClass
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
/**
* @throws ZooKeeperConnectionException
* @throws MasterNotRunningException
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws MasterNotRunningException, ZooKeeperConnectionException
{
manager = HBaseManager.getInstance(ZOOKEEPER);
HBaseStatisticsTable table = new HBaseStatisticsTable(manager);
assertTrue(table.tableExists(CP));
statistics = new StatisticsTable(table);
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
}
开发者ID:beeldengeluid,项目名称:zieook,代码行数:17,代码来源:StatisticsTableTest.java
示例12: init
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
@BeforeClass
public static void init()
{
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
}
开发者ID:resteasy,项目名称:resteasy-examples,代码行数:6,代码来源:ShoppingTest.java
示例13: processRequest
import org.jboss.resteasy.plugins.providers.RegisterBuiltin; //导入依赖的package包/类
@Override
public void processRequest(String[] args) throws ArgumentValidationException
{
if (!super.confirmYesNo("using server: <" + server + "> is this correct? [yes/no]"))
{
return;
}
options = CliFactory.parseArguments(WorkFlowCLI.class, args);
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
recommender = options.getCollection();
collection = options.getRecommender();
cp = options.getContentProvider();
// type = options.getCollectionType();
// location = options.getCollectionLocation();
// interval = options.getCollectionInterval();
if (options.isContentProvider() || options.isDeleteCP() || options.isShowCP())
{
// content provider stuff:
processContentProvider();
}
else if (options.isCreateCollection() || options.isDeleteCollection() || options.isShowCollection())
{
// collection stuff:
processCollection();
}
else if (options.isCreateRecommender() || options.isDeleteRecommender() || options.isShowRecommender())
{
// recommender stuff:
processRecommender();
}
else if (options.isExecuteStatistics())
{
if (cp.isEmpty())
{
printHelpAndExit("please provide a content provider", WorkFlowCLI.class);
}
else
{
runStatistics(cp);
}
}
{
printHelpAndExit("no valid argument passed", WorkFlowCLI.class);
}
}
开发者ID:beeldengeluid,项目名称:zieook,代码行数:51,代码来源:WorkflowManager.java
注:本文中的org.jboss.resteasy.plugins.providers.RegisterBuiltin类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论