pureweb.util. DefaultCommandFilter

The DefaultCommandFilter class is an implementation of CommandFilter that aggregates redundant input events, thereby reducing the number of commands automatically sent by the client to the service application.

This default implementation aggregates view resize and ping events, as well as mouse move and mouse wheel events. Since this filtering only applies to commands automatically generated by PureWeb for input events, changing this default is rare.

Method Summary

filterCommands
Filters the specified array of commands, removing redundant input event, resize, and ping commands.
getCommandFilterFlags
Returns the command filter flags currently set.
setCommandFilterFlags
Sets the filter flags representing the types of commands to filter out.

Constructor

new DefaultCommandFilter(filterFlags)

Initializes a new instance of DefaultCommandFilter.
Parameters:
Name Type Argument Description
filterFlags number <optional>
A bitwise combination of filter flags representing the types of commands to filter (see CommandFilterFlags). If not specified, will filter redundant input event, resize, and ping commands.

Extends

Method Detail

filterCommands(commands)

Filters the specified array of commands, removing redundant input event, resize, and ping commands.
Parameters:
Name Type Description
commands Array The array of commands to filter.

getCommandFilterFlags() → {number}

Returns the command filter flags currently set.

setCommandFilterFlags(flags)

Sets the filter flags representing the types of commands to filter out.
Parameters:
Name Type Description
flags number A bitwise combination of command filter flags to control how commands should be filtered.