org.apache.cxf.jaxrs.ext
Interface ResourceComparator


public interface ResourceComparator

Can be used to affect the way the JAXRS selection algorithm chooses between multiple matching resource classes and methods


Method Summary
 int compare(ClassResourceInfo cri1, ClassResourceInfo cri2, Message message)
          Compares two resource classes
 int compare(OperationResourceInfo oper1, OperationResourceInfo oper2, Message message)
          Compares two resource methods
 

Method Detail

compare

int compare(ClassResourceInfo cri1,
            ClassResourceInfo cri2,
            Message message)
Compares two resource classes

Parameters:
cri1 - First resource class
cri2 - Second resource class
message - incoming message
Returns:
-1 if cri1 < cri2, 1 if if cri1 > cri2, 0 otherwise

compare

int compare(OperationResourceInfo oper1,
            OperationResourceInfo oper2,
            Message message)
Compares two resource methods

Parameters:
oper1 - First resource method
oper2 - Second resource method
message - incoming message
Returns:
-1 if oper1 < oper2, 1 if if oper1 > oper2, 0 otherwise


Apache CXF