|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--edu.berkeley.guir.lib.net.SimpleClient
Sends data to a specified address and port, and echoes anything received.
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Jun 16 1998, JH
Created class
- GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
Touched for GUIRLib release
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface edu.berkeley.guir.lib.net.NetConstants |
ANYPORT, DEFAULT_TIMEOUT, NO_TIMEOUT |
| Constructor Summary | |
SimpleClient(InetAddress dstAddr,
int dstPort)
Use the current address using any port to connect to the specified destination and port. |
|
SimpleClient(InetAddress dstAddr,
int dstPort,
int iTimeout)
Use the current address using any port to connect to the specified destination and port with the specified timeout. |
|
SimpleClient(int srcPort,
InetAddress dstAddr,
int dstPort)
Use the current address and the specified port to connect to the specified destination and port. |
|
SimpleClient(int srcPort,
InetAddress dstAddr,
int dstPort,
int iTimeout)
Use the current address and the specified port to connect to the specified destination and port. |
|
| Method Summary | |
void |
close()
Close the client. |
void |
finalize()
|
static void |
main(String[] argv)
|
void |
run()
Connect the socket to the destination. |
void |
setDestinationAddress(InetAddress dstAddr)
Set the address to connect to. |
void |
setDestinationPort(int dstPort)
Set the port to connect to. |
void |
setFilter(String strFilter)
Set the characters to filter out. |
void |
setInputStream(InputStream istream)
Input from this stream will be sent to the socket. |
void |
setOutputStream(OutputStream ostream)
Anything read from the socket goes to this OutputStream. |
void |
setSourcePort(int srcPort)
Set the port to connect from. |
void |
setTimeout(int timeout)
Set the timeout value. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SimpleClient(InetAddress dstAddr,
int dstPort)
dstAddr - is the address to connect to.dstPort - is the port to connect to.
public SimpleClient(InetAddress dstAddr,
int dstPort,
int iTimeout)
dstAddr - is the address to connect to.dstPort - is the port to connect to.iTimeout - is the length of time to wait for a connection.
public SimpleClient(int srcPort,
InetAddress dstAddr,
int dstPort)
srcPort - is the port to connect from.dstAddr - is the address to connect to.dstPort - is the port to connect to.
public SimpleClient(int srcPort,
InetAddress dstAddr,
int dstPort,
int iTimeout)
srcPort - is the port to connect from.dstAddr - is the address to connect to.dstPort - is the port to connect to.iTimeout - is the length of time to wait for a connection.| Method Detail |
public void run()
run in class Threadpublic void close()
public void finalize()
finalize in class Objectpublic void setFilter(String strFilter)
strFilter - is the String of characters to filter out before
sending the message to the server.public void setSourcePort(int srcPort)
srcPort - is the port to connect from.public void setDestinationPort(int dstPort)
srcPort - is the port to connect to.public void setDestinationAddress(InetAddress dstAddr)
dstAddr - is the Internet address to connect to.public void setTimeout(int timeout)
timeout - is the timeout to set to. Negative values not allowed.public void setInputStream(InputStream istream)
istream - will be redirected as input to the socket.public void setOutputStream(OutputStream ostream)
ostream - is where socket output will be redirected.
public static void main(String[] argv)
throws Exception
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||