You establish a user-defined connection in one of two ways:
Note: If you already have a connection to the Policy Server, you can use it to make subsequent Policy Management API or DMS API calls.
To create a connection using an existing Agent API connection
SmApiConnection (netegrity.siteminder.javaagent.AgentAPI agentApiConnection)
SmApiConnection myConnection = new SmApiConnection (myAgentApiConnection);
The new Java Agent API handle is a user-defined handle.
If you do not already have a default connection and you want a user-defined connection object, you can use the Agent API to create the agent object and then create the new connection, as follows:
You can create an agent object based on connection parameters from either of the following sources:
AgentAPI agent = new AgentAPI(); ServerDef sd = new ServerDef(); sd.serverIpAddress = POLICY_IP; sd.connectionMin = CX_MIN; sd.connectionMax = CX_MAX; sd.connectionStep = CX_STEP; sd.timeout = CX_TIMEOUT; sd.authorizationPort = AZ_PORT; sd.authenticationPort = AUTH_PORT; sd.accountingPort = ACC_PORT; InitDef init=new InitDef(AGENT_LOGIN,SHARED_SECRET,false, sd); agent.init(init);
Note: With SiteMinder v6.0 and later, the authorization, authentication, and accounting servers are combined into a single server process. Consequently, authorizationPort, authenticationPort, and accountingPort can all be set to the same value.
Note: SiteMider v4.x webagent.conf files are no longer supported by the SM API.
After creating the agent object, you create the new connection in either of these ways:
SmApiConnection myConnection = new SmApiConnection(agent);
SmApiConnection myConnection=new SmApiConnection(false,false); myConnection.setAgentApiConnection(agent);
If you establish the connection in this way, the Java Agent API handle is a user-defined handle.
If you call setAgentApiConnection() and you do not have a connection, you can establish an automatic, static connection by passing in null.
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |