|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cycling74.net.TcpReceiver
public class TcpReceiver
TCP 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 TcpReceiver is no longer needed its close() method should be called. created on 24-May-2004
Constructor Summary | |
---|---|
TcpReceiver()
Creates a TcpReceiver. |
|
TcpReceiver(int port)
Creates a TcpReceiver with specified port. |
|
TcpReceiver(int port,
java.lang.Object toCallIn,
java.lang.String methodName)
Creates a TcpReceiver with specified port, receiving method name, and containing object. |
Method Summary | |
---|---|
void |
close()
Must be called when the TcpReceiver is no longer needed. |
int |
getPort()
Gets the port. |
void |
run()
|
void |
setActive(boolean b)
Turns the receiver on or off. |
void |
setCallback(java.lang.Object toCallIn,
java.lang.String methodName)
Sets the receiving callback. |
void |
setDebugString(java.lang.String debugString)
Set the name of 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 TcpReceiver(int port, java.lang.Object toCallIn, java.lang.String methodName)
port
- the port over which to receive datatoCallIn
- the object tnat contains the receivnig methodmethodName
- the name of the receiving methodpublic TcpReceiver()
public TcpReceiver(int port)
port
- Method Detail |
---|
public void setActive(boolean b)
b
- true turns it onpublic void setDebugString(java.lang.String debugString)
debugString
- this String will be part of the message
printed to the Max window in the event of a networking failure.public void setPort(int port)
port
- the port to receive data overpublic int getPort()
public void close()
public void run()
run
in interface java.lang.Runnable
public void setCallback(java.lang.Object toCallIn, java.lang.String methodName)
toCallIn
- object that contains the receiving method.methodName
- name of the method to receive data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |