Class: CaRuby::ApplicationService
- Inherits:
-
Object
- Object
- CaRuby::ApplicationService
- Defined in:
- lib/caruby/database/application_service.rb
Overview
An ApplicationService wraps a caCORE application service.
Class Method Summary collapse
-
.for(url) ⇒ Object
The caCORE application service remote instance.
Class Method Details
.for(url) ⇒ Object
Returns the caCORE application service remote instance.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/caruby/database/application_service.rb', line 10 def self.for(url) # Load the Java class on demand the first time this method is called. if @url.nil? then java_import Java::gov.nih.nci.system.applicationservice.ApplicationServiceProvider end # If the url differs from the current remote instance, then reinitialize. unless @url == url then @url = url logger.debug { "Connecting to service provider at #{@url}..." } @current = ApplicationServiceProvider.remote_instance(@url) end @current end |