12.07.2015 Views

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Java</strong> API FlowThere are two types of connection handles in this class:■A default connection handle. A default connection handle:■■■Represents a single instance of an Agent API object.Is static across the process.Allows connections to the Agent API object from both PolicyManagement and DMS clients.You can establish multiple connections to the Policy Server through thesingle Agent API object instance.■A user-defined connection handle. You can create multiple user-definedconnection objects; each one can support multiple connections to thePolicy Server.Establish a Default ConnectionIf you have not already established a connection to the Policy Server, you canrequest an automatic connection. If <strong>SiteMinder</strong> establishes a connection <strong>for</strong>you automatically, it creates a default <strong>Java</strong> Agent API object and handle.However, if a valid user-defined handle already exists, <strong>SiteMinder</strong> does notcreate a default object and handle. A user-defined handle takes precedenceover a default handle.To establish a default connection to the Policy Server automatically1. Use the following constructor to create an API connection object:SmApiConnection (boolean bDefaultAgentConnectionboolean disableLoadBalancing)2. In the constructor, set bDefaultAgentConnection to true—<strong>for</strong> example:SmApiConnection m_defaultConnection =new SmApiConnection(true,false);3. If bDefaultAgentConnection is false, you must explicitly establish theconnection in your client code.18 <strong>Developer's</strong> <strong>Guide</strong> <strong>for</strong> <strong>Java</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!