当前位置: 首页>>代码示例>>Java>>正文


Java HttpFiltersSource类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:22,代码来源:BrowserMobHttpFilterChain.java

示例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);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:20,代码来源:DefaultHttpProxyServer.java

示例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;
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:12,代码来源:BrowserMobProxyServer.java

示例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;
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:12,代码来源:BrowserMobProxyServer.java

示例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;
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:40,代码来源:DefaultHttpProxyServer.java

示例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;
}
 
开发者ID:Elitward,项目名称:LittleProxy,代码行数:34,代码来源:DefaultHttpProxyServer.java

示例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);
    }
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:29,代码来源:DefaultHttpProxyServer.java

示例8: addFirstHttpFilterFactory

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public void addFirstHttpFilterFactory(HttpFiltersSource filterFactory) {
    filterFactories.add(0, filterFactory);
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:5,代码来源:BrowserMobProxyServer.java

示例9: addLastHttpFilterFactory

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public void addLastHttpFilterFactory(HttpFiltersSource filterFactory) {
    filterFactories.add(filterFactory);
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:5,代码来源:BrowserMobProxyServer.java

示例10: addHttpFilterFactory

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public void addHttpFilterFactory(HttpFiltersSource filterFactory) {
    filterFactories.add(filterFactory);
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:4,代码来源:BrowserMobProxyServer.java

示例11: getFilterFactories

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public List<HttpFiltersSource> getFilterFactories() {
    return filterFactories;
}
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:4,代码来源:BrowserMobProxyServer.java

示例12: getFiltersSource

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
public HttpFiltersSource getFiltersSource() {
    return filtersSource;
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:4,代码来源:DefaultHttpProxyServer.java

示例13: withFiltersSource

import org.littleshoot.proxy.HttpFiltersSource; //导入依赖的package包/类
@Override
public HttpProxyServerBootstrap withFiltersSource(
        HttpFiltersSource filtersSource) {
    this.filtersSource = filtersSource;
    return this;
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:7,代码来源:DefaultHttpProxyServer.java

示例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);
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:12,代码来源:BrowserMobProxy.java

示例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);
 
开发者ID:misakuo,项目名称:Dream-Catcher,代码行数:12,代码来源:BrowserMobProxy.java


注:本文中的org.littleshoot.proxy.HttpFiltersSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。