org.w2mind.net
Class Proxy
java.lang.Object
java.lang.Thread
org.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.
|
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 |
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)
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