Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.remote
Class RemoteApplication

java.lang.Object
  extended by oracle.adf.view.rich.remote.RemoteApplication

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RemoteApplicationInstance

public class RemoteApplication
extends java.lang.Object
implements java.io.Serializable

This is a reference to a remote web application. The URI provided is expected to reference the remote web application which contains the RemoteRegion filter. Additionally, if this application already has an established SessionId, that should be stored here so that subsequent requests to the server will reuse the same session. <p/> The RemoteApplicationInstance class is used to keep track of all of the information needed for each instance whereas this class is for information about the configured producer as a whole. <p/> Instances of this class are returned from the getRemoteApplication(URI) factory method. Using this method ensures that, for a particular uri, you will get the correct RemoteApplication object, complete with information about the current session. Most applications will only need to retrieve one of these objects the first time they connect to the server. Once a RemoteApplicationInstance has been returned from a valid RemoteApplicationResponse, then that object should be used to make subsequent requests.

See Also:
RemoteApplicationInstance, Serialized Form

Constructor Summary
protected RemoteApplication(java.net.URI uri)
          Called by RemoteApplication if a getRemoteApplication(URI) is called outside of a Faces environment.

 

Method Summary
 boolean equals(java.lang.Object object)
          Determines whether these classes are equal
protected  java.util.concurrent.locks.ReentrantLock getLock()
          Returns the lock for this object.
static RemoteApplication getRemoteApplication(java.net.URI uri)
          Returns a RemoteApplicationObject for the provided URI.
 CookieWrapper getSessionCookie()
          Returns the 'JSESSIONID' cookie.
 java.lang.String getSessionId()
          Returns the session id, if any, for this producer.
 java.net.URI getURI()
          Returns the URI for this producer endpoint.
 int hashCode()
          Computes the class's hashcode.
 void invalidate()
          Invalidate this RemoteApplication.
protected  void setSessionCookie(CookieWrapper sessionCookie)
          Sets the sessionCookie for the object.
protected  void setSessionId(java.lang.String sessionId)
          Sets the sessionId for the object.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RemoteApplication

protected RemoteApplication(java.net.URI uri)
Called by RemoteApplication if a getRemoteApplication(URI) is called outside of a Faces environment.
Parameters:
uri - the context URI for this remote application
Throws:
java.lang.NullPointerException - is uri is null

Method Detail

getRemoteApplication

public static final RemoteApplication getRemoteApplication(java.net.URI uri)
Returns a RemoteApplicationObject for the provided URI. In the Remote Application Rramework, multiple instances share the same physical session. As such, multiple instances may share the same session information for a given uri. This factory method ensures in a thread-safe manner that the most up-to-date session information is returned for a particular URI.
Parameters:
uri - the URL for the remote connection
Returns:
a RemoteApplication object for the current URI

getURI

public java.net.URI getURI()
Returns the URI for this producer endpoint.
Returns:
the url for this server.

getSessionId

public java.lang.String getSessionId()
Returns the session id, if any, for this producer. This will be null until a session is established on the remote server. The value of this field will be the same as HttpSession.getId() on the producer.
Returns:
a sessionId or null if one has not yet been established

getSessionCookie

public CookieWrapper getSessionCookie()
Returns the 'JSESSIONID' cookie. Generally the value of this cookie will be the same as getSessionId(), however while J2EE defines a cookie to track the JSESSIONID, it does not guarentee that the value of HttpSession.getId() and the value of the tracking cookie are the same. In the past some containers like WebSphere have been known to make these values different, particularly on clustering environments.
Returns:
a sessionId or null if one has not yet been established

invalidate

public void invalidate()
Invalidate this RemoteApplication. This convenience method executes RemoteApplicationUtils.invalidate(RemoteApplication) on the current RemoteApplication. Please note that if this method is called on a RemoteApplicationInstance then only the subsession will be invalidated as per the documentation in RemoteApplicationUtils.
See Also:
RemoteApplicationUtils.invalidate(RemoteApplication)}

equals

public boolean equals(java.lang.Object object)
Determines whether these classes are equal
Overrides:
equals in class java.lang.Object
Parameters:
object -
Returns:

hashCode

public int hashCode()
Computes the class's hashcode. This version is generally slower then an implementation can be, but should guarentee uniqueness.
Overrides:
hashCode in class java.lang.Object
Returns:

setSessionId

protected void setSessionId(java.lang.String sessionId)
Sets the sessionId for the object. Most apps will not set this, should be used for internal use only.
Parameters:
sessionId -

setSessionCookie

protected void setSessionCookie(CookieWrapper sessionCookie)
Sets the sessionCookie for the object. Most apps will not set this, should be used for internal use only.
Parameters:
sessionCookie -

getLock

protected java.util.concurrent.locks.ReentrantLock getLock()
Returns the lock for this object. The lock is needed in order to ensure that the object is mutated correctly given all instances of the RemoteApplication.
Returns:

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.