Decision Center API

ilog.rules.teamserver.auth
Class AuthenticationHandler<T extends AuthenticationCredentials>

java.lang.Object
  extended by ilog.rules.teamserver.auth.AuthenticationHandler<T>
Type Parameters:
T - The credentials to use to establish a connection.
Direct Known Subclasses:
LtpaTokenAuthenticationHandler, UsernamePasswordAuthenticationHandler

public abstract class AuthenticationHandler<T extends AuthenticationCredentials>
extends Object

Abstract class that handles the connection to Decision Center.

See Also:
AuthenticationCredentials

Constructor Summary
AuthenticationHandler()
           
 
Method Summary
 boolean acceptSelfSignedCertificate()
          Indicates whether the transaction accepts self-signed certificates.
abstract  void closeSession()
          Closes the session.
abstract  AuthenticationResponse connect(String url, T credentials)
          Establishes the connection to Decision Center.
 String getRemoteService()
          Returns the name of the service to call to establish a connection to Decision Center.
 void setAcceptSelfSignedCertificate(boolean acceptSelfSignedCertificate)
          Indicates whether the transaction accepts self-signed certificatew.
 void setRequestParams(org.apache.commons.httpclient.HttpMethod method)
          To customize the request to be sent via an HTTP connection to Decision Center.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationHandler

public AuthenticationHandler()
Method Detail

acceptSelfSignedCertificate

public boolean acceptSelfSignedCertificate()
Indicates whether the transaction accepts self-signed certificates.

Returns:
true if the transaction accepts self-signed certificate, and false otherwise.

setAcceptSelfSignedCertificate

public void setAcceptSelfSignedCertificate(boolean acceptSelfSignedCertificate)
Indicates whether the transaction accepts self-signed certificatew.

Parameters:
acceptSelfSignedCertificate - A boolean to indicate whether the transaction accepts self-signed certificates.

getRemoteService

public String getRemoteService()
Returns the name of the service to call to establish a connection to Decision Center.

Returns:
The name of the service.

setRequestParams

public void setRequestParams(org.apache.commons.httpclient.HttpMethod method)
To customize the request to be sent via an HTTP connection to Decision Center.

Parameters:
method - The method representing the request.

connect

public abstract AuthenticationResponse connect(String url,
                                               T credentials)
                                        throws IlrConnectException
Establishes the connection to Decision Center. The credentials should contain all the connection data needed.

Throws:
IlrConnectException
Parameters:
url - The URL of Decision Center.
credentials - The credentials to use.
Returns:
The response with the status of the connection and the HTTP client to use to request Decision Center.
See Also:
AuthenticationResponse

closeSession

public abstract void closeSession()
Closes the session. Implementers are responsible for closing the underlying connection. Usually, the HTTP client is used for the connection.


Decision Center API

© Copyright IBM Corp. 1987, 2013