Class: Gemfire::ApplicationCode

Inherits:
Shared::Resource show all
Defined in:
lib/vas/gemfire/application_code.rb

Overview

Application code in a cache server instance

Direct Known Subclasses

PendingApplicationCode

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Constructor Details

#initialize(location, client) ⇒ ApplicationCode

Returns a new instance of ApplicationCode.



29
30
31
32
33
34
35
36
37
# File 'lib/vas/gemfire/application_code.rb', line 29

def initialize(location, client)
  super(location, client)

  @name = details['name']
  @version = details['version']

  @application_code_image_location = Util::LinkUtils.get_link_href(details, 'application-code-image')
  @instance_location = Util::LinkUtils.get_link_href(details, 'cache-server-group-instance')
end

Instance Attribute Details

#nameString (readonly)

Returns the name of the application code.

Returns:

  • (String)

    the name of the application code



23
24
25
# File 'lib/vas/gemfire/application_code.rb', line 23

def name
  @name
end

#versionString (readonly)

Returns the version of the application code.

Returns:

  • (String)

    the version of the application code



26
27
28
# File 'lib/vas/gemfire/application_code.rb', line 26

def version
  @version
end

Instance Method Details

#application_code_imageApplicationCodeImage

Returns the image that was used to create the application code.

Returns:



40
41
42
# File 'lib/vas/gemfire/application_code.rb', line 40

def application_code_image
  @application_code_image ||= ApplicationCodeImage.new(@application_code_image_location, client)
end

#instanceCacheServerInstance

Returns the cache server instance that contains the application code.

Returns:



45
46
47
# File 'lib/vas/gemfire/application_code.rb', line 45

def instance
  @instance ||= CacheServerInstance.new(@instance_location, client)
end

#to_sString

Returns a string representation of the application code.

Returns:

  • (String)

    a string representation of the application code



50
51
52
# File 'lib/vas/gemfire/application_code.rb', line 50

def to_s #:nodoc:
  "#<#{self.class} name='#@name' version=#@version>"
end