Class: ActiveRubinstein::GeoLuceneEndpoint
- Inherits:
-
DRb::DRbObject
- Object
- DRb::DRbObject
- ActiveRubinstein::GeoLuceneEndpoint
- Defined in:
- lib/active_rubinstein/lucene_searcher.rb
Overview
A DRb object to jRubinstein#JeanLuc::GeoLucene
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize ⇒ GeoLuceneEndpoint
constructor
connects to the Rubinstein server and adds a server to the server pool.
Constructor Details
#initialize ⇒ GeoLuceneEndpoint
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 $!. return nil end rescue @@log.error $!. return nil end end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
16 17 18 |
# File 'lib/active_rubinstein/lucene_searcher.rb', line 16 def uri @uri end |