src/Jaspersoft/Service/LogCollectorService.php
public function logCollectorStates()
    {
        $url = self::makeUrl();
        $result = array();
        try {
            $response = $this->service->prepAndSend($url, array(200), "GET", null, true);
            $responseObject = json_decode($response);

            foreach ($responseObject->CollectorSettingsList as $lcs) {
                $result[] = LogCollectorSettings::createFromJSON($lcs);
            }

            /*
             * For now a facade has been created over this REST endpoint to return an empty array
             * in the case that we get a 404 with the message "Resource collectors not found"
             */
        } catch (RESTRequestException $e) {
            if ($e->message == "Resource collectors not found" && $e->statusCode == 404) {
                return $result;
            } else {
                throw $e;
            }
        }
        return $result;
    }
public function logCollectorStates()
    {
        $url = self::makeUrl();
        $result = array();
        try {
            $response = $this->service->prepAndSend($url, array(200), "GET", null, true);
            $responseObject = json_decode($response);

            foreach ($responseObject->CollectorSettingsList as $lcs) {
                $result[] = LogCollectorSettings::createFromJSON($lcs);
            }

            /*
             * For now a facade has been created over this REST endpoint to return an empty array
             * in the case that we get a 404 with the message "Resource collectors not found"
             */
        } catch (RESTRequestException $e) {
            if ($e->message == "Resource collectors not found" && $e->statusCode == 404) {
                return $result;
            } else {
                throw $e;
            }
        }
        return $result;
    }
public function logCollectorStates ( ) { $ url = self :: makeUrl ( ) ; $ result = array ( ) ; try { $ response = $ this -> service -> prepAndSend ( $ url , array ( 200 ) , "GET" , null , true ) ; $ responseObject = json_decode ( $ response ) ; foreach ( $ responseObject -> CollectorSettingsList as $ lcs ) { $ result [ ] = LogCollectorSettings :: createFromJSON ( $ lcs ) ; } /*
             * For now a facade has been created over this REST endpoint to return an empty array
             * in the case that we get a 404 with the message "Resource collectors not found"
             */ } catch ( RESTRequestException $ e ) { if ( $ e -> message == "Resource collectors not found" && $ e -> statusCode == 404 ) { return $ result ; } else { throw $ e ; } } return $ result ; }
Obtain metadata about all Log Collectors

@throws RESTRequestException
@return array A set of LogCollectorSettings objects defining existing log collector states
Obtain metadata about all Log Collectors