Class: Contrast::Agent::Reporting::ApplicationSettings
- Inherits:
-
ApplicationReportingEvent
- Object
- ReportableHash
- ReportingEvent
- ApplicationReportingEvent
- Contrast::Agent::Reporting::ApplicationSettings
- Defined in:
- lib/contrast/agent/reporting/reporting_events/application_settings.rb
Overview
This class will initialize a GET request to be send to TS. The application settings endpoint is the way the Agent receives application sittings
Instance Attribute Summary
Attributes inherited from ReportingEvent
#event_endpoint, #event_method
Instance Method Summary collapse
-
#attach_headers(request) ⇒ Object
Attach the last server settings received timestamp to the request as it is required.
- #file_name ⇒ Object
-
#initialize ⇒ ApplicationSettings
constructor
A new instance of ApplicationSettings.
- #to_controlled_hash ⇒ Hash
Methods inherited from ReportableHash
#event_json, #valid?, #validate
Methods included from Components::Logger::InstanceMethods
Constructor Details
#initialize ⇒ ApplicationSettings
Returns a new instance of ApplicationSettings.
14 15 16 17 18 |
# File 'lib/contrast/agent/reporting/reporting_events/application_settings.rb', line 14 def initialize @event_method = :GET @event_endpoint = Contrast::Agent::Reporting::Endpoints.application_settings super() end |
Instance Method Details
#attach_headers(request) ⇒ Object
Attach the last server settings received timestamp to the request as it is required.
If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
28 29 30 |
# File 'lib/contrast/agent/reporting/reporting_events/application_settings.rb', line 28 def attach_headers request request['If-Modified-Since'] = since_last_update_httpdate end |
#file_name ⇒ Object
20 21 22 |
# File 'lib/contrast/agent/reporting/reporting_events/application_settings.rb', line 20 def file_name 'application-settings' end |
#to_controlled_hash ⇒ Hash
34 35 36 |
# File 'lib/contrast/agent/reporting/reporting_events/application_settings.rb', line 34 def to_controlled_hash {} end |