本文整理汇总了Java中org.littleshoot.proxy.HttpFiltersSource类的典型用法代码示例。如果您正苦于以下问题:Java HttpFiltersSource类的具体用法?Java HttpFiltersSource怎么用?Java HttpFiltersSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HttpFiltersSource类属于org.littleshoot.proxy包,在下文中一共展示了HttpFiltersSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BrowserMobHttpFilterChain
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public BrowserMobHttpFilterChain(BrowserMobProxyServer proxyServer, HttpRequest originalRequest, ChannelHandlerContext ctx) {
super(originalRequest, ctx);
this.proxyServer = proxyServer;
if (proxyServer.getFilterFactories() != null) {
filters = new ArrayList<>(proxyServer.getFilterFactories().size());
// instantiate all HttpFilters using the proxy's filter factories
for (HttpFiltersSource filterFactory : proxyServer.getFilterFactories()) {
HttpFilters filter = filterFactory.filterRequest(originalRequest, ctx);
// allow filter factories to avoid adding a filter on a per-request basis by returning a null
// HttpFilters instance
if (filter != null) {
filters.add(filter);
}
}
} else {
filters = Collections.emptyList();
}
}
示例2: DefaultHttpProxyServer
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private DefaultHttpProxyServer(String name,
TransportProtocol transportProtocol,
InetSocketAddress address,
SslEngineSource sslEngineSource,
boolean authenticateSslClients,
ProxyAuthenticator proxyAuthenticator,
ChainedProxyManager chainProxyManager,
MitmManager mitmManager,
HttpFiltersSource filterSource,
boolean useDnsSec,
boolean transparent,
int idleConnectionTimeout,
Collection<ActivityTracker> activityTrackers) {
this(new ServerGroup(name), transportProtocol, address,
sslEngineSource, authenticateSslClients, proxyAuthenticator,
chainProxyManager,
mitmManager, filterSource, useDnsSec, transparent,
idleConnectionTimeout, activityTrackers);
}
示例3: getMaximumRequestBufferSize
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private int getMaximumRequestBufferSize() {
int maxBufferSize = 0;
for (HttpFiltersSource source : filterFactories) {
int requestBufferSize = source.getMaximumRequestBufferSizeInBytes();
if (requestBufferSize > maxBufferSize) {
maxBufferSize = requestBufferSize;
}
}
return maxBufferSize;
}
示例4: getMaximumResponseBufferSize
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private int getMaximumResponseBufferSize() {
int maxBufferSize = 0;
for (HttpFiltersSource source : filterFactories) {
int requestBufferSize = source.getMaximumResponseBufferSizeInBytes();
if (requestBufferSize > maxBufferSize) {
maxBufferSize = requestBufferSize;
}
}
return maxBufferSize;
}
示例5: DefaultHttpProxyServerBootstrap
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private DefaultHttpProxyServerBootstrap(
ServerGroup serverGroup,
TransportProtocol transportProtocol,
InetSocketAddress requestedAddress,
SslEngineSource sslEngineSource,
boolean authenticateSslClients,
ProxyAuthenticator proxyAuthenticator,
ChainedProxyManager chainProxyManager,
MitmManager mitmManager,
HttpFiltersSource filtersSource,
boolean transparent, int idleConnectionTimeout,
Collection<ActivityTracker> activityTrackers,
int connectTimeout, HostResolver serverResolver,
long readThrottleBytesPerSecond,
long writeThrottleBytesPerSecond,
InetSocketAddress localAddress,
String proxyAlias) {
this.serverGroup = serverGroup;
this.transportProtocol = transportProtocol;
this.requestedAddress = requestedAddress;
this.port = requestedAddress.getPort();
this.sslEngineSource = sslEngineSource;
this.authenticateSslClients = authenticateSslClients;
this.proxyAuthenticator = proxyAuthenticator;
this.chainProxyManager = chainProxyManager;
this.mitmManager = mitmManager;
this.filtersSource = filtersSource;
this.transparent = transparent;
this.idleConnectionTimeout = idleConnectionTimeout;
if (activityTrackers != null) {
this.activityTrackers.addAll(activityTrackers);
}
this.connectTimeout = connectTimeout;
this.serverResolver = serverResolver;
this.readThrottleBytesPerSecond = readThrottleBytesPerSecond;
this.writeThrottleBytesPerSecond = writeThrottleBytesPerSecond;
this.localAddress = localAddress;
this.proxyAlias = proxyAlias;
}
示例6: DefaultHttpProxyServerBootstrap
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private DefaultHttpProxyServerBootstrap(
DefaultHttpProxyServer original,
TransportProtocol transportProtocol,
InetSocketAddress requestedAddress,
SslEngineSource sslEngineSource,
boolean authenticateSslClients,
ProxyAuthenticator proxyAuthenticator,
ChainedProxyManager chainProxyManager,
MitmManager mitmManager,
HttpFiltersSource filtersSource,
boolean transparent, int idleConnectionTimeout,
Collection<ActivityTracker> activityTrackers,
int connectTimeout, HostResolver serverResolver,
long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond) {
this.original = original;
this.transportProtocol = transportProtocol;
this.requestedAddress = requestedAddress;
this.port = requestedAddress.getPort();
this.sslEngineSource = sslEngineSource;
this.authenticateSslClients = authenticateSslClients;
this.proxyAuthenticator = proxyAuthenticator;
this.chainProxyManager = chainProxyManager;
this.filtersSource = filtersSource;
this.transparent = transparent;
this.idleConnectionTimeout = idleConnectionTimeout;
if (activityTrackers != null) {
this.activityTrackers.addAll(activityTrackers);
}
this.connectTimeout = connectTimeout;
this.serverResolver = serverResolver;
this.readThrottleBytesPerSecond = readThrottleBytesPerSecond;
this.writeThrottleBytesPerSecond = writeThrottleBytesPerSecond;
}
示例7: DefaultHttpProxyServerBootstrap
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
private DefaultHttpProxyServerBootstrap(
DefaultHttpProxyServer original,
TransportProtocol transportProtocol,
InetSocketAddress address,
SslEngineSource sslEngineSource,
boolean authenticateSslClients,
ProxyAuthenticator proxyAuthenticator,
ChainedProxyManager chainProxyManager,
MitmManager mitmManager,
HttpFiltersSource filtersSource, boolean useDnsSec,
boolean transparent, int idleConnectionTimeout,
Collection<ActivityTracker> activityTrackers) {
this.original = original;
this.transportProtocol = transportProtocol;
this.address = address;
this.port = address.getPort();
this.sslEngineSource = sslEngineSource;
this.authenticateSslClients = authenticateSslClients;
this.proxyAuthenticator = proxyAuthenticator;
this.chainProxyManager = chainProxyManager;
this.filtersSource = filtersSource;
this.useDnsSec = useDnsSec;
this.transparent = transparent;
this.idleConnectionTimeout = idleConnectionTimeout;
if (activityTrackers != null) {
this.activityTrackers.addAll(activityTrackers);
}
}
示例8: addFirstHttpFilterFactory
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public void addFirstHttpFilterFactory(HttpFiltersSource filterFactory) {
filterFactories.add(0, filterFactory);
}
示例9: addLastHttpFilterFactory
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public void addLastHttpFilterFactory(HttpFiltersSource filterFactory) {
filterFactories.add(filterFactory);
}
示例10: addHttpFilterFactory
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public void addHttpFilterFactory(HttpFiltersSource filterFactory) {
filterFactories.add(filterFactory);
}
示例11: getFilterFactories
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public List<HttpFiltersSource> getFilterFactories() {
return filterFactories;
}
示例12: getFiltersSource
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public HttpFiltersSource getFiltersSource() {
return filtersSource;
}
示例13: withFiltersSource
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public HttpProxyServerBootstrap withFiltersSource(
HttpFiltersSource filtersSource) {
this.filtersSource = filtersSource;
return this;
}
示例14: addFirstHttpFilterFactory
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
/**
* Adds a new filter factory (request/response interceptor) to the beginning of the HttpFilters chain.
* <p/>
* <b>Usage note:</b> The actual filter (interceptor) instance is created on every request by implementing the
* {@link HttpFiltersSource#filterRequest(io.netty.handler.codec.http.HttpRequest, io.netty.channel.ChannelHandlerContext)} method and returning an
* {@link org.littleshoot.proxy.HttpFilters} instance (typically, a subclass of {@link org.littleshoot.proxy.HttpFiltersAdapter}).
* To disable or bypass a filter on a per-request basis, the filterRequest() method may return null.
*
* @param filterFactory factory to generate HttpFilters
*/
void addFirstHttpFilterFactory(HttpFiltersSource filterFactory);
示例15: addLastHttpFilterFactory
import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
/**
* Adds a new filter factory (request/response interceptor) to the end of the HttpFilters chain.
* <p/>
* <b>Usage note:</b> The actual filter (interceptor) instance is created on every request by implementing the
* {@link HttpFiltersSource#filterRequest(io.netty.handler.codec.http.HttpRequest, io.netty.channel.ChannelHandlerContext)} method and returning an
* {@link org.littleshoot.proxy.HttpFilters} instance (typically, a subclass of {@link org.littleshoot.proxy.HttpFiltersAdapter}).
* To disable or bypass a filter on a per-request basis, the filterRequest() method may return null.
*
* @param filterFactory factory to generate HttpFilters
*/
void addLastHttpFilterFactory(HttpFiltersSource filterFactory);