|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.model.connection.url.URLConnectionProxy
public class URLConnectionProxy
URLConnectionProxy represents a proxy to the acutual URLConnection
resource. Whenever a client looks up for a URLConnection
an instance
of this proxy is returned. This proxy contains the reference to actual
resource and delegates the call to actual reference on behalf of the caller.
The proxy logically protects the reference to resource being held by the client, once the resource is released. This ensures that the actual reference to the resource cannot be corrupted / used once the resource is released.
Field Summary |
---|
Fields inherited from interface oracle.adf.model.connection.url.URLConnection |
---|
ATTR_NAME, ATTR_URL |
Constructor Summary | |
---|---|
protected |
URLConnectionProxy(URLConnection conn)
Create an instance of this proxy with the actual resource. |
Method Summary | |
---|---|
void |
close()
Close this connection. |
boolean |
equals(java.lang.Object connection)
Tests for the equality of another URLConnection instance with the current instance. |
AuthenticationScheme |
getAuthenticationScheme()
Get the AuthenticationScheme used by this connection
to authenticate against the endpoint |
java.lang.Object |
getInteraction()
Start the communication session. |
java.lang.String |
getName()
Get the name of this URLConnection. |
Proxy |
getProxy()
Get the proxy details for this connection. |
javax.naming.Reference |
getReference()
Return the Reference that describes the details of this
connection. |
int |
getTimeout()
Get the timeout set on this connection. |
java.net.URL |
getURL()
Get the URL resource represented by this connection |
void |
open()
Open the connection. |
void |
release()
Release this connection instance back to the pool. |
void |
setProxy(Proxy proxy)
Configure the proxy details for the URL access |
void |
setTimeout(int timeout)
Set the timeout property for the connection. |
java.lang.String |
toString()
Returns a String representation of this Connection. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected URLConnectionProxy(URLConnection conn)
conn
- The Actual reference to the URLConnection
resource.Method Detail |
---|
public java.lang.String getName()
getName
in interface URLConnection
public void open() throws ConnectionException
open
in interface URLConnection
{@link
- ConnectionException} if the connection failed to open.
ConnectionException
public void setProxy(Proxy proxy)
setProxy
in interface URLConnection
proxy
- The Proxy details needed to access the URLpublic Proxy getProxy()
getProxy
in interface URLConnection
public java.lang.Object getInteraction() throws ConnectionException
open()
before
starting the interaction. This is necessary to initialize and prepare the atual
physical channel for communication. The default interaction model for the
URLConnection is the HttpClient.HTTPConnection
.
The HTTPConnection
supports the HTTP and HTTPS protocols of
communication.
getInteraction
in interface URLConnection
HTTPConnection
that represents the underlying
communication channel.
{@link
- ConnectionException} if an error occurred in starting the
interaction.
ConnectionException
public AuthenticationScheme getAuthenticationScheme()
AuthenticationScheme
used by this connection
to authenticate against the endpoint
getAuthenticationScheme
in interface URLConnection
AuthenticationScheme
used by this
connection. If the connection does not use any authentication
null
is returned.public java.net.URL getURL()
getURL
in interface URLConnection
URL
resource of this connectionpublic void setTimeout(int timeout)
setTimeout
in interface URLConnection
timeout
- The timeout to be set on the connection instance.public int getTimeout()
getTimeout
in interface URLConnection
public void close() throws ConnectionException
open()
on the connection again. Reopening the connection will reset the state
of the interaction associated with this connection.
close
in interface URLConnection
{@link
- ConnectionException} if a failure occured in closing the
connection.
ConnectionException
public void release() throws ConnectionException
release
in interface URLConnection
{@link
- ConnectionException} if the connection could be released to
the pool.
ConnectionException
public boolean equals(java.lang.Object connection)
equals
in class java.lang.Object
true
if the connection instances are the same
false
otherwise.public javax.naming.Reference getReference() throws javax.naming.NamingException
Reference
that describes the details of this
connection.
getReference
in interface javax.naming.Referenceable
java.naming.Reference
instance describing this connection
javax.naming.NamingException
- if an error was encountered.public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |