Java ProxyServer.setResponseVolatile方法代码示例

本文整理汇总了Java中net.lightbody.bmp.proxy.ProxyServer.setResponseVolatile方法的典型用法代码示例。如果您正苦于以下问题:Java ProxyServer.setResponseVolatile方法的具体用法?Java ProxyServer.setResponseVolatile怎么用?Java ProxyServer.setResponseVolatile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.lightbody.bmp.proxy.ProxyServer的用法示例。


Java ProxyServer.setResponseVolatile方法代码示例

在下文中一共展示了ProxyServer.setResponseVolatile方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: start

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Override
public void start() {
    try {
        getProperties();
        server.setPort(proxyPort);
        server.start(requestTimeout);
        ProxyServer.setResponseVolatile(responseVolatile);
        ProxyServer.setShouldKeepSslConnectionAlive(shouldKeepSslConnectionAlive);
        server.setCaptureContent(true);
        server.setCaptureBinaryContent(true);
        server.addRequestInterceptor(requestInterceptor);
        server.addResponseInterceptor(responseInterceptor);
    } catch (Exception e) {
        throw new ProxyCannotBeStartedException("Starting the proxy server failed.", e);
    }
} 
开发者ID:epam,项目名称:Wilma,代码行数:17,代码来源:BrowserMobProxy.java

示例2: doGetShouldWriteJsonMessage

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Test
public void doGetShouldWriteJsonMessage() throws ServletException, IOException {
    //GIVEN request and response
    given(resp.getWriter()).willReturn(printWriter);
    ProxyServer.setResponseVolatile(true);
    //WHEN
    underTest.doGet(req, resp);
    //THEN
    verify(resp).setContentType("application/json");
    verify(printWriter).write("{\"responseVolatility\":true}");
} 
开发者ID:epam,项目名称:Wilma,代码行数:12,代码来源:ResponseMessageVolatilityStatusServletTest.java

示例3: doPostShouldCallDoGet

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Test
public void doPostShouldCallDoGet() throws ServletException, IOException {
    //GIVEN request and response
    given(resp.getWriter()).willReturn(printWriter);
    ProxyServer.setResponseVolatile(true);
    //WHEN
    underTest.doPost(req, resp);
    //THEN
    verify(resp).setContentType("application/json");
    verify(printWriter).write("{\"responseVolatility\":true}");
} 
开发者ID:epam,项目名称:Wilma,代码行数:12,代码来源:ResponseMessageVolatilityStatusServletTest.java

示例4: testDoGetShouldTurnResponseVolatilityOff

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Test
public final void testDoGetShouldTurnResponseVolatilityOff() throws ServletException, IOException {
    // GIVEN in setup
    ProxyServer.setResponseVolatile(true);
    // WHEN
    underTest.doGet(request, response);
    // THEN
    Assert.assertTrue(!ProxyServer.getResponseVolatile());
} 
开发者ID:epam,项目名称:Wilma,代码行数:10,代码来源:ResponseMessageVolatilityOffServletTest.java

示例5: testDoGetShouldTurnResponseVolatilityOn

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Test
public final void testDoGetShouldTurnResponseVolatilityOn() throws ServletException, IOException {
    // GIVEN in setup
    ProxyServer.setResponseVolatile(false);
    // WHEN
    underTest.doGet(request, response);
    // THEN
    Assert.assertTrue(ProxyServer.getResponseVolatile());
} 
开发者ID:epam,项目名称:Wilma,代码行数:10,代码来源:ResponseMessageVolatilityOnServletTest.java

示例6: doGet

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
    logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Response Message Volatility: OFF"));
    ProxyServer.setResponseVolatile(false);
} 
开发者ID:epam,项目名称:Wilma,代码行数:6,代码来源:ResponseMessageVolatilityOffServlet.java

示例7: doGet

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
    logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Response Message Volatility: ON"));
    ProxyServer.setResponseVolatile(true);
} 
开发者ID:epam,项目名称:Wilma,代码行数:6,代码来源:ResponseMessageVolatilityOnServlet.java

示例8: setResponseVolatile

import net.lightbody.bmp.proxy.ProxyServer; //导入方法依赖的package包/类
/**
 * Global setter of the proxy behaviour. When it is volatile=true,
 * the response of the messages will be volatile (can be changed), otherwise not.
 * Note1: Requests are always volatile.
 * Note2: This global setting can be overwritten per message base, using the request interceptors.
 *
 * @param responseVolatility must be either true (volatile) or false (not volatile).
 */
public static void setResponseVolatile(boolean responseVolatility) {
    ProxyServer.setResponseVolatile(responseVolatility);
} 
开发者ID:epam,项目名称:Wilma,代码行数:12,代码来源:BrowserMobProxy.java

本文标签属性:

示例:示例志愿表

代码:代码生成器

java:javascript什么意思

ProxyServer:proxyserver安卓版下载

setResponseVolatile:setResponseVolatile

上一篇:C# Bitmap.MakeTransparent方法代码示例
下一篇:走3万步10顿胖30斤

为您推荐