org.apache.commons.httpclient.HttpConnection.assertNotOpen()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.commons.httpclient.HttpConnection.assertNotOpen()方法的一些代码示例,展示了HttpConnection.assertNotOpen()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpConnection.assertNotOpen()方法的具体详情如下:
包路径:org.apache.commons.httpclient.HttpConnection
类名称:HttpConnection
方法名:assertNotOpen

HttpConnection.assertNotOpen介绍

[英]Throws an IllegalStateException if the connection is already open.
[中]如果连接已打开,则引发IllegalStateException。

代码示例

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the port to connect to.
 *
 * @param port the port to connect to
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setPort(int port) throws IllegalStateException {
  assertNotOpen();
  portNumber = port;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the port of the host to proxy through.
 *
 * @param port the port of the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyPort(int port) throws IllegalStateException {
  assertNotOpen();
  proxyPortNumber = port;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Set the local address used when creating the connection.
 * If unset or <tt>null</tt>, the default address is used.
 * 
 * @param localAddress the local address to use
 */
public void setLocalAddress(InetAddress localAddress) {
  assertNotOpen();
  this.localAddress = localAddress;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the host to proxy through.
 *
 * @param host the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyHost(String host) throws IllegalStateException {
  assertNotOpen();
  proxyHostName = host;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the virtual host to target.
 *
 * @param host the virtual host name that should be used instead of 
 *        physical host name when sending HTTP requests. Virtual host 
 *        name can be set to <tt> null</tt> if virtual host name is not
 *        to be used
 * 
 * @throws IllegalStateException if the connection is already open
 * 
 * @deprecated no longer applicable
 */
public void setVirtualHost(String host) throws IllegalStateException {
  assertNotOpen();
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the host to connect to.
 *
 * @param host the host to connect to. Parameter value must be non-null.
 * @throws IllegalStateException if the connection is already open
 */
public void setHost(String host) throws IllegalStateException {
  if (host == null) {
    throw new IllegalArgumentException("host parameter is null");
  }
  assertNotOpen();
  hostName = host;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

/**
 * Sets the protocol used to establish the connection
 * 
 * @param protocol The protocol to use.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProtocol(Protocol protocol) {
  assertNotOpen();
  if (protocol == null) {
    throw new IllegalArgumentException("protocol is null");
  }
  protocolInUse = protocol;
}

代码示例来源:origin: commons-httpclient/commons-httpclient

assertNotOpen();

代码示例来源:origin: org.mule.transports/mule-transport-http

/**
 * Sets the port to connect to.
 *
 * @param port the port to connect to
 *
 * @throws IllegalStateException if the connection is already open
 */
public void setPort(int port) throws IllegalStateException {
  assertNotOpen();
  portNumber = port;
}

代码示例来源:origin: org.mule.transports/mule-transport-http

/**
 * Set the local address used when creating the connection.
 * If unset or <tt>null</tt>, the default address is used.
 *
 * @param localAddress the local address to use
 */
public void setLocalAddress(InetAddress localAddress) {
  assertNotOpen();
  this.localAddress = localAddress;
}

代码示例来源:origin: org.zaproxy/zap

/**
 * Sets the port of the host to proxy through.
 *
 * @param port the port of the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyPort(int port) throws IllegalStateException {
  assertNotOpen();
  proxyPortNumber = port;
}

代码示例来源:origin: org.mule.transports/mule-transport-http

/**
 * Sets the port of the host to proxy through.
 *
 * @param port the port of the host to proxy through.
 *
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyPort(int port) throws IllegalStateException {
  assertNotOpen();
  proxyPortNumber = port;
}

代码示例来源:origin: org.mule.transports/mule-transport-http

/**
 * Sets the host to proxy through.
 *
 * @param host the host to proxy through.
 *
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyHost(String host) throws IllegalStateException {
  assertNotOpen();
  proxyHostName = host;
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Sets the port to connect to.
 *
 * @param port the port to connect to
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setPort(int port) throws IllegalStateException {
  assertNotOpen();
  portNumber = port;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Sets the port to connect to.
 *
 * @param port the port to connect to
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setPort(int port) throws IllegalStateException {
  assertNotOpen();
  portNumber = port;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Set the local address used when creating the connection.
 * If unset or <tt>null</tt>, the default address is used.
 * 
 * @param localAddress the local address to use
 */
public void setLocalAddress(InetAddress localAddress) {
  assertNotOpen();
  this.localAddress = localAddress;
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Sets the host to proxy through.
 *
 * @param host the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyHost(String host) throws IllegalStateException {
  assertNotOpen();
  proxyHostName = host;
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Sets the port of the host to proxy through.
 *
 * @param port the port of the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyPort(int port) throws IllegalStateException {
  assertNotOpen();
  proxyPortNumber = port;
}

代码示例来源:origin: org.apache.commons/httpclient

/**
 * Set the local address used when creating the connection.
 * If unset or <tt>null</tt>, the default address is used.
 * 
 * @param localAddress the local address to use
 */
public void setLocalAddress(InetAddress localAddress) {
  assertNotOpen();
  this.localAddress = localAddress;
}

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Sets the port of the host to proxy through.
 *
 * @param port the port of the host to proxy through.
 * 
 * @throws IllegalStateException if the connection is already open
 */
public void setProxyPort(int port) throws IllegalStateException {
  assertNotOpen();
  proxyPortNumber = port;
}

相关文章

微信公众号

最新文章

更多

HttpConnection类方法