net.jxta.search.util
Class RainbowClient

java.lang.Object
  |
  +--net.jxta.search.util.RainbowClient

public class RainbowClient
extends java.lang.Object

Simple client for the Rainbow category matching server.

Author:
John Beatty (jbeatty@gonesilent.com)

Constructor Summary
RainbowClient()
           
 
Method Summary
static void main(java.lang.String[] args)
          RainbowClient unit test.
 java.lang.String query(java.lang.String aHostname, java.lang.String aPort, java.lang.String aQuery)
          Queries the Rainbow server give a hostname, port, and query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RainbowClient

public RainbowClient()
Method Detail

query

public java.lang.String query(java.lang.String aHostname,
                              java.lang.String aPort,
                              java.lang.String aQuery)
                       throws java.io.IOException
Queries the Rainbow server give a hostname, port, and query. Returns a string of the responses in unmodified format. The last newline at the end of the response is truncated off, such that the response looks like this: "Arts 0.5550379481 Regional 0.1598615846 World 0.07620988059" TODO Currently the method throws IOException. This may be changed to suite your environment.

main

public static void main(java.lang.String[] args)
RainbowClient unit test. You can either past in hostname, port, and query on the command line, or you can pass in nothing. In the case that you pass in nothing, the unit test defaults to something I picked when writing this driver.