public class UDPIoTest
extends java.lang.Object
Monitoring must be enabled via the agent JVM parameter!
| Modifier and Type | Class and Description |
|---|---|
private static class |
UDPIoTest.ServerMainThread
Implements a simple thread for accepting network connections.
|
| Modifier and Type | Field and Description |
|---|---|
private static int |
clientRead
Stores the bytes read by the client.
|
private static int |
clientWrite
Stores the bytes written by the client.
|
private static int |
port
Defines the port used for communication operations.
|
private static int |
serverRead
Stores the bytes read by the server.
|
private static int |
serverWrite
Stores the bytes written by the server.
|
| Modifier | Constructor and Description |
|---|---|
private |
UDPIoTest()
Prevents this class from being instantiated from outside.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
asserts()
The automated tests using assert statements.
|
private static void |
execute()
Starts the server part, executes the client part and prints out the
results.
|
static void |
main(java.lang.String[] args)
Starts the test.
|
private static void |
printDatagramPacket(java.lang.String prefix,
java.net.DatagramPacket packet)
Prints a given packet (for debugging).
|
private static int port
private static int clientRead
private static int clientWrite
private static int serverRead
private static int serverWrite
private UDPIoTest()
private static void execute()
throws java.io.IOException
java.io.IOException - any kind of network I/O problem in the clientpublic static void main(java.lang.String[] args)
throws java.io.IOException
args - command line arguments (ignored)java.io.IOException - any kind of network I/O problem in the clientprivate static final void printDatagramPacket(java.lang.String prefix,
java.net.DatagramPacket packet)
prefix - a textual prefixpacket - the package to printpublic static void asserts()
EndSystem
annotation.