org.mobicents.media.server.testsuite.general
Class AbstractTestCase

java.lang.Object
  extended by org.mobicents.media.server.testsuite.general.AbstractTestCase
All Implemented Interfaces:
jain.protocol.ip.mgcp.JainMgcpListener, java.io.Serializable, java.lang.Runnable, java.util.EventListener, org.mobicents.mgcp.stack.JainMgcpExtendedListener
Direct Known Subclasses:
AnnouncementTest

public abstract class AbstractTestCase
extends java.lang.Object
implements org.mobicents.mgcp.stack.JainMgcpExtendedListener, java.lang.Runnable, java.io.Serializable

Author:
baranowb
See Also:
Serialized Form

Field Summary
static java.lang.String _CASE_FILE
           
protected  java.util.concurrent.ScheduledExecutorService callCreator
           
protected  java.util.concurrent.ScheduledFuture callCreatorTask
           
protected  CallDisplayInterface callDisplay
           
protected  java.util.Map<java.lang.Long,AbstractCall> callSequenceToCall
           
protected  java.net.InetAddress clientTestNodeAddress
           
protected  int completedCallNumber
           
protected  int errorCallNumber
           
protected  java.util.logging.Logger logger
           
protected  java.util.Map<java.lang.Integer,AbstractCall> mgcpTransactionToProxy
           
protected  CallStateTableModel model
           
protected  int ongoingCallNumber
           
protected  org.mobicents.mgcp.stack.JainMgcpStackProviderImpl provider
           
protected  java.util.Map<java.lang.String,AbstractCall> requestIdIdToProxy
           
protected  javax.sdp.SdpFactory sdpFactory
           
protected  java.net.InetAddress serverJbossBindAddress
           
protected  org.mobicents.mgcp.stack.JainMgcpStackImpl stack
           
protected  java.io.File testDumpDirectory
           
protected  long testTimesTamp
           
protected  java.util.concurrent.ScheduledExecutorService timeGuard
           
protected  int totalCalls
           
 
Constructor Summary
AbstractTestCase()
           
AbstractTestCase(CallDisplayInterface cdi)
           
 
Method Summary
 void addCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent, AbstractCall cp)
           
 void addCall(java.lang.String ri, AbstractCall cp)
           
 void callStateChanged(AbstractCall c)
           
protected  void decrementOngoingCall()
           
protected  AbstractCall getCall(int txID)
           
protected  AbstractCall getCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent)
           
 AbstractCall getCall(java.lang.String ri)
           
 AbstractCall getCallBySequence(java.lang.Long seq)
           
 CallDisplayInterface getCallDisplayInterface()
           
 java.net.InetAddress getClientTestNodeAddress()
           
 int getCompletedCallNumber()
           
 int getErrorCallNumber()
           
abstract  AbstractCall getNewCall()
           
 int getOngoingCallNumber()
           
 org.mobicents.mgcp.stack.JainMgcpStackProviderImpl getProvider()
           
 javax.sdp.SdpFactory getSdpFactory()
           
 java.net.InetAddress getServerJbossBindAddress()
           
 CallStateTableModel getTableModel()
           
 java.io.File getTestDumpDirectory()
           
 long getTestTimeStamp()
           
protected  void incrementCompletedCall()
           
protected  void incrementErrorCall()
           
protected  void incrementOngoignCall()
           
 void onCallLengthChange()
           
 void onCPSChange()
           
 void processMgcpCommandEvent(jain.protocol.ip.mgcp.JainMgcpCommandEvent command)
           
 void processMgcpResponseEvent(jain.protocol.ip.mgcp.JainMgcpResponseEvent response)
           
 void removeCall(int txID)
           
 void removeCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent)
           
 void removeCall(java.lang.String ri)
           
 void run()
           
protected  void serialize()
          Perofrms all serialization actions
 void setCallDisplay(CallDisplayInterface cdi)
           
 void setCallDisplay(CallDisplayInterface cdi, java.io.File testDumpDirectory)
           
 void start()
           
 void stop()
           
 void transactionEnded(int arg0)
           
 void transactionRxTimedOut(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandTimedOut)
           
 void transactionTxTimedOut(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandTimeOut)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient java.util.logging.Logger logger

_CASE_FILE

public static final transient java.lang.String _CASE_FILE
See Also:
Constant Field Values

sdpFactory

protected transient javax.sdp.SdpFactory sdpFactory

callDisplay

protected transient CallDisplayInterface callDisplay

callSequenceToCall

protected java.util.Map<java.lang.Long,AbstractCall> callSequenceToCall

model

protected transient CallStateTableModel model

clientTestNodeAddress

protected java.net.InetAddress clientTestNodeAddress

serverJbossBindAddress

protected java.net.InetAddress serverJbossBindAddress

stack

protected transient org.mobicents.mgcp.stack.JainMgcpStackImpl stack

provider

protected transient org.mobicents.mgcp.stack.JainMgcpStackProviderImpl provider

mgcpTransactionToProxy

protected transient java.util.Map<java.lang.Integer,AbstractCall> mgcpTransactionToProxy

requestIdIdToProxy

protected transient java.util.Map<java.lang.String,AbstractCall> requestIdIdToProxy

testTimesTamp

protected long testTimesTamp

testDumpDirectory

protected transient java.io.File testDumpDirectory

callCreator

protected final transient java.util.concurrent.ScheduledExecutorService callCreator

callCreatorTask

protected transient java.util.concurrent.ScheduledFuture callCreatorTask

timeGuard

protected final transient java.util.concurrent.ScheduledExecutorService timeGuard

ongoingCallNumber

protected int ongoingCallNumber

errorCallNumber

protected int errorCallNumber

completedCallNumber

protected int completedCallNumber

totalCalls

protected int totalCalls
Constructor Detail

AbstractTestCase

public AbstractTestCase()

AbstractTestCase

public AbstractTestCase(CallDisplayInterface cdi)
                 throws java.net.UnknownHostException,
                        java.lang.IllegalStateException
Throws:
java.net.UnknownHostException
java.lang.IllegalStateException
Method Detail

incrementOngoignCall

protected void incrementOngoignCall()

decrementOngoingCall

protected void decrementOngoingCall()

incrementErrorCall

protected void incrementErrorCall()

incrementCompletedCall

protected void incrementCompletedCall()

getTestTimeStamp

public long getTestTimeStamp()

getClientTestNodeAddress

public java.net.InetAddress getClientTestNodeAddress()

getServerJbossBindAddress

public java.net.InetAddress getServerJbossBindAddress()

getCallDisplayInterface

public CallDisplayInterface getCallDisplayInterface()

getCallBySequence

public AbstractCall getCallBySequence(java.lang.Long seq)

callStateChanged

public void callStateChanged(AbstractCall c)

getTableModel

public CallStateTableModel getTableModel()

getCompletedCallNumber

public int getCompletedCallNumber()

getErrorCallNumber

public int getErrorCallNumber()

getOngoingCallNumber

public int getOngoingCallNumber()

stop

public void stop()

start

public void start()
           throws jain.protocol.ip.mgcp.CreateProviderException,
                  java.util.TooManyListenersException
Throws:
jain.protocol.ip.mgcp.CreateProviderException
java.util.TooManyListenersException

setCallDisplay

public void setCallDisplay(CallDisplayInterface cdi)
                    throws java.net.UnknownHostException,
                           java.lang.IllegalStateException
Throws:
java.net.UnknownHostException
java.lang.IllegalStateException

setCallDisplay

public void setCallDisplay(CallDisplayInterface cdi,
                           java.io.File testDumpDirectory)
                    throws java.net.UnknownHostException,
                           java.lang.IllegalStateException
Throws:
java.net.UnknownHostException
java.lang.IllegalStateException

onCPSChange

public void onCPSChange()

onCallLengthChange

public void onCallLengthChange()

getNewCall

public abstract AbstractCall getNewCall()

getSdpFactory

public javax.sdp.SdpFactory getSdpFactory()

getTestDumpDirectory

public java.io.File getTestDumpDirectory()

run

public void run()
Specified by:
run in interface java.lang.Runnable

getProvider

public org.mobicents.mgcp.stack.JainMgcpStackProviderImpl getProvider()

processMgcpCommandEvent

public void processMgcpCommandEvent(jain.protocol.ip.mgcp.JainMgcpCommandEvent command)
Specified by:
processMgcpCommandEvent in interface jain.protocol.ip.mgcp.JainMgcpListener

processMgcpResponseEvent

public void processMgcpResponseEvent(jain.protocol.ip.mgcp.JainMgcpResponseEvent response)
Specified by:
processMgcpResponseEvent in interface jain.protocol.ip.mgcp.JainMgcpListener

transactionEnded

public void transactionEnded(int arg0)
Specified by:
transactionEnded in interface org.mobicents.mgcp.stack.JainMgcpExtendedListener

transactionRxTimedOut

public void transactionRxTimedOut(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandTimedOut)
Specified by:
transactionRxTimedOut in interface org.mobicents.mgcp.stack.JainMgcpExtendedListener

transactionTxTimedOut

public void transactionTxTimedOut(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandTimeOut)
Specified by:
transactionTxTimedOut in interface org.mobicents.mgcp.stack.JainMgcpExtendedListener

getCall

protected AbstractCall getCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent)

getCall

protected AbstractCall getCall(int txID)

removeCall

public void removeCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent)

removeCall

public void removeCall(int txID)

addCall

public void addCall(java.lang.String ri,
                    AbstractCall cp)

removeCall

public void removeCall(java.lang.String ri)

getCall

public AbstractCall getCall(java.lang.String ri)

addCall

public void addCall(jain.protocol.ip.mgcp.JainMgcpEvent mgcpEvent,
                    AbstractCall cp)

serialize

protected void serialize()
Perofrms all serialization actions



Copyright © 2009. All Rights Reserved.