Class: Gemfire::ApplicationCode

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

Overview

Application code in a cache server instance

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.



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/vas/gemfire/application_code.rb', line 35

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

  @name = details["name"]
  @version = details["version"]

  @application_code_image = ApplicationCodeImage.new(
      Util::LinkUtils.get_link_href(details, 'application-code-image'), client)

  @instance = CacheServerInstance.new(
      Util::LinkUtils.get_link_href(details, 'cache-server-group-instance'), client)
end

Instance Attribute Details

#application_code_imageApplicationCodeImage (readonly)

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

Returns:



29
30
31
# File 'lib/vas/gemfire/application_code.rb', line 29

def application_code_image
  @application_code_image
end

#instanceCacheServerInstance (readonly)

Returns the cache server instance that contains the application code.

Returns:



32
33
34
# File 'lib/vas/gemfire/application_code.rb', line 32

def instance
  @instance
end

#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

#to_sString

Returns a string representation of the application code.

Returns:

  • (String)

    a string representation of the application code



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

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