Class: ActiveRubinstein::GeoLuceneEndpoint

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

Overview

A DRb object to jRubinstein#JeanLuc::GeoLucene

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGeoLuceneEndpoint

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



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/active_rubinstein/lucene_searcher.rb', line 19

def initialize
  @uri = ['druby','//' + GEOLUCENE_SERVER, GEOLUCENE_PORT].join(':')
  begin
    @@log.rubinstein " * initializing GeoLuceneEndpoint: " + @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
      @@log.error $!.message
      return nil
    end

  rescue
    @@log.error $!.message
    return nil
  end
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri.



16
17
18
# File 'lib/active_rubinstein/lucene_searcher.rb', line 16

def uri
  @uri
end