Class: VORuby::Plastic::Application::Full
- Defined in:
- lib/voruby/plastic/applications.rb
Instance Attribute Summary collapse
-
#call_back_url ⇒ Object
readonly
Returns the value of attribute call_back_url.
-
#http_server ⇒ Object
readonly
Returns the value of attribute http_server.
-
#supported_messages ⇒ Object
readonly
Returns the value of attribute supported_messages.
-
#xmlrpc_server ⇒ Object
readonly
Returns the value of attribute xmlrpc_server.
Attributes inherited from Base
#app_id, #config, #description, #hub_id, #icon_url, #ivorn, #name, #plastic_version
Instance Method Summary collapse
-
#initialize(supported_messages = {}, port = 8080, mount_point = '/RPC2', name = nil, description = nil, icon_url = nil, ivorn = nil, plastic_version = 0.5) ⇒ Full
constructor
A new instance of Full.
- #register ⇒ Object
- #shutdown ⇒ Object
- #wait_for_requests ⇒ Object
Methods inherited from Base
#get_message_registered_ids, #get_name, #get_registered_ids, #get_understood_messages, #request, #request_asynch, #request_to_subset, #request_to_subset_asynch, #unregister
Constructor Details
#initialize(supported_messages = {}, port = 8080, mount_point = '/RPC2', name = nil, description = nil, icon_url = nil, ivorn = nil, plastic_version = 0.5) ⇒ Full
Returns a new instance of Full.
109 110 111 112 113 114 115 116 117 |
# File 'lib/voruby/plastic/applications.rb', line 109 def initialize(={}, port=8080, mount_point='/RPC2', name=nil, description=nil, icon_url=nil, ivorn=nil, plastic_version=0.5) super(name, description, icon_url, ivorn, plastic_version) () @supported_messages = @core_messages.merge() initialize_xmlrpc_server(port, mount_point) end |
Instance Attribute Details
#call_back_url ⇒ Object (readonly)
Returns the value of attribute call_back_url.
107 108 109 |
# File 'lib/voruby/plastic/applications.rb', line 107 def call_back_url @call_back_url end |
#http_server ⇒ Object (readonly)
Returns the value of attribute http_server.
107 108 109 |
# File 'lib/voruby/plastic/applications.rb', line 107 def http_server @http_server end |
#supported_messages ⇒ Object (readonly)
Returns the value of attribute supported_messages.
107 108 109 |
# File 'lib/voruby/plastic/applications.rb', line 107 def @supported_messages end |
#xmlrpc_server ⇒ Object (readonly)
Returns the value of attribute xmlrpc_server.
107 108 109 |
# File 'lib/voruby/plastic/applications.rb', line 107 def xmlrpc_server @xmlrpc_server end |
Instance Method Details
#register ⇒ Object
155 156 157 158 |
# File 'lib/voruby/plastic/applications.rb', line 155 def register @app_id = call('plastic.hub.registerXMLRPC', self.name, self..keys.collect{ |msg| msg.to_s }, self.call_back_url.to_s) end |
#shutdown ⇒ Object
164 165 166 167 |
# File 'lib/voruby/plastic/applications.rb', line 164 def shutdown self.unregister self.http_server.shutdown end |
#wait_for_requests ⇒ Object
160 161 162 |
# File 'lib/voruby/plastic/applications.rb', line 160 def wait_for_requests @server_thread.join end |