Time of day connection filter
This simple filter allows you to accept or reject connections based on the weekday and/or the time. This is mostly meant as a simple demonstration, though it might be useful to some people.
Optional. This is a text field that can contain a comma-separated list of weekdays that are acceptable, for instance:
monday, tuesday, thursday, friday
The names are case-insensitive. If this parameter is specified, then connections will be accepted only if the current time (on the Gallium Data server) shows that the current day is in the list.
Optional. This is a text field that can specify hours or ranges of hours, for instance:
8, 10, 12-15, 18-23
Connections will be rejected if they do not fall on an hour specified by this parameter.
Parameter: Execute code
log: a Logger object
context: an object containing the following properties:
socket: a Java Socket object, which you can use to get the client's address
result: the current result as determined by the filter. This is a result object, it has two main properties: success (boolean) and errorMessage (string).
This is probably not very realistic, but it's simple: