Class: ActiveRubinstein::JenaEndpoint
- Inherits:
-
DRb::DRbObject
- Object
- DRb::DRbObject
- ActiveRubinstein::JenaEndpoint
- Defined in:
- lib/active_rubinstein/jena_query.rb
Overview
A DRb object to jRubinstein#JeanLuc::Picard
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize ⇒ JenaEndpoint
constructor
adds a JenaEndpoint to the server pool.
Constructor Details
#initialize ⇒ JenaEndpoint
adds a JenaEndpoint to the server pool.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/active_rubinstein/jena_query.rb', line 8 def initialize # jdrb_servers.each do |uri| # STDERR.puts " * jRubinstein client @ " + uri # jrubinstein = Rubinstein::JenaEndpoint.new( DRbObject.new_with_uri( uri ) ) # end # return nil @uri = ['druby','//' + JDRB_SERVER, JDRB_PORT].join(':') begin @@log.rubinstein " * initializing JenaEndpoint: " + @uri server = DRbObject.new_with_uri( @uri ) @@log.debug server.inspect if server.ping then @@log.debug " => reply from server: " + server.hello return server else raise ConnectionFailedError, $!. end rescue raise ConnectionFailedError, $!. end end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/active_rubinstein/jena_query.rb', line 5 def uri @uri end |