uk.ac.ic.doc.automed.p2p.communication
Class TCPClient
java.lang.Object
uk.ac.ic.doc.automed.p2p.communication.AbstractClient
uk.ac.ic.doc.automed.p2p.communication.TCPClient
- All Implemented Interfaces:
- uk.ac.ic.doc.automed.util.thread.Threadable
public class TCPClient
- extends AbstractClient
|
Constructor Summary |
TCPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler,
int readBufferSize)
|
|
Method Summary |
static java.io.InputStream |
getReplyForRequest(uk.ac.ic.doc.automed.p2p.messages.abstractlayer.AbstractMessage request,
java.net.InetAddress address,
int port)
A deprecated method: use runAction() instead |
void |
handleAction()
Handle thread's interrupted action |
void |
runAction()
Implement TCP communication process |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPClient
public TCPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler,
int readBufferSize)
getReplyForRequest
public static java.io.InputStream getReplyForRequest(uk.ac.ic.doc.automed.p2p.messages.abstractlayer.AbstractMessage request,
java.net.InetAddress address,
int port)
throws java.io.IOException
- A deprecated method: use
runAction() instead
- Throws:
java.io.IOException
runAction
public void runAction()
throws AutoMedException
- Implement TCP communication process
- Specified by:
runAction in interface uk.ac.ic.doc.automed.util.thread.Threadable- Specified by:
runAction in class AbstractClient
- Throws:
AutoMedException
handleAction
public void handleAction()
- Handle thread's interrupted action
- Specified by:
handleAction in interface uk.ac.ic.doc.automed.util.thread.Threadable- Specified by:
handleAction in class AbstractClient