|
|||||||||
| 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.UDPServer
public class UDPServer
| Constructor Summary | |
|---|---|
UDPServer(int serverPort,
RequestListener handler)
Creates a new instance of UDPServer |
|
| Method Summary | |
|---|---|
static java.net.InetAddress |
getIPAddress(java.lang.String hostName)
A static utility method to perform reverse name lookup |
void |
handleAction()
Handle actions |
void |
runAction()
Implements the runnable action |
static void |
sendUDPRequest(java.net.InetAddress host,
int port,
byte[] data)
A static method for sending a UDP request |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPServer(int serverPort,
RequestListener handler)
| Method Detail |
|---|
public void runAction()
throws AutoMedException
runAction in interface uk.ac.ic.doc.automed.util.thread.ThreadableAutoMedExceptionpublic void handleAction()
handleAction in interface uk.ac.ic.doc.automed.util.thread.Threadable
public static void sendUDPRequest(java.net.InetAddress host,
int port,
byte[] data)
throws CommunicationException
host - an InetAddress object represent the IP address of target hostport - an int value represent target portdata - a byte array to send
CommunicationException
public static java.net.InetAddress getIPAddress(java.lang.String hostName)
throws CommunicationException
CommunicationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||