|
Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
||||||||||
| 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 |
ignoreSystemNonPorxyHosts
|
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)
|
void |
setEmptyRequestProperty(String key)
|
void |
setFixedLengthStreamingMode(int fixedContentLength)
|
void |
setIgnoreSystemNonPorxyHosts(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, 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 ignoreSystemNonPorxyHosts
| 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.
protected void writeRequests()
throws IOException
IOExceptionpublic void setIgnoreSystemNonPorxyHosts(boolean v)
v -
public void connect()
throws IOException
connect in class URLConnectionIOException
protected weblogic.net.http.HttpClient getHttpClient()
throws IOException
IOException
public OutputStream getOutputStream()
throws IOException
getOutputStream in class URLConnectionIOExceptionprotected static String getProxyAuthString()
public static String getAuthInfo(String host,
int port,
String header)
throws IOException
IOException
public InputStream getInputStream()
throws IOException
getInputStream in class URLConnectionIOExceptionpublic InputStream getErrorStream()
getErrorStream in class HttpURLConnection
protected boolean followRedirect()
throws IOException
IOExceptionpublic void disconnect()
disconnect in class HttpURLConnectionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic String getHeaderField(String name)
getHeaderField in class URLConnectionname - the name of the header fieldpublic String getHeaderField(int n)
getHeaderField in class HttpURLConnectionn - the index of the header fieldpublic Map getHeaderFields()
getHeaderFields in class URLConnectionpublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class HttpURLConnectionn - the index of the header field
public void addRequestProperty(String key,
String value)
addRequestProperty in class URLConnectionkey - - request header namevalue - - request header valuepublic Map getRequestProperties()
getRequestProperties in class URLConnection
public void setRequestProperty(String key,
String value)
setRequestProperty in class URLConnectionpublic void setEmptyRequestProperty(String key)
public String getRequestProperty(String key)
getRequestProperty in class URLConnectionprotected void doSetRequests()
public void setTimeout(int i)
i - in millisecondspublic int getTimeout()
public void setReadTimeout(int i)
setReadTimeout in class URLConnectionpublic int getReadTimeout()
getReadTimeout in class URLConnectionpublic void setConnectTimeout(int i)
setConnectTimeout in class URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic void setFixedLengthStreamingMode(int fixedContentLength)
setFixedLengthStreamingMode in class HttpURLConnectionpublic void setChunkedStreamingMode(int chunkLength)
setChunkedStreamingMode in class HttpURLConnection
public int getResponseCode()
throws IOException
getResponseCode in class HttpURLConnectionIOExceptionpublic void setMuxableSocket(Object socket)
public void setRequestMethod(String method)
throws ProtocolException
setRequestMethod in class HttpURLConnectionProtocolException
|
Copyright 1996, 2011, 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 Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||