oracle.adf.view.rich.remote

## Class RemoteApplicationInstance

- java.lang.Object
- - oracle.adf.view.rich.remote.RemoteApplication
  - - oracle.adf.view.rich.remote.RemoteApplicationInstance

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    RemoteApplicationInstanceRaw

      public abstract class RemoteApplicationInstance
      extends RemoteApplication

  While the `RemoteApplication` references a webapp url that hosts an application, the RemoteApplicationInstance hosts a specific instance to the remote region. Each RemoteRegion component must be considered independent regardless of the server its on and this class contains the references to that specific instance including the id of the subsession, persistant cookies, the maintained url querystring and the like.

  This class is not instantiated directly. Typically it will be returned durring each `RemoteApplicationResponse` and then should b used on the next request. This allows each request to change the preserved querystring or update cookies as necessary.

  Since:
    12.1.4.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteApplicationInstance(URI uri)` Constructor from the superclass

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addAllCookies(List<org.apache.http.cookie.Cookie> cookies)` Adds a list of cookies to the instance.
    `protected void` | `clearCookies()` Clears the current cookie list and allows it to be recreated.
    `List<? extends javax.servlet.http.Cookie>` | `getCookies()` Returns a list of cookies that should be persisted on the next request of this instance.
    `abstract String` | `getSubSessionId()` Returns the instance's sub-session id.

    - ### Methods inherited from class oracle.adf.view.rich.remote.RemoteApplication

      `equals, getLock, getRemoteApplication, getSessionCookie, getSessionId, getURI, hashCode, invalidate, setSessionCookie, setSessionId`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RemoteApplicationInstance

          public RemoteApplicationInstance(URI uri)

      Constructor from the superclass
      Parameters:
        `uri` - Yje URI to the remote application.
      Throws:
        `NullPointerException` - if uri is null

  - ### Method Detail

    - #### getSubSessionId

          public abstract String getSubSessionId()

      Returns the instance's sub-session id. For any particular session on a server, there will be many subsessions (one for each RemoteRegion on the page). This Subsession id represents the id that will be used to keep the session data seperate. When a getSessionId is performed on the remote task flow, this is the id that is returned.
      Returns:
        a String containing the instance's subsession id

    - #### getCookies

          public List<? extends javax.servlet.http.Cookie> getCookies()

      Returns a list of cookies that should be persisted on the next request of this instance. This list should not contain "per-request" cookies as those should be added directly to the (@link RemoteApplicationReqeuest).
      Returns:
        an unmodifiable list of cookies

    - #### addAllCookies

          protected void addAllCookies(List<org.apache.http.cookie.Cookie> cookies)

      Adds a list of cookies to the instance. This protected function which will add Cookies (as defined in Apache HttpComponents) to become CookieWrappers in this instance. Typically this will be called only by the RemoteApplicationUtils when applying cookies from the CookieStore.
      Parameters:
        `cookies` - List of cookies

    - #### clearCookies

          protected void clearCookies()

      Clears the current cookie list and allows it to be recreated.

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