All Downloads are FREE. Search and download functionalities are using the official Maven repository.

test.load.concurrency.SelfTest Maven / Gradle / Ivy

There is a newer version: 1.3.0-91
Show newest version
package test.load.concurrency;

import javax.sip.SipProvider;

public class SelfTest {


    public static void main(String[] args) throws Exception {
        ProtocolObjects.init("shootist", true);
        if ( args.length == 0 ) Shootist.NDIALOGS = 10000;
        else Shootist.NDIALOGS = Integer.parseInt(args[0]);
        Shootist.addressFactory = ProtocolObjects.addressFactory;
        Shootist.messageFactory = ProtocolObjects.messageFactory;
        Shootist.headerFactory = ProtocolObjects.headerFactory;
        Shootist.sipStack = ProtocolObjects.sipStack;
        Shootist.transport = ProtocolObjects.transport;
        Shootist shootist = new Shootist();
        shootist.createProvider(shootist);

        ProtocolObjects.init("shootme", true);
        Shootme.addressFactory = ProtocolObjects.addressFactory;
        Shootme.messageFactory = ProtocolObjects.messageFactory;
        Shootme.headerFactory = ProtocolObjects.headerFactory;
        Shootme.sipStack = ProtocolObjects.sipStack;
        Shootme.transport = ProtocolObjects.transport;
        Shootme shootme = new Shootme();
        SipProvider sipProvider = shootme.createSipProvider();
        sipProvider.addSipListener(shootme);

        shootist.start = System.currentTimeMillis();
        for (int i = 0; i < Shootist.NDIALOGS; i++) {
            Thread.sleep(3);
            shootist.sendInvite();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy