本文整理匯總了Java中com.sun.jersey.spi.container.ContainerResponseFilter類的典型用法代碼示例。如果您正苦於以下問題:Java ContainerResponseFilter類的具體用法?Java ContainerResponseFilter怎麽用?Java ContainerResponseFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ContainerResponseFilter類屬於com.sun.jersey.spi.container包,在下文中一共展示了ContainerResponseFilter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return null;
}
示例2: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public ContainerResponseFilter getResponseFilter() {
// do nothing.
return null;
}
示例3: bindContainerResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
public static LinkedBindingBuilder<ContainerResponseFilter> bindContainerResponseFilter(Binder binder)
{
Multibinder<ContainerResponseFilter> responseFilterBinder = Multibinder.newSetBinder(binder, ContainerResponseFilter.class);
return responseFilterBinder.addBinding();
}
示例4: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return this;
}
示例5: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return null;
}
示例6: setupResourceTestRule
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的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;
}
示例7: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
/**
* @return A {@link ResponseFilter}
*/
@Override
public ContainerResponseFilter getResponseFilter() {
return new ResponseFilter(_masterTypes);
}
示例8: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
/**
* @return A {@link ResponseFilter} for setting up the subscription
*/
@Override
public ContainerResponseFilter getResponseFilter() {
return new ResponseFilter(_uidParamNames);
}
示例9: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return new TestResponseFilter();
}
示例10: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
public ContainerResponseFilter getResponseFilter()
{
return null;
}
示例11: addJerseyResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
public <T extends ContainerResponseFilter> ODataJerseyServer addJerseyResponseFilter(Class<T> filter) {
jerseyResponseFilters.add(filter.getName());
return this;
}
示例12: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return this;
}
示例13: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
return null;
}
示例14: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
@Override
public ContainerResponseFilter getResponseFilter() {
// don't filter responses
return null;
}
示例15: getResponseFilter
import com.sun.jersey.spi.container.ContainerResponseFilter; //導入依賴的package包/類
public ContainerResponseFilter getResponseFilter() {
return this;
}