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 ClassConnection ClassYou use the SmApiConnection class to create an API connection object andestablish a connection between the Agent API and Policy Server. Dependingupon the constructor you use, you can establish either a default connection ora user-defined connection.The core methods of the SmApiConnection class are as follows:MethodgetAgentApiConnection()isValidApiConnection()setAgentApiConnection()DescriptionRetrieves the Agent API handle <strong>for</strong> thecurrent connection. Use this handle whenissuing subsequent <strong>Java</strong> API requests tothe Policy Server.Verifies whether a valid Agent APIconnection is available.Establishes a user-defined connectionthrough the handle passed into themethod. If null is passed, a staticconnection is established.Note: Do not call the execute() method from your client application. Thismethod is <strong>for</strong> internal use only.Session ClassThe Session class, SmApiSession, lets you create a session object by passingin a valid API connection and, depending upon the constructor you use, asession specification. (A session specification is also known as a sessionticket).The core methods of the SmApiSession class are as follows:MethodgetApiConnection()getSessionSpec()login()DescriptionRetrieves the SmApiConnection object <strong>for</strong>the current connection.Retrieves the specification <strong>for</strong> the currentsession.Logs in a <strong>SiteMinder</strong> administrator. ThePolicy Server issues a session specification<strong>for</strong> the session.26 <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!