Authentication
API v8.1 SP2

com.rsa.ace.techservice.udpserver
Class AceTestAgent

java.lang.Object
  extended by java.lang.Thread
      extended by com.rsa.ace.techservice.udpserver.AceTestAgent
All Implemented Interfaces:
java.lang.Runnable

public class AceTestAgent
extends java.lang.Thread

Ace "Echo" TestAgent

Trivial ACE/Agent driver. THIS TEST NEEDS CONSIDERABLE RE-WORK TO BE USEFUL. THIS IMPLEMENTS THE INITIAL "REQ" RANDOM INTEGER ECHO PROTOCOL NO LONGER SUPPORTED.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AceTestAgent(java.lang.String hostName, int portNumber, java.lang.ThreadGroup tg)
          Construct an agent to send packets to the host and port provided.
 
Method Summary
 int getErrorCount()
          Gets the number of protocol errors.
 int getPacketCount()
          Gets the number of packets sent by this thread.
static void main(java.lang.String[] args)
          ACE Agent Unit Test Main.
 void run()
          Main Agent thread function.
 java.lang.String toString()
          Converts the agent to a String.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AceTestAgent

public AceTestAgent(java.lang.String hostName,
                    int portNumber,
                    java.lang.ThreadGroup tg)
             throws java.net.UnknownHostException,
                    java.net.SocketException
Construct an agent to send packets to the host and port provided. The thread adds itself to the thread group provided.

Parameters:
hostName - The name of the ACE/Server host.
portNumber - The port number on 'hostName' to which packets will be sent.
tg - The thread group to which this thread will add itself.
Throws:
java.net.UnknownHostException - If the destination host is unknown.
java.net.SocketException - If socket errors occur.
Method Detail

run

public void run()
Main Agent thread function. Spins on the server as quickly at it answers. Expect the trivial value-echo protocol.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getErrorCount

public int getErrorCount()
Gets the number of protocol errors.

Returns:
The number of badly formed packets returned.

getPacketCount

public int getPacketCount()
Gets the number of packets sent by this thread.

Returns:
The number of packets processed.

toString

public java.lang.String toString()
Converts the agent to a String.

Overrides:
toString in class java.lang.Thread
Returns:
A String representation of the agent.

main

public static void main(java.lang.String[] args)
ACE Agent Unit Test Main. This can be passed the hostname and the port number to which the packets are sent. For example: java -cp . ace/AceAgent bowness1-pc 5500 Defaults to "localhost" on port 5500.


Authentication
API v8.1 SP2

Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved.