ClientClassifier Interface

com.bea.netuix.client.classifier
ClientClassifier Interface

public interface ClientClassifier

Classes implementing this interface look at information in the supplied HttpServeltRequest object and use that to categorize or "classify" the request originator's client into a predefined category. This is useful for customizing content delivery and look-and-feel for different browsers and / or devices.


All Known Implementing Classes

Field Summary

public static final String
UNCLASSIFIED
String
 

Method Summary

public String
getClassificationConfigurationFilePath(HttpServletRequest req)
Returns the path to the client classification configuration file used for the specified ServletRequest, if possible.
public String
getClientClassification(HttpServletRequest req)
Derives the client classification label based on information passed with the request.
public boolean
isDefault(HttpServletRequest req)
Determines if the "defualt" classification label applies for the supplied request.
public boolean
isRecognized(HttpServletRequest req)
Determines if the client classification has been explicitly recognized.

Field Detail

UNCLASSIFIED

public static final String UNCLASSIFIED

 

Method Detail

getClassificationConfigurationFilePath(HttpServletRequest) Method

public String getClassificationConfigurationFilePath(HttpServletRequest req)
Returns the path to the client classification configuration file used for the specified ServletRequest, if possible. In many cases, such as deployments through a .war archive, the path to the file cannot be determined, and null will be returned.

Parameters

req
The request object.

Returns

The path to the client classification configuration file, if possible to determine; null otherwise.

getClientClassification(HttpServletRequest) Method

public String getClientClassification(HttpServletRequest req)
Derives the client classification label based on information passed with the request. Different implementations may derive this label in different ways.

Parameters

req
The request object.

Returns

The classification label.

isDefault(HttpServletRequest) Method

public boolean isDefault(HttpServletRequest req)
Determines if the "defualt" classification label applies for the supplied request. Default is the default classification label, which can mean that the request was not resolvable to an existing label, or that it in fact does resolve to an existing label called 'default'. Default is normally treated by the system as a typical PC-based browser.

Parameters

req
The request object.

Returns

true if the request resolves as default

Related Topics

ClientClassifier.isRecognized(HttpServletRequest)


isRecognized(HttpServletRequest) Method

public boolean isRecognized(HttpServletRequest req)
Determines if the client classification has been explicitly recognized. This is not the same as asking if the classification is not default. We don't know a priori if the classification was explicitly set to "default" or defaulted to it because no defined classification category could be determined. Thus, it is possible that two different request objects would return classifications of "default", but one which was explicitly resolved to the default category would return true for isRecognized and the other, not explicitly resolved, would return false for isRecognzed

Parameters

req
The request object.

Returns

true if the request's client classification was resolved to a category (even "default") explicitly.

Related Topics

ClientClassifier.isDefault(HttpServletRequest)