|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cycling74.net.UdpReceiver
public class UdpReceiver
UDP receiver. An internal Callback is maintained from a specified method name and object. The specified method must take an array of Atoms as its only argument. When data is received, it is translated to an array of Atoms and passed to the specified method. When a UdpReceiver is no longer needed its close() method should be called.
Constructor Summary | |
---|---|
UdpReceiver()
Creates a UdpReceiver. |
|
UdpReceiver(int port)
Creates a UdpReceiver with specified port. |
Method Summary | |
---|---|
void |
close()
Should be called when the UdpReceiver is no longer needed. |
int |
getPort()
Get the port. |
void |
run()
|
void |
setActive(boolean b)
Turns the UdpReceiver on or off. |
void |
setCallback(java.lang.Object toCallIn,
java.lang.String methodName)
Set the data receiving callback method. |
void |
setDebugString(java.lang.String s)
Sets the debug string. |
void |
setPort(int port)
Set the port. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UdpReceiver(int port)
port
- the port to listen topublic UdpReceiver()
Method Detail |
---|
public void setPort(int port)
port
- the port to listen to.public int getPort()
public void setDebugString(java.lang.String s)
s
- the String to be output as part of thepublic void setActive(boolean b)
b
- true turns it onpublic void run()
run
in interface java.lang.Runnable
public void setCallback(java.lang.Object toCallIn, java.lang.String methodName)
toCallIn
- the object that contains the methodmethodName
- the name of the method to callpublic void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |