Class: ManageEngine::APMObjectHolder
- Inherits:
-
Object
- Object
- ManageEngine::APMObjectHolder
- Defined in:
- lib/agent/am_objectholder.rb
Constant Summary collapse
- @@objects =
nil
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#agent_initialized ⇒ Object
Returns the value of attribute agent_initialized.
-
#collector ⇒ Object
readonly
Returns the value of attribute collector.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#connector ⇒ Object
readonly
Returns the value of attribute connector.
-
#constants ⇒ Object
readonly
Returns the value of attribute constants.
-
#formatter ⇒ Object
Returns the value of attribute formatter.
-
#last_dispatch_time ⇒ Object
Returns the value of attribute last_dispatch_time.
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#shutdown ⇒ Object
Returns the value of attribute shutdown.
-
#store ⇒ Object
Returns the value of attribute store.
-
#txn_util ⇒ Object
readonly
Returns the value of attribute txn_util.
-
#util ⇒ Object
readonly
Returns the value of attribute util.
Class Method Summary collapse
Instance Method Summary collapse
-
#initializeObjects ⇒ Object
Don’t Change the Order of Initialize.
- #shutdownagent ⇒ Object
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def agent @agent end |
#agent_initialized ⇒ Object
Returns the value of attribute agent_initialized.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def agent_initialized @agent_initialized end |
#collector ⇒ Object (readonly)
Returns the value of attribute collector.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def collector @collector end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def config @config end |
#connector ⇒ Object (readonly)
Returns the value of attribute connector.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def connector @connector end |
#constants ⇒ Object (readonly)
Returns the value of attribute constants.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def constants @constants end |
#formatter ⇒ Object
Returns the value of attribute formatter.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def formatter @formatter end |
#last_dispatch_time ⇒ Object
Returns the value of attribute last_dispatch_time.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def last_dispatch_time @last_dispatch_time end |
#log ⇒ Object (readonly)
Returns the value of attribute log.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def log @log end |
#parser ⇒ Object
Returns the value of attribute parser.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def parser @parser end |
#shutdown ⇒ Object
Returns the value of attribute shutdown.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def shutdown @shutdown end |
#store ⇒ Object
Returns the value of attribute store.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def store @store end |
#txn_util ⇒ Object (readonly)
Returns the value of attribute txn_util.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def txn_util @txn_util end |
#util ⇒ Object (readonly)
Returns the value of attribute util.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def util @util end |
Class Method Details
.instance ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/agent/am_objectholder.rb', line 46 def self.instance if(@@objects==nil) @@objects = ManageEngine::APMObjectHolder.new @@objects.initializeObjects end return @@objects end |
Instance Method Details
#initializeObjects ⇒ Object
Don’t Change the Order of Initialize
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/agent/am_objectholder.rb', line 21 def initializeObjects begin @agent_initialized = false @shutdown = false @constants = ManageEngine::APMConstants.new @log = ManageEngine::APMLogger.new @util = ManageEngine::APMUtil.new @util.setLogger @log @config = ManageEngine::APMConfig.new @connector = ManageEngine::APMConnector.new @store = ManageEngine::APMMetricsStore.new @collector = ManageEngine::APMMetricsCollector.new @txn_util = ManageEngine::TransactionUtil.new @formatter = ManageEngine::APMMetricsFormatter.new @parser = ManageEngine::APMMetricsParser.new @agent = ManageEngine::APMAgent.new @last_dispatch_time = @@objects.util.currenttimemillis @@objects.log.debug "[APMObjectHolder] [ All Objects Initialized ] " rescue Exception => e puts "Error initializing APM Insight Ruby agent. #{e.}" @shutdown = true @agent_initialized = false end end |
#shutdownagent ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/agent/am_objectholder.rb', line 54 def shutdownagent ###@agent_initialized=false #@shutdown = true #@constants = nil #@util = nil #@config = nil #@connector = nil #@store = nil #@collector=nil #@instrumenter = nil #@formatter = nil #@parser = nil #@agent = nil #@log.info "[ APMObjectHolder ][ All Objects deleted ] " #@log = nil end |