public class MessageFlowHarness extends TestHarness
Title: TCK
Description: JAIN SIP 1.1 Technology Compatibility Kit
Modifier and Type | Field and Description |
---|---|
protected static int |
counter |
protected test.tck.msgflow.SipEventCollector |
eventCollector |
protected static String |
EXTENSION_HDR |
protected static long |
MESSAGES_ARRIVE_FOR |
protected static int |
RETRY_OBJECT_DELETES |
protected static long |
RETRY_OBJECT_DELETES_AFTER |
protected ListeningPoint |
riListeningPoint |
protected SipProvider |
riSipProvider |
protected SipStack |
riSipStack |
protected static long |
STACKS_SHUT_DOWN_FOR |
protected static long |
STACKS_START_FOR |
protected ListeningPoint |
tiListeningPoint |
protected SipProvider |
tiSipProvider |
protected SipStack |
tiSipStack |
protected static long |
TRANSACTION_TIMES_OUT_FOR |
ABORT_ON_FAIL, abortOnFail, console, IMPLEMENTATION_PATH, LOCAL_ADDRESS, LOG_FILE_NAME, logFileName, path, printWriter, RI_PORT, riAddressFactory, riFactory, riHeaderFactory, riMessageFactory, testCounter, testResult, TI_PORT, tiAddressFactory, tiFactory, tiHeaderFactory, tiMessageFactory
Modifier | Constructor and Description |
---|---|
|
MessageFlowHarness(String name) |
protected |
MessageFlowHarness(String name,
boolean autoDialog) |
Modifier and Type | Method and Description |
---|---|
protected void |
addStatus(HeaderFactory headerFactory,
Request request) |
protected void |
addStatus(Request request,
Response response) |
protected Request |
createRequest(String method,
AddressFactory addressFactory,
HeaderFactory headerFactory,
MessageFactory messageFactory,
SipProvider srcProvider,
SipProvider dstProvider,
String contentType,
String contentSubType,
Object content)
Creates a SipRequest using the specified factories.
|
ContactHeader |
createRiContact()
Add a contact for the TI.
|
protected Request |
createRiInviteRequest(String contentType,
String contentSubType,
Object content)
Creates an invite request object using the RI.
|
protected Request |
createRiRegisterRequest()
Creates a register request object using the RI.
|
ContactHeader |
createTiContact()
Add a contact for the TI.
|
protected Request |
createTiInviteRequest(String contentType,
String contentSubType,
Object content)
Creates an invite request object using the TI.
|
protected Request |
createTiRegisterRequest()
Creates a register request object using the TI.
|
void |
setUp()
Initialises both RI and TI sip stacks and stack factories.
|
protected static void |
sleep(long sleepFor)
Waits during _no_less_ than sleepFor milliseconds.
|
void |
tearDown()
Sets all JAIN SIP objects to null and resets the SipFactory.
|
static void |
waitForMessage()
Waits during LISTEN_TIMEOUT milliseconds.
|
protected static void |
waitForTimeout()
Wait till a transaction times out.
|
static void |
waitLongForMessage() |
protected static void |
waitShortForMessage()
waits a good long time for messages.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNull, assertSame, assertTrue, assertTrue, checkImplementsInterface, fail, fail, fail, getImplementationPath, getRiProperties, getTiProperties, implementsInterface, logTestCompleted, logTestCompleted
protected static final String EXTENSION_HDR
protected static int counter
protected static long MESSAGES_ARRIVE_FOR
protected static int RETRY_OBJECT_DELETES
protected static long RETRY_OBJECT_DELETES_AFTER
protected static long STACKS_START_FOR
protected static long STACKS_SHUT_DOWN_FOR
protected static long TRANSACTION_TIMES_OUT_FOR
protected ListeningPoint riListeningPoint
protected ListeningPoint tiListeningPoint
protected SipProvider riSipProvider
protected SipProvider tiSipProvider
protected test.tck.msgflow.SipEventCollector eventCollector
protected SipStack riSipStack
protected SipStack tiSipStack
public MessageFlowHarness(String name)
protected MessageFlowHarness(String name, boolean autoDialog)
protected void addStatus(HeaderFactory headerFactory, Request request)
public void setUp() throws Exception
setUp
in class TestHarness
Exception
- All Let all exceptions that come from the underlying stack to
pass through and surface at JUnit Level.public void tearDown() throws Exception
tearDown
in class TestHarness
Exception
protected Request createRequest(String method, AddressFactory addressFactory, HeaderFactory headerFactory, MessageFactory messageFactory, SipProvider srcProvider, SipProvider dstProvider, String contentType, String contentSubType, Object content) throws Exception
method
- the request's methodaddressFactory
- the address factory to use when creating addressesheaderFactory
- the header factory to use when creating headersmessageFactory
- the message factory to use when creating headerssrcProvider
- the provider that will eventually be used to send the requestdstProvider
- the provider that will eventually dispatch the request to a
SipListenercontentType
- if the content parameter is not null then this is its content
type.contentSubType
- if the content parameter is not null then this is its sub
content type.content
- the content of the request. if null this parameter is ignoredException
- if anything should go wrong. further exception handling is
left to calling methods (or JUnit).protected Request createRiInviteRequest(String contentType, String contentSubType, Object content) throws TckInternalError
contentType
- if the content parameter is not null then this is its content
type.contentSubType
- if the content parameter is not null then this is its content
sub type.content
- if the request is to have any content then this parameter is
used to set it. Th content parameter is to be left to null if
the request won't have any content.TckInternalError
- if anything should gou wrong.protected Request createTiInviteRequest(String contentType, String contentSubType, Object content) throws TiUnexpectedError
contentType
- if the content parameter is not null then this is its content
type.contentSubType
- if the content parameter is not null then this is its content
sub type.content
- if the request is to have any content then this parameter is
used to set it. Th content parameter is to be left to null if
the request won't have any content.TiUnexpectedError
- if anything should gou wrong.protected Request createRiRegisterRequest() throws TckInternalError
TckInternalError
- if anything should gou wrong.protected Request createTiRegisterRequest() throws TiUnexpectedError
TiUnexpectedError
- if anything should gou wrong.public static void waitLongForMessage()
public static void waitForMessage()
protected static void waitForTimeout()
protected static void waitShortForMessage()
protected static void sleep(long sleepFor)
sleepFor
- the number of miliseconds to waitpublic ContactHeader createTiContact() throws Exception
Exception
public ContactHeader createRiContact() throws TckInternalError
TckInternalError
Copyright © 2015. All Rights Reserved.