com.iplanet.am.util
Class AMClientDetector

java.lang.Object
  |
  +--com.iplanet.am.util.AMClientDetector

public class AMClientDetector
extends java.lang.Object

This is an utility to get the client type. This utility executes Client Detection Class provided in Client Detection Module Service and gets the client type. Default client type will be returned if there is no Client Detection Implementation provided


Constructor Summary
AMClientDetector()
          Constructs a AMClientDetector instance.
AMClientDetector(ClientDetectionInterface cd)
          Application provide custom detection class.
AMClientDetector(java.lang.String className)
          Applications can provide client detector implementation class
 
Method Summary
 java.lang.String detectionEnabled()
          Return the client detection enabled/disabled
 java.lang.String getClientType(javax.servlet.http.HttpServletRequest request)
          Returns the client type by executing client detector class provided in Client Detection Service.
static ClientTypesManager getClientTypesManagerInstance()
          Returns the ClientTypesManager Instance.
static boolean isServicePassed()
          Returns true if the client detection service is present or false if the client detection service is not present and the client attributes could not be retrieved.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMClientDetector

public AMClientDetector()
Constructs a AMClientDetector instance.

AMClientDetector

public AMClientDetector(java.lang.String className)
Applications can provide client detector implementation class
Parameters:
className - the name of the implementation class

AMClientDetector

public AMClientDetector(ClientDetectionInterface cd)
Application provide custom detection class.
Parameters:
cd - class that implements ClientDetectionInterface.
Method Detail

getClientType

public java.lang.String getClientType(javax.servlet.http.HttpServletRequest request)
Returns the client type by executing client detector class provided in Client Detection Service.
Parameters:
request - HTTP Servlet Request.
Returns:
client type . Default client type will be returned if either the client detection is not enabled or the client detector class is not provided in cdm service. If it throws any exception by executing this class, this method will just return null .

detectionEnabled

public java.lang.String detectionEnabled()
Return the client detection enabled/disabled
Returns:
specifies whether client detection was enabled/disabled

getClientTypesManagerInstance

public static ClientTypesManager getClientTypesManagerInstance()
Returns the ClientTypesManager Instance.
Returns:
the ClientTypesManager Instance.

isServicePassed

public static boolean isServicePassed()
Returns true if the client detection service is present or false if the client detection service is not present and the client attributes could not be retrieved.
Returns:
false if no Service is present. The default value is true.