com.ibm.ia.testdriver
Class IADebugReceiver
- java.lang.Object
-
- com.ibm.ia.testdriver.IADebugReceiver
-
- All Implemented Interfaces:
- DebugReceiver
public class IADebugReceiver extends java.lang.Object implements DebugReceiver
IADebugReceiver is a simple implementation of the DebugReceiver interface which can be used to receive DebugInfo objects from runtime servers. To use this class, you must call the addDebugReceiver method within the TestDriver class with an instance of this class. Several utility methods are provide to access and manage the DebugInfo cache.
-
-
Constructor Summary
Constructors Constructor and Description IADebugReceiver()
-
Method Summary
Methods Modifier and Type Method and Description void
addDebugInfo(DebugInfo instance, java.lang.String sourceagent)
Callback method from the TestDriver when a new DebugInfo object has been received by one of the servers specified in the debugservers property.void
clearDebugInfo()
clear all the DebugInfo objects from the debug cache.void
clearDebugInfo(java.lang.String agent)
clear all the DebugInfo objects from the debug cache for a given agent.DebugInfo[]
getDebugInfo(java.lang.String AgentName)
return DebugInfo objects from the cache.DebugInfo[]
getDebugInfo(java.lang.String AgentName, int timeout, java.util.concurrent.TimeUnit unit)
return DebugInfo objects from the cache.DebugInfo[]
getDebugInfo(java.lang.String AgentName, int timeout, java.util.concurrent.TimeUnit unit, int count)
return debugInfo Objects from the cache.void
setQueueSize(int size)
Set the maximum size of the debug event cache.
-
-
-
Method Detail
-
getDebugInfo
public DebugInfo[] getDebugInfo(java.lang.String AgentName, int timeout, java.util.concurrent.TimeUnit unit)
return DebugInfo objects from the cache.- Parameters:
AgentName
- : the name of the agent which generated the event, or "*" for all agentstimeout
- : period of time in seconds to wait for DebugInfo objectsunit
- : TimeUnit of the timeout- Returns:
- the number of objects received for the given agent.
-
getDebugInfo
public DebugInfo[] getDebugInfo(java.lang.String AgentName, int timeout, java.util.concurrent.TimeUnit unit, int count)
return debugInfo Objects from the cache.- Parameters:
AgentName
- : the name of the agent which generated the event or "*" for all agentstimeout
- : period of time in seconds to wait for DebugInfo objectsunit
- : TimeUnit of the timeoutcount
- : number of desired events- Returns:
- the events for the given agent.
-
getDebugInfo
public DebugInfo[] getDebugInfo(java.lang.String AgentName)
return DebugInfo objects from the cache.- Parameters:
AgentName
- : the name of the agent which generated the event or "*" for all agents- Returns:
- all the DebugInfo objects found for the given AgentName
-
clearDebugInfo
public void clearDebugInfo()
clear all the DebugInfo objects from the debug cache.
-
clearDebugInfo
public void clearDebugInfo(java.lang.String agent)
clear all the DebugInfo objects from the debug cache for a given agent.- Parameters:
AgentName
- : the name of the agent whose events will be deleted.
-
addDebugInfo
public void addDebugInfo(DebugInfo instance, java.lang.String sourceagent)
Callback method from the TestDriver when a new DebugInfo object has been received by one of the servers specified in the debugservers property.- Specified by:
addDebugInfo
in interfaceDebugReceiver
- Parameters:
instance
- - the received DebugInfo objectsourceagent
- - the name of the agent which generated the event
-
setQueueSize
public void setQueueSize(int size)
Set the maximum size of the debug event cache. The default size of the queue is 1000 entries.- Parameters:
size
- - the new maximum size
-
-