|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.p2p.communication.AbstractClient
uk.ac.ic.doc.automed.p2p.communication.UDPClient
public class UDPClient
| Field Summary |
|---|
| Fields inherited from class uk.ac.ic.doc.automed.p2p.communication.AbstractClient |
|---|
ackExpected, dataToSend, handler, serverHostName, serverPort |
| Constructor Summary | |
|---|---|
UDPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler)
Creates a new instance of UDPClient |
|
UDPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler,
byte[] dataToSend)
Creates a new instance of UDPClient |
|
| Method Summary | |
|---|---|
byte[] |
getReceivedData()
Get the data received from server |
void |
handleAction()
Handle thread's interrupted action |
void |
runAction()
Implement UDP communication process |
void |
setDataToSend(byte[] dataToSend,
boolean ackExpected)
Set the data to send (with acknowledgement specified) |
| Methods inherited from class uk.ac.ic.doc.automed.p2p.communication.AbstractClient |
|---|
setDataToSend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler,
byte[] dataToSend)
serverHostName - host name of the UDP serverserverPort - UDP port on serverhandler - an RequestListener object for processing messagesdataToSend - in array of bytes
public UDPClient(java.lang.String serverHostName,
int serverPort,
RequestListener handler)
serverHostName - host name of the UDP serverserverPort - UDP port on server| Method Detail |
|---|
public void setDataToSend(byte[] dataToSend,
boolean ackExpected)
dataToSend - an array of bytes to send via UDPackExpected - whether or not to expect an acknowledgement
public void runAction()
throws AutoMedException
runAction in interface uk.ac.ic.doc.automed.util.thread.ThreadablerunAction in class AbstractClientAutoMedExceptionpublic void handleAction()
handleAction in interface uk.ac.ic.doc.automed.util.thread.ThreadablehandleAction in class AbstractClientpublic byte[] getReceivedData()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||