Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc
Class RemoteSessionFactory

    java.lang.Object
      com.plumtree.remote.prc.RemoteSessionFactory

public abstract class RemoteSessionFactory
extends java.lang.Object

Factory class for obtaining an `IRemoteSession`.

`IRemoteSession` is the only session object required by the PRC remote APIs. No separate Collaboration session or Content session is needed to access the Collaboration or Content Server remote APIs. To access Collaboration or Content Server APIs, obtain an `IRemoteSession` using the methods in this class, then obtain either an `ICollaborationFactory` or `IContentFactory` from the `IRemoteSession` Individual Collaboration managers or Content managers can be obtained using the corresponding methods in `ICollaborationFactory` or `IContentFactory`.

Portlets automatically receive the WS Portal (ptapi) SOAP endpoint URL from the portal and can use `IPortletContext.getRemotePortalSession` to create an `IRemoteSession`.

Constructor Summary
`RemoteSessionFactory()`

Method Summary
`static IRemoteSession` | `getExplicitLoginContext(java.net.URL endpoint, java.lang.String username, java.lang.String password)` Returns an `IRemoteSession` with the same security context in the portal as the specified user.
`static IRemoteSession` | `getExplicitLoginContext(java.net.URL endpoint, java.lang.String username, java.lang.String password, int sessionDurationInMinutes)` Returns an `IRemoteSession` with the same security context in the portal as the specified user.
`static IRemoteSession` | `getTokenContext(java.net.URL endpoint, java.lang.String loginToken)` Returns an `IRemoteSession` using the specified login token.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RemoteSessionFactory

    public RemoteSessionFactory()

Method Detail

### getExplicitLoginContext

    public static IRemoteSession getExplicitLoginContext(java.net.URL endpoint,
                                                         java.lang.String username,
                                                         java.lang.String password)
                                                  throws java.net.MalformedURLException,
                                                         PortalException,
                                                         java.rmi.RemoteException

  Returns an `IRemoteSession` with the same security context in the portal as the specified user. The session is valid for 10 minutes.

  Parameters:
    `endpoint` - the SOAP endpoint of the WS portal (ptapi). For example, a Java WS portal installation might use `http://hostname:port/ptapi/services/QueryInterfaceAPI` while a .NET WS portal might use `http://hostname:port/ptapi/QueryInterfaceAPI.asmx`. These endpoints will vary according to the deployment.
    `username` - the username whose security context to use
    `password` - the user's password
  Returns:
    an `IRemoteSession` object representing the current session with the portal
  Throws:
    `java.net.MalformedURLException` - if the endpoint URL is not valid
    `PortalException` - if the operation resulted in an error on the portal
    `java.rmi.RemoteException` - if there is a communication problem during the execution of the remote method call

### getExplicitLoginContext

    public static IRemoteSession getExplicitLoginContext(java.net.URL endpoint,
                                                         java.lang.String username,
                                                         java.lang.String password,
                                                         int sessionDurationInMinutes)
                                                  throws java.net.MalformedURLException,
                                                         PortalException,
                                                         java.rmi.RemoteException

  Returns an `IRemoteSession` with the same security context in the portal as the specified user.

  Parameters:
    `endpoint` - the SOAP endpoint
    `username` - the username whose security context to use
    `password` - the user's password
    `sessionDurationInMinutes` - the number of minutes the session is valid. This value must be positive and can be no greater than one day (60 * 24)
  Returns:
    an `IRemoteSession` object representing the current session with the portal
  Throws:
    `java.net.MalformedURLException` - if the endpoint URL is not valid
    `java.lang.IllegalArgumentException` - if sessionDurationInMinutes is less than one or greater than 60 * 24
    `PortalException` - if the operation resulted in an error on the portal
    `java.rmi.RemoteException` - if there is a communication problem during the execution of the remote method call

### getTokenContext

    public static IRemoteSession getTokenContext(java.net.URL endpoint,
                                                 java.lang.String loginToken)
                                          throws java.net.MalformedURLException

  Returns an `IRemoteSession` using the specified login token. A login token can be obtained from a portal request to a portlet using the PortletRequest.getLoginToken() method.

  Parameters:
    `endpoint` - the SOAP endpoint of the WS portal (ptapi). For example, a Java WS portal installation might use `http://hostname:port/ptapi/services/QueryInterfaceAPI` while a .NET WS portal might use `http://hostname:port/ptapi/QueryInterfaceAPI.asmx`. These endpoints will vary according to the deployment.
    `loginToken` - the login token that can be obtained from a portal request to a portlet using `PortletRequest.getLoginToken`.
  Returns:
    an `IRemoteSession` object representing the current session with the portal
  Throws:
    `java.net.MalformedURLException` - if the endpoint URL is not valid

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.