| test.tck.TestHarness test.tck.msgflow.MessageFlowHarness
All known Subclasses: test.tck.msgflow.SipProviderTest, test.tck.msgflow.NonInviteServerTransactionsStateMachineTest, test.tck.msgflow.ClientTransactionTest, test.tck.msgflow.DialogTest, test.tck.msgflow.InviteServerTransactionsStateMachineTest, test.tck.msgflow.TransactionTimeoutEventTest, test.tck.msgflow.DialogStateMachineTest, test.tck.msgflow.NonInviteClientTransactionsStateMachineTest, test.tck.msgflow.InviteClientTransactionsStateMachineTest, test.tck.msgflow.ServerTransactionTest,
MessageFlowHarness | public class MessageFlowHarness extends TestHarness (Code) | |
Title: TCK
Description: JAIN SIP 1.1 Technology Compatibility Kit
author: Emil Ivov Network Research Team, Louis Pasteur University, author: Strasbourg, France author: Ivelin Ivanov version: 1.0 |
Method Summary | |
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. | public 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. | public 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. | public 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. | public void | tearDown() Sets all JAIN SIP objects to null and resets the SipFactory. | public static void | waitForMessage() Waits during LISTEN_TIMEOUT milliseconds. | protected static void | waitForTimeout() Wait till a transaction times out. | protected static void | waitShortForMessage() waits a good long time for messages. |
EXTENSION_HDR | final protected static String EXTENSION_HDR(Code) | | |
MESSAGES_ARRIVE_FOR | protected static long MESSAGES_ARRIVE_FOR(Code) | | |
RETRY_OBJECT_DELETES | protected static int RETRY_OBJECT_DELETES(Code) | | |
RETRY_OBJECT_DELETES_AFTER | protected static long RETRY_OBJECT_DELETES_AFTER(Code) | | |
STACKS_SHUT_DOWN_FOR | protected static long STACKS_SHUT_DOWN_FOR(Code) | | |
STACKS_START_FOR | protected static long STACKS_START_FOR(Code) | | |
TRANSACTION_TIMES_OUT_FOR | protected static long TRANSACTION_TIMES_OUT_FOR(Code) | | |
counter | protected static int counter(Code) | | |
MessageFlowHarness | public MessageFlowHarness(String name)(Code) | | |
MessageFlowHarness | protected MessageFlowHarness(String name, boolean autoDialog)(Code) | | |
createRequest | protected Request createRequest(String method, AddressFactory addressFactory, HeaderFactory headerFactory, MessageFactory messageFactory, SipProvider srcProvider, SipProvider dstProvider, String contentType, String contentSubType, Object content) throws Exception(Code) | | Creates a SipRequest using the specified factories. The request has the
specified method and is meant to be sent from srcProvider to dstProvider.
This method is prefered to manual creation of requests as it helps avoid
using RI objects instead of corresponding TI objects (or vice versa).
Parameters: method - the request's method Parameters: addressFactory - the address factory to use when creating addresses Parameters: headerFactory - the header factory to use when creating headers Parameters: messageFactory - the message factory to use when creating headers Parameters: srcProvider - the provider that will eventually be used to send the request Parameters: dstProvider - the provider that will eventually dispatch the request to aSipListener Parameters: contentType - if the content parameter is not null then this is its contenttype. Parameters: contentSubType - if the content parameter is not null then this is its subcontent type. Parameters: content - the content of the request. if null this parameter is ignored a request generated by the specified factories and destined to gofrom srcProvider to dstProvider throws: Exception - if anything should go wrong. further exception handling isleft to calling methods (or JUnit). |
createRiInviteRequest | protected Request createRiInviteRequest(String contentType, String contentSubType, Object content) throws TckInternalError(Code) | | Creates an invite request object using the RI. This invite request is
meant to be sent to the TI
Parameters: contentType - if the content parameter is not null then this is its contenttype. Parameters: contentSubType - if the content parameter is not null then this is its contentsub type. Parameters: content - if the request is to have any content then this parameter isused to set it. Th content parameter is to be left to null ifthe request won't have any content. an RI->TI invite request throws: TckInternalError - if anything should gou wrong. |
createRiRegisterRequest | protected Request createRiRegisterRequest() throws TckInternalError(Code) | | Creates a register request object using the RI. This register request is
meant to be sent to the TI
an RI->TI register request throws: TckInternalError - if anything should gou wrong. |
createTiInviteRequest | protected Request createTiInviteRequest(String contentType, String contentSubType, Object content) throws TiUnexpectedError(Code) | | Creates an invite request object using the TI. This invite request is
meant to be sent to the RI
Parameters: contentType - if the content parameter is not null then this is its contenttype. Parameters: contentSubType - if the content parameter is not null then this is its contentsub type. Parameters: content - if the request is to have any content then this parameter isused to set it. Th content parameter is to be left to null ifthe request won't have any content. an TI->RI invite request throws: TiUnexpectedError - if anything should gou wrong. |
createTiRegisterRequest | protected Request createTiRegisterRequest() throws TiUnexpectedError(Code) | | Creates a register request object using the TI. This register request is
meant to be sent to the RI
a TI->RI register request throws: TiUnexpectedError - if anything should gou wrong. |
setUp | public void setUp() throws java.lang.Exception(Code) | | Initialises both RI and TI sip stacks and stack factories.
throws: java.lang.Exception - All Let all exceptions that come from the underlying stack topass through and surface at JUnit Level. |
sleep | protected static void sleep(long sleepFor)(Code) | | Waits during _no_less_ than sleepFor milliseconds. Had to implement it on
top of Thread.sleep() to guarantee minimum sleep time.
Parameters: sleepFor - the number of miliseconds to wait |
waitForMessage | public static void waitForMessage()(Code) | | Waits during LISTEN_TIMEOUT milliseconds. This method is called after a
message has been sent so that it has the time to propagate though the
sending and receiving stack
|
waitForTimeout | protected static void waitForTimeout()(Code) | | Wait till a transaction times out.
|
waitShortForMessage | protected static void waitShortForMessage()(Code) | | waits a good long time for messages.
|
Methods inherited from test.tck.TestHarness | public static void assertEquals(Object me, Object him)(Code)(Java Doc) public static void assertEquals(String me, String him)(Code)(Java Doc) public static void assertEquals(String reason, Object me, Object him)(Code)(Java Doc) public static void assertEquals(String reason, String me, String him)(Code)(Java Doc) public static void assertNotNull(String reason, Object thing)(Code)(Java Doc) public static void assertNull(String reason, Object thing)(Code)(Java Doc) public static void assertSame(String diagnostic, Object thing, Object thingie)(Code)(Java Doc) public static void assertTrue(boolean cond)(Code)(Java Doc) public static void assertTrue(String diagnostic, boolean cond)(Code)(Java Doc) public static void checkImplementsInterface(Class implementationClass, Class jainInterface)(Code)(Java Doc) public static void fail(String message)(Code)(Java Doc) public static void fail(String message, Exception ex)(Code)(Java Doc) public static void fail()(Code)(Java Doc) protected String getImplementationPath()(Code)(Java Doc) public static Properties getRiProperties(boolean autoDialog)(Code)(Java Doc) public static Properties getTiProperties()(Code)(Java Doc) public static boolean implementsInterface(Class implementationClass, Class jainInterface)(Code)(Java Doc) public void logTestCompleted()(Code)(Java Doc) public void logTestCompleted(String info)(Code)(Java Doc) public void setUp() throws Exception(Code)(Java Doc) public void tearDown() throws Exception(Code)(Java Doc)
|
|
|