Package com.anaptecs.jeaf.workload.api
Interface RequestTypeKey
-
- All Known Implementing Classes:
GenericRequestTypeKey
public interface RequestTypeKey
A request type key can be used to identify the type of a request. This is needed to dispatch a certain request to the best fitting pipeline according to the configuration. It's important to understand that the request type key is not a key for each individual request but just a key for the type of the request. Thus is expected that every different request type like SOAP or REST operation has its unique request type key. Depending on the used technology e.g. SOAP or REST there is the possibility the to simplify the configuration of load management by summarizing request types together. Therefore this class defines the methodreduceKey()
. It is required that implementations of this interface also overwriteObject.equals(Object)
andObject.hashCode()
. Otherwise request dispatching will not work properly.- Author:
- JEAF Development Team
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getKey()
Method returns a String representation of the key.RequestTypeKey
reduceKey()
Method is used to reduce the key.
-
-
-
Method Detail
-
getKey
java.lang.String getKey()
Method returns a String representation of the key. It is expected that for the same type of request always the same key is returned.- Returns:
String
String representation of the key.
-
reduceKey
RequestTypeKey reduceKey()
Method is used to reduce the key. There may be request type keys that have a hierarchical structure like REST request or can be grouped by some other criteria. Goal of this method is to reduce the current key by removing one level from its structure if possible.- Returns:
RequestTypeKey
Reduced request type key. If reducing the key is not supported or no longer possible then then method should return null.
-
-