|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.service.AggregatingFilterFactory
public class AggregatingFilterFactory
A Factory to create different kinds of AggregatingFilter
. These
filters can be given to a ServiceRequest
to influence the selection
of services during matchmaking or their output when processing the result
from services after they have been called and before the result is given to
the ServiceCaller
. AggregatingFilter
s are only evaluated if
there is more than one service that match a ServiceRequest
.
There are basically two types of filter:
The service selection filters restrict the number of service calls to calling only one service even if more than one service would match.
If there is only one filter with the filtering function
AggregationFunction.oneOf
, then one of the available services is
selected randomly. If a filter with one of the other aggregation functions is
set, then the service with a matching non-functional parameter is called (see
description of the appropriate methods).
Service selection filters are given to a service request via
ServiceRequest.addAggregatingFilter(AggregatingFilter)
. Creation is
done with one of the methods createServiceSelectionFilter()
,
createServiceSelectionFilter(MinMax, String)
, or
createServiceSelectionFilter(MinMax, String, AbsLocation)
.
The output aggregation filters aggregate the output coming from several service calls.
These filters can be used, for example, when your request requires two outputs: a location and the brightness in that location, but you don't want to receive a whole list of all available data but just the one location with the maximum brightness.
Output aggregation filters are given to a service request via
ServiceRequest.addAggregatingOutputBinding(org.universAAL.middleware.service.owls.process.ProcessOutput, AggregatingFilter)
. Creation is done with one of the methods
createOutputAggregationFilter(MinMax)
or
createOutputAggregationFilter(MinMax, AbsLocation)
.
Nested Class Summary | |
---|---|
static class |
AggregatingFilterFactory.MinMax
Definition of the type of the aggregation functions: either a minimum value or a maximum value. |
Constructor Summary | |
---|---|
AggregatingFilterFactory()
|
Method Summary | |
---|---|
static AggregatingFilter |
createOutputAggregationFilter(AggregatingFilterFactory.MinMax type)
Creates an output aggregation filter. |
static AggregatingFilter |
createOutputAggregationFilter(AggregatingFilterFactory.MinMax type,
AbsLocation location)
Creates an output aggregation filter. |
static AggregatingFilter |
createServiceSelectionFilter()
Create a service selection filter that selects one service randomly. |
static AggregatingFilter |
createServiceSelectionFilter(AggregatingFilterFactory.MinMax type,
String nonFunctionalParamPropURI)
Creates a service selection filter that evaluates a non-functional parameter that is not related to a location. |
static AggregatingFilter |
createServiceSelectionFilter(AggregatingFilterFactory.MinMax type,
String nonFunctionalParamPropURI,
AbsLocation location)
Creates a service selection filter that evaluates a non-functional parameter that is related to a location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregatingFilterFactory()
Method Detail |
---|
public static AggregatingFilter createServiceSelectionFilter()
AggregationFunction.oneOf
. This filter is
ignored if another filter with a different function is added to the
service request.
AggregationFunction.oneOf
function.public static AggregatingFilter createServiceSelectionFilter(AggregatingFilterFactory.MinMax type, String nonFunctionalParamPropURI)
type
- determines whether either the service with the minimum value
or the maximum value of the parameter is called.nonFunctionalParamPropURI
- the URI of the non-functional parameter. Typical values are:
ServiceProfile.PROP_uAAL_MIN_QOS_RATING
,
ServiceProfile.PROP_uAAL_AVERAGE_QOS_RATING
,
ServiceProfile.PROP_uAAL_MAX_QOS_RATING
,
ServiceProfile.PROP_uAAL_MIN_RESPONSE_TIME
,
ServiceProfile.PROP_uAAL_AVERAGE_RESPONSE_TIME
,
ServiceProfile.PROP_uAAL_MAX_RESPONSE_TIME
,
ServiceProfile.PROP_uAAL_NUMBER_OF_QOS_RATINGS
,
ServiceProfile.PROP_uAAL_NUMBER_OF_RESPONSE_TIME_MEASUREMENTS
, ServiceProfile.PROP_uAAL_RESPONSE_TIMEOUT
.
public static AggregatingFilter createServiceSelectionFilter(AggregatingFilterFactory.MinMax type, String nonFunctionalParamPropURI, AbsLocation location)
type
- determines whether either the service with the minimum value
or the maximum value of the parameter is called.nonFunctionalParamPropURI
- ServiceProfile.PROP_uAAL_HOST_LOCATION
,
ServiceProfile.PROP_uAAL_SPATIAL_COVERAGE
.location
- the location that is referenced by the parameter.
public static AggregatingFilter createOutputAggregationFilter(AggregatingFilterFactory.MinMax type)
type
- determines whether the output with the minimum value or the
maximum value is used.
public static AggregatingFilter createOutputAggregationFilter(AggregatingFilterFactory.MinMax type, AbsLocation location)
type
- determines whether the output with the minimum value or the
maximum value is used.location
- the location that is referenced by the parameter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |