|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-01 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.URLConnection
java.net.HttpURLConnection
weblogic.net.http.HttpURLConnection
public class HttpURLConnection
A class to represent an HTTP connection to a remote object.
Field Summary | |
---|---|
protected static int |
defaultConnectTimeout
|
protected boolean |
ignoreProxy
|
protected boolean |
ignoreSystemNonProxyHosts
|
protected IOException |
rememberedException
|
Fields inherited from class java.net.URLConnection |
---|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
Constructor Summary | |
---|---|
HttpURLConnection(URL u)
|
|
HttpURLConnection(URL u,
Proxy p)
|
Method Summary | |
---|---|
void |
addRequestProperty(String key,
String value)
Adds a general request property specified by a key-value pair. |
void |
connect()
|
void |
disconnect()
Disconnect from the server. |
protected void |
doSetRequests()
|
protected boolean |
followRedirect()
|
static String |
getAuthInfo(String host,
int port,
String header)
|
int |
getConnectTimeout()
|
InputStream |
getErrorStream()
|
String |
getHeaderField(int n)
Gets a header field by index. |
String |
getHeaderField(String name)
Gets a header field by name. |
String |
getHeaderFieldKey(int n)
Gets a header field by index. |
Map |
getHeaderFields()
Gets all header fields. |
protected weblogic.net.http.HttpClient |
getHttpClient()
|
InputStream |
getInputStream()
|
OutputStream |
getOutputStream()
|
protected String |
getProtocol()
|
protected static String |
getProxyAuthString()
|
int |
getReadTimeout()
|
Map |
getRequestProperties()
|
String |
getRequestProperty(String key)
|
int |
getResponseCode()
|
SocketFactory |
getSocketFactory()
Gets the SocketFactory to be used when creating sockets
for http URL connections. |
int |
getTimeout()
Deprecated. since 9.0. Use getReadTimeout() instead |
void |
setChunkedStreamingMode(int chunkLength)
|
void |
setConnectTimeout(int i)
|
static void |
setDefaultSocketFactory(SocketFactory nuDefaultSF)
Sets the default SocketFactory to be used when creating sockets for http URL connections. |
void |
setEmptyRequestProperty(String key)
|
void |
setFixedLengthStreamingMode(int fixedContentLength)
|
void |
setIgnoreProxy(boolean v)
This method will permit the current connection to ignore the system property http.Proxy or inst Proxy Note: this method only takes effect calling before the connect() method |
void |
setIgnoreSystemNonProxyHosts(boolean v)
This method will permit the current connection ignore the system property http.nonProxyHosts Note: this method only takes effect calling before the connect() method |
void |
setMuxableSocket(Object socket)
|
void |
setReadTimeout(int i)
|
void |
setRequestMethod(String method)
|
void |
setRequestProperty(String key,
String value)
|
void |
setSocketFactory(SocketFactory fact)
Sets the SocketFactory to be used when creating sockets
for http URL connections. |
void |
setTimeout(int i)
Deprecated. since 9.0. Use setReadTimeout(int) instead |
boolean |
usingProxy()
|
protected void |
writeRequests()
|
Methods inherited from class java.net.HttpURLConnection |
---|
getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseMessage, setFixedLengthStreamingMode, setFollowRedirects, setInstanceFollowRedirects |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static int defaultConnectTimeout
protected IOException rememberedException
protected boolean ignoreSystemNonProxyHosts
protected boolean ignoreProxy
Constructor Detail |
---|
public HttpURLConnection(URL u)
public HttpURLConnection(URL u, Proxy p)
Method Detail |
---|
protected String getProtocol()
public final void setSocketFactory(SocketFactory fact)
SocketFactory
to be used when creating sockets
for http URL connections.
public final SocketFactory getSocketFactory()
SocketFactory
to be used when creating sockets
for http URL connections.
public static void setDefaultSocketFactory(SocketFactory nuDefaultSF)
nuDefaultSF
- SocketFactory to be used as a default SocketFactoryprotected void writeRequests() throws IOException
IOException
public void setIgnoreSystemNonProxyHosts(boolean v)
v
- public void setIgnoreProxy(boolean v)
v
- public void connect() throws IOException
connect
in class URLConnection
IOException
protected weblogic.net.http.HttpClient getHttpClient() throws IOException
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in class URLConnection
IOException
protected static String getProxyAuthString()
public static String getAuthInfo(String host, int port, String header) throws IOException
IOException
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public InputStream getErrorStream()
getErrorStream
in class HttpURLConnection
protected boolean followRedirect() throws IOException
IOException
public void disconnect()
disconnect
in class HttpURLConnection
public boolean usingProxy()
usingProxy
in class HttpURLConnection
public String getHeaderField(String name)
getHeaderField
in class URLConnection
name
- the name of the header fieldpublic String getHeaderField(int n)
getHeaderField
in class HttpURLConnection
n
- the index of the header fieldpublic Map getHeaderFields()
getHeaderFields
in class URLConnection
public String getHeaderFieldKey(int n)
getHeaderFieldKey
in class HttpURLConnection
n
- the index of the header fieldpublic void addRequestProperty(String key, String value)
addRequestProperty
in class URLConnection
key
- - request header namevalue
- - request header valuepublic Map getRequestProperties()
getRequestProperties
in class URLConnection
public void setRequestProperty(String key, String value)
setRequestProperty
in class URLConnection
public void setEmptyRequestProperty(String key)
public String getRequestProperty(String key)
getRequestProperty
in class URLConnection
protected void doSetRequests()
public void setTimeout(int i)
i
- in millisecondspublic int getTimeout()
public void setReadTimeout(int i)
setReadTimeout
in class URLConnection
public int getReadTimeout()
getReadTimeout
in class URLConnection
public void setConnectTimeout(int i)
setConnectTimeout
in class URLConnection
public int getConnectTimeout()
getConnectTimeout
in class URLConnection
public void setFixedLengthStreamingMode(int fixedContentLength)
setFixedLengthStreamingMode
in class HttpURLConnection
public void setChunkedStreamingMode(int chunkLength)
setChunkedStreamingMode
in class HttpURLConnection
public int getResponseCode() throws IOException
getResponseCode
in class HttpURLConnection
IOException
public void setMuxableSocket(Object socket)
public void setRequestMethod(String method) throws ProtocolException
setRequestMethod
in class HttpURLConnection
ProtocolException
|
Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |