Class: ActiveRubinstein::JenaEndpoint

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

Overview

A DRb object to jRubinstein#JeanLuc::Picard

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJenaEndpoint

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, $!.message
    end

  rescue
    raise ConnectionFailedError, $!.message
  end
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri.



5
6
7
# File 'lib/active_rubinstein/jena_query.rb', line 5

def uri
  @uri
end