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.

Connection to a Policy Server■■Upgrades from the JNI <strong>Java</strong> Agent API on Unix systems requires users ofcustom 4.x-based agents that use shared secrets encrypted with the 4.xencryptkey tool to update their shared secret on the agent side <strong>for</strong>upgraded agents.The pure <strong>Java</strong> Agent API does not obtain Agent configuration in<strong>for</strong>mationfrom the Windows Registry.Connection to a Policy ServerBe<strong>for</strong>e an agent can per<strong>for</strong>m work on behalf of its users, it must initializeconnections to one or more Policy Servers by issuing the init() method.Through the InitDef parameter, you can specify connection parameters suchas failover mode and connection pool size. This step creates TCP connectionsand typically does not need to be done more than once per agent instance.After the Agent API is initialized, all API calls are fully thread-safe with respectto the initialized API instance.It is possible to initialize more than one API instance (<strong>for</strong> example, whenworking with Policy Servers that use separate policy stores).Immediately after initialization, the agent should communicate its versionin<strong>for</strong>mation to the Policy Server by calling doManagement() with the constantMANAGEMENT_SET_AGENT_INFO set in the ManagementContextDef object.The actual in<strong>for</strong>mation can be any string containing enough in<strong>for</strong>mation aboutthe agent, such as the build number, and the version number. The string isrecorded in the Policy Server logs.After the Agent API has been initialized, the agent can per<strong>for</strong>m useful work. Atthis point it can start accepting requests from its users, such as receiving GETrequests <strong>for</strong> URLs.36 <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!