* Use this API to count filtered the set of vpnsessionaction resources.
* filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
*/
public static long count_filtered(nitro_service service, String filter) throws Exception{
vpnsessionaction obj = new vpnsessionaction();
options option = new options();
option.set_count(true);
option.set_filter(filter);
vpnsessionaction[] response = (vpnsessionaction[]) obj.getfiltered(service, option);
if (response != null) {
return response[0].__count;
}
return 0;