SOML API Documentation

org.w2mind.net
Class Proxy

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.w2mind.net.Proxy
All Implemented Interfaces:
Runnable

public class Proxy
extends Thread

This class can be used to send a single message to a URL and get a response. You should use the classes and wrappers available in the org.w2mind.soml package to create and parse the messages.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Proxy(String url, Message sentMessage)
          Connect to a given URL to send an SOML message.
Proxy(String url, String raw)
           
 
Method Summary
 boolean finished()
          Returns true when a message has been received
 Message getMessage()
          Returns the response received or an Error/Exception.
 void run()
          This method (or the start method) should not be called outside the class, as it is called by the constructor.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Proxy

public Proxy(String url,
             Message sentMessage)
Connect to a given URL to send an SOML message. The message can then be retreived using the getmessage method. Since it might take some time to retreive the message, the finished method will return true when a response has been received.


Proxy

public Proxy(String url,
             String raw)
Method Detail

run

public void run()
This method (or the start method) should not be called outside the class, as it is called by the constructor.


finished

public boolean finished()
Returns true when a message has been received


getMessage

public Message getMessage()
                   throws RunError
Returns the response received or an Error/Exception.

Throws:
RunError

Last updated 19th September 2003, w2mind.org