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


Java HttpParams.getIntParameter方法代码示例

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


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

示例1: init

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
/**
 * Initializes this session input buffer.
 *
 * @param instream the source input stream.
 * @param buffersize the size of the internal buffer.
 * @param params HTTP parameters.
 */
protected void init(final InputStream instream, int buffersize, final HttpParams params) {
    if (instream == null) {
        throw new IllegalArgumentException("Input stream may not be null");
    }
    if (buffersize <= 0) {
        throw new IllegalArgumentException("Buffer size may not be negative or zero");
    }
    if (params == null) {
        throw new IllegalArgumentException("HTTP parameters may not be null");
    }
    this.instream = instream;
    this.buffer = new byte[buffersize];
    this.bufferpos = 0;
    this.bufferlen = 0;
    this.linebuffer = new ByteArrayBuffer(buffersize);
    this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params));
    this.ascii = this.charset.equals(ASCII);
    this.decoder = null;
    this.maxLineLen = params.getIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, -1);
    this.minChunkLimit = params.getIntParameter(CoreConnectionPNames.MIN_CHUNK_LIMIT, 512);
    this.metrics = createTransportMetrics();
    this.onMalformedInputAction = HttpProtocolParams.getMalformedInputAction(params);
    this.onUnMappableInputAction = HttpProtocolParams.getUnmappableInputAction(params);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:32,代码来源:AbstractSessionInputBuffer.java

示例2: init

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
/**
 * Initializes this session output buffer.
 *
 * @param outstream the destination output stream.
 * @param buffersize the size of the internal buffer.
 * @param params HTTP parameters.
 */
protected void init(final OutputStream outstream, int buffersize, final HttpParams params) {
    if (outstream == null) {
        throw new IllegalArgumentException("Input stream may not be null");
    }
    if (buffersize <= 0) {
        throw new IllegalArgumentException("Buffer size may not be negative or zero");
    }
    if (params == null) {
        throw new IllegalArgumentException("HTTP parameters may not be null");
    }
    this.outstream = outstream;
    this.buffer = new ByteArrayBuffer(buffersize);
    this.charset = Charset.forName(HttpProtocolParams.getHttpElementCharset(params));
    this.ascii = this.charset.equals(ASCII);
    this.encoder = null;
    this.minChunkLimit = params.getIntParameter(CoreConnectionPNames.MIN_CHUNK_LIMIT, 512);
    this.metrics = createTransportMetrics();
    this.onMalformedInputAction = HttpProtocolParams.getMalformedInputAction(params);
    this.onUnMappableInputAction = HttpProtocolParams.getUnmappableInputAction(params);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:AbstractSessionOutputBuffer.java

示例3: AbstractMessageParser

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
/**
 * Creates an instance of this class.
 *
 * @param buffer the session input buffer.
 * @param parser the line parser.
 * @param params HTTP parameters.
 */
public AbstractMessageParser(
        final SessionInputBuffer buffer,
        final LineParser parser,
        final HttpParams params) {
    super();
    if (buffer == null) {
        throw new IllegalArgumentException("Session input buffer may not be null");
    }
    if (params == null) {
        throw new IllegalArgumentException("HTTP parameters may not be null");
    }
    this.sessionBuffer = buffer;
    this.maxHeaderCount = params.getIntParameter(
            CoreConnectionPNames.MAX_HEADER_COUNT, -1);
    this.maxLineLen = params.getIntParameter(
            CoreConnectionPNames.MAX_LINE_LENGTH, -1);
    this.lineParser = (parser != null) ? parser : BasicLineParser.DEFAULT;
    this.headerLines = new ArrayList<CharArrayBuffer>();
    this.state = HEAD_LINE;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:AbstractMessageParser.java

示例4: getIntClientParameter

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
/**
 * Retrieves the current connection timeout, null if not set or if set to Integer.MIN_VALUE
 * 
 * @return The current timeout
 */
protected Integer getIntClientParameter(final String parameter) {
    HttpParams params = httpClient.getParams();
    int value = params.getIntParameter(parameter, Integer.MIN_VALUE);
    if (value != Integer.MIN_VALUE) {
        return value;
    } else {
        return null;
    }
}
 
开发者ID:Hitachi-Data-Systems,项目名称:Open-DM,代码行数:15,代码来源:HCAPAdapter.java

示例5: getMaxTotalConnections

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
/**
 * Gets the maximum number of connections allowed.
 *
 * @param params HTTP parameters
 *
 * @return The maximum number of connections allowed.
 */
public static int getMaxTotalConnections(
        final HttpParams params) {
    if (params == null) {
        throw new IllegalArgumentException
            ("HTTP parameters must not be null.");
    }
    return params.getIntParameter(MAX_TOTAL_CONNECTIONS, DEFAULT_MAX_TOTAL_CONNECTIONS);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:ConnManagerParams.java

示例6: getMaxGarbageLines

import org.apache.http.params.HttpParams; //导入方法依赖的package包/类
protected int getMaxGarbageLines(final HttpParams params) {
    return params.getIntParameter(
            org.apache.http.conn.params.ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE,
            Integer.MAX_VALUE);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:DefaultResponseParser.java


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