Class: ActiveRubinstein::JosekiEndpoint

Inherits:
DRb::DRbObject
  • Object
show all
Defined in:
lib/active_rubinstein/joseki_query.rb

Overview

A DRb object to jRubinstein#Joseki

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJosekiEndpoint

connects to the Rubinstein server and adds a server to the server pool.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/active_rubinstein/joseki_query.rb', line 17

def initialize

#       drb_servers.each do |uri|
#         STDERR.puts " * cRubinstein client @ " + uri
#         rubinstein = Rubinstein::SparqlEndpoint.new( DRbObject.new_with_uri( uri ) )
#       end

  @uri = ['druby','//' + DRB_SERVER, DRB_PORT].join(':')
  @@log.debug " * initializing SparqlEndpoint: " + @uri
  server = DRbObject.new_with_uri( @uri )
  begin
    @@log.debug " => reply from server: " + server.hello
    return server
  rescue
    @@log.error $!
    return nil
  end
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri.



14
15
16
# File 'lib/active_rubinstein/joseki_query.rb', line 14

def uri
  @uri
end