org.universAAL.middleware.service
Class AggregatingFilterFactory

Package class diagram package AggregatingFilterFactory
java.lang.Object
  extended by org.universAAL.middleware.service.AggregatingFilterFactory

public class AggregatingFilterFactory
extends Object

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. AggregatingFilters are only evaluated if there is more than one service that match a ServiceRequest. There are basically two types of filter:

Author:
Carsten Stocklöw

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

AggregatingFilterFactory

public AggregatingFilterFactory()
Method Detail

createServiceSelectionFilter

public static AggregatingFilter createServiceSelectionFilter()
Create a service selection filter that selects one service randomly. The aggregation function is AggregationFunction.oneOf. This filter is ignored if another filter with a different function is added to the service request.

Returns:
a filter with a AggregationFunction.oneOf function.

createServiceSelectionFilter

public 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.

Parameters:
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.
Returns:
a new aggregating filter.

createServiceSelectionFilter

public 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.

Parameters:
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.
Returns:
a new aggregating filter.

createOutputAggregationFilter

public static AggregatingFilter createOutputAggregationFilter(AggregatingFilterFactory.MinMax type)
Creates an output aggregation filter.

Parameters:
type - determines whether the output with the minimum value or the maximum value is used.
Returns:
a new aggregating filter.

createOutputAggregationFilter

public static AggregatingFilter createOutputAggregationFilter(AggregatingFilterFactory.MinMax type,
                                                              AbsLocation location)
Creates an output aggregation filter.

Parameters:
type - determines whether the output with the minimum value or the maximum value is used.
location - the location that is referenced by the parameter.
Returns:
a new aggregating filter.


Copyright © 2014 universAAL Consortium. All Rights Reserved.