public class RemoteApplication extends Object implements Serializable
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.
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.
RemoteApplicationInstance,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
RemoteApplication(URI uri)
Called by RemoteApplication if a
getRemoteApplication(URI)
is called outside of a Faces environment. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Determines whether these classes are equal
|
protected ReentrantLock |
getLock()
Returns the lock for this object.
|
static RemoteApplication |
getRemoteApplication(URI uri)
Returns a RemoteApplicationObject for the provided URI.
|
CookieWrapper |
getSessionCookie()
Returns the 'JSESSIONID' cookie.
|
String |
getSessionId()
Returns the session id, if any, for this producer.
|
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(String sessionId)
Sets the sessionId for the object.
|
protected RemoteApplication(URI uri)
getRemoteApplication(URI)
is called outside of a Faces environment.uri - the context URI for this remote applicationNullPointerException - is uri is nullpublic static final RemoteApplication getRemoteApplication(URI uri)
uri - the URL for the remote connectionRemoteApplication object for the current URIpublic URI getURI()
public String getSessionId()
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.null if one has not yet been establishedpublic CookieWrapper getSessionCookie()
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.null if one has not yet been establishedpublic void invalidate()
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.
public boolean equals(Object object)
public int hashCode()
protected void setSessionId(String sessionId)
sessionId - The Session.protected void setSessionCookie(CookieWrapper sessionCookie)
sessionCookie - The Cokieprotected ReentrantLock getLock()