當前位置: 首頁>>代碼示例>>Java>>正文


Java ContainerRequestFilter類代碼示例

本文整理匯總了Java中com.sun.jersey.spi.container.ContainerRequestFilter的典型用法代碼示例。如果您正苦於以下問題:Java ContainerRequestFilter類的具體用法?Java ContainerRequestFilter怎麽用?Java ContainerRequestFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ContainerRequestFilter類屬於com.sun.jersey.spi.container包,在下文中一共展示了ContainerRequestFilter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
  return LOWER_CASE;
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:5,代碼來源:ParamFilter.java

示例2: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public ContainerRequestFilter getRequestFilter() {
    return this;
}
 
開發者ID:personium,項目名稱:personium-core,代碼行數:8,代碼來源:WriteMethodFilter.java

示例3: bindContainerRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
public static LinkedBindingBuilder<ContainerRequestFilter> bindContainerRequestFilter(Binder binder)
{
  Multibinder<ContainerRequestFilter> requestFilterBinder = Multibinder.newSetBinder(binder, ContainerRequestFilter.class);
  return requestFilterBinder.addBinding();
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Mesos,代碼行數:6,代碼來源:JerseyBinder.java

示例4: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
    return this;
}
 
開發者ID:bazaarvoice,項目名稱:emodb,代碼行數:5,代碼來源:ConcurrentRequestsThrottlingFilter.java

示例5: setupResourceTestRule

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
protected static ResourceTestRule setupResourceTestRule(List<Object> resourceList, List<Object> filters,
                                                        AuthIdentityManager<ApiKey> authIdentityManager,
                                                        PermissionManager permissionManager) {
    ResourceTestRule.Builder resourceTestRuleBuilder = ResourceTestRule.builder();

    for (Object resource : resourceList) {
        resourceTestRuleBuilder.addResource(resource);
    }

    List<ResourceFilterFactory> resourceFilterFactories = Lists.newArrayList();
    List<ContainerRequestFilter> containerRequestFilters = Lists.newArrayList();
    List<ContainerResponseFilter> containerResponseFilters = Lists.newArrayList();

    for (Object filter : filters) {
        if (filter instanceof ResourceFilterFactory) {
            resourceFilterFactories.add((ResourceFilterFactory) filter);
        }
        if (filter instanceof ContainerRequestFilter) {
            containerRequestFilters.add((ContainerRequestFilter) filter);
        }
        if (filter instanceof ContainerResponseFilter) {
            containerResponseFilters.add((ContainerResponseFilter) filter);
        }
    }

    resourceTestRuleBuilder.addProperty(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES, resourceFilterFactories);
    resourceTestRuleBuilder.addProperty(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, containerRequestFilters);
    resourceTestRuleBuilder.addProperty(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, containerResponseFilters);

    // Jersey tests don't inject Context parameters, so create an injector to provide a mock instance.
    resourceTestRuleBuilder.addProvider(new DatabusJerseyTest.ContextInjectableProvider<>(HttpServletRequest.class, mock(HttpServletRequest.class)));

    ResourceTestAuthUtil.setUpResources(resourceTestRuleBuilder, SecurityManagerBuilder.create()
            .withAuthIdentityReader(authIdentityManager)
            .withPermissionReader(permissionManager)
            .build());

    for (Object mapper : ExceptionMappers.getMappers()) {
        resourceTestRuleBuilder.addProvider(mapper);
    }
    for (Class mapperType : ExceptionMappers.getMapperTypes()) {
        resourceTestRuleBuilder.addProvider(mapperType);
    }

    ResourceTestRule resourceTestRule = resourceTestRuleBuilder.build();

    // Write Date objects using ISO8601 strings instead of numeric milliseconds-since-1970.
    SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
    fmt.setTimeZone(TimeZone.getTimeZone("GMT"));
    resourceTestRule.getObjectMapper().setDateFormat(fmt);

    return resourceTestRule;
}
 
開發者ID:bazaarvoice,項目名稱:emodb,代碼行數:54,代碼來源:ResourceTest.java

示例6: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
/**
 * @return null
 */
@Override
public ContainerRequestFilter getRequestFilter() {
  return null;
}
 
開發者ID:DevStreet,項目名稱:FinanceAnalytics,代碼行數:8,代碼來源:MasterSubscriptionFilter.java

示例7: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
  return null;
}
 
開發者ID:DevStreet,項目名稱:FinanceAnalytics,代碼行數:5,代碼來源:TestFilterFactory.java

示例8: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
public ContainerRequestFilter getRequestFilter()
{
    return this;
}
 
開發者ID:edgehosting,項目名稱:jira-dvcs-connector,代碼行數:5,代碼來源:AdminOnlyResourceFilter.java

示例9: addJerseyRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
public <T extends ContainerRequestFilter> ODataJerseyServer addJerseyRequestFilter(Class<T> filter) {
  jerseyRequestFilters.add(filter.getName());
  return this;
}
 
開發者ID:teiid,項目名稱:oreva,代碼行數:5,代碼來源:ODataJerseyServer.java

示例10: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
	return this;
}
 
開發者ID:HuygensING,項目名稱:elaborate4-backend,代碼行數:5,代碼來源:LoggingResourceFilter.java

示例11: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
    return null;
}
 
開發者ID:autermann,項目名稱:jersey-cache-control,代碼行數:5,代碼來源:CacheControlFilterFactory.java

示例12: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
	return ApplicationContextHolder.getApplicationContext().getBean(SecurityFilter.class);
}
 
開發者ID:PE-INTERNATIONAL,項目名稱:soda4lca,代碼行數:5,代碼來源:SecuredResourceFilterFactory.java

示例13: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
    // don't filter requests
    return null;
}
 
開發者ID:palominolabs,項目名稱:jersey-new-relic,代碼行數:6,代碼來源:NewRelicMappedThrowableResourceFilter.java

示例14: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
public ContainerRequestFilter getRequestFilter() {
	return this;
}
 
開發者ID:Netflix,項目名稱:staash,代碼行數:4,代碼來源:StaashAuditFilter.java

示例15: getRequestFilter

import com.sun.jersey.spi.container.ContainerRequestFilter; //導入依賴的package包/類
@Override
public ContainerRequestFilter getRequestFilter() {
    return request == null || !validateRequests ? null
           : new JSONSchemaRequestFilter(request);
}
 
開發者ID:enviroCar,項目名稱:enviroCar-server,代碼行數:6,代碼來源:JSONSchemaResourceFilterFactory.java


注:本文中的com.sun.jersey.spi.container.ContainerRequestFilter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。