Examples of sendRequest()


Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    assertEquals(getAliceUri(), watcher.getStringValue());
    assertEquals(Status.ACTIVE, watcher.getStatus());
     
   
    subscribe = winfoSession.newSubsequentSubscribe(0); // 17
    winfoSession.sendRequest(subscribe, Response.OK); // 18
       
    tx = winfoSession.waitForNotify(); // 19
    winfoSession.sendResponse(Response.OK, tx); // 20
   
   
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

        Request publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 60); // 1
        publishSession.sendRequest(publish, SipResponse.OK); // 2
       
        SubscribeSession presenceSession = new SubscribeSession(getBobPhone(), "presence");
    Request subscribe = presenceSession.newInitialSubscribe(0, getAliceUri()); // 3
    presenceSession.sendRequest(subscribe, Response.OK); // 4

    ServerTransaction tx = presenceSession.waitForNotify(); // 5
    System.out.println("5:\n" + tx.getRequest());
    presenceSession.sendResponse(Response.OK, tx); // 6
    Presence presence = getPresence(tx.getRequest());
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    assertEquals(Basic.CLOSED, presence.getTupleArray()[0].getStatus().getBasic());
   
   
    SubscribeSession winfoSession = new SubscribeSession(getAlicePhone(), "presence.winfo"); // 7
    subscribe = winfoSession.newInitialSubscribe(60, getAliceUri());
    winfoSession.sendRequest(subscribe, Response.OK); // 8
   
    tx = winfoSession.waitForNotify(); // 9
    Request notify = tx.getRequest();
    System.out.println("9:\n" +notify);
    winfoSession.sendResponse(Response.OK, tx); // 10
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

 
    public void testMinExpires() throws Exception
    {      
        SubscribeSession session = new SubscribeSession(getAlicePhone(), "presence.winfo");
        Request request = session.newInitialSubscribe(1, getAliceUri());
        Response response = session.sendRequest(request, SipResponse.INTERVAL_TOO_BRIEF);
        MinExpiresHeader minExpiresHeader = (MinExpiresHeader) response.getHeader(MinExpiresHeader.NAME);
        assertNotNull(minExpiresHeader);
    }
   
}
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

   */
  public void testSubscription()
  {   
    SubscribeSession winfoSession = new SubscribeSession(getBobPhone(), "presence.winfo"); // 1
    Request subscribe = winfoSession.newInitialSubscribe(100, getBobUri());
    winfoSession.sendRequest(subscribe, Response.OK); // 2
   
    ServerTransaction tx = winfoSession.waitForNotify(); // 3
    Request notify = tx.getRequest();
    //System.out.println(notify);
    winfoSession.sendResponse(Response.OK, tx); // 4
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    assertEquals(0, watcherList.getWatcherArray().length);
   
   
    SubscribeSession presenceSession = new SubscribeSession(getAlicePhone(), "presence");
    subscribe = presenceSession.newInitialSubscribe(100, getBobUri()); // 5
    presenceSession.sendRequest(subscribe, Response.OK); // 6
   
    tx = winfoSession.waitForNotify(); // 7
    notify = tx.getRequest();
    //System.out.println(notify);
    winfoSession.sendResponse(Response.OK, tx); // 8
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    tx = presenceSession.waitForNotify(); // 9
    presenceSession.sendResponse(Response.OK, tx); // 10
   
   
    subscribe = presenceSession.newSubsequentSubscribe(0); // 11
    presenceSession.sendRequest(subscribe, Response.OK); // 12
   
    tx = winfoSession.waitForNotify(); // 13
    notify = tx.getRequest();
    // System.out.println(notify);
    winfoSession.sendResponse(Response.OK, tx); // 14
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

   */
  public void testSubscription2()
  {   
    SubscribeSession presenceSession = new SubscribeSession(getAlicePhone(), "presence");
    Request subscribe = presenceSession.newInitialSubscribe(100, getBobUri()); // 1
    presenceSession.sendRequest(subscribe, Response.OK); // 2

    ServerTransaction tx = presenceSession.waitForNotify(); // 3
    presenceSession.sendResponse(Response.OK, tx); // 4
   
    SubscribeSession winfoSession = new SubscribeSession(getBobPhone(), "presence.winfo"); // 5
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    ServerTransaction tx = presenceSession.waitForNotify(); // 3
    presenceSession.sendResponse(Response.OK, tx); // 4
   
    SubscribeSession winfoSession = new SubscribeSession(getBobPhone(), "presence.winfo"); // 5
    subscribe = winfoSession.newInitialSubscribe(0, getBobUri());
    winfoSession.sendRequest(subscribe, Response.OK); // 6
   
    tx = winfoSession.waitForNotify(); // 7
    Request notify = tx.getRequest();
    //System.out.println(notify);
    winfoSession.sendResponse(Response.OK, tx); // 8
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

        Request publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 60); // 1
        publishSession.sendRequest(publish, SipResponse.OK); // 2
   
    SubscribeSession presenceSession = new SubscribeSession(getAlicePhone(), "presence");
    Request subscribe = presenceSession.newInitialSubscribe(100, getBobUri()); // 3
    presenceSession.sendRequest(subscribe, Response.OK); // 4

    ServerTransaction tx = presenceSession.waitForNotify(); // 5
    //System.out.println("3:\n" + tx.getRequest());
    presenceSession.sendResponse(Response.OK, tx); // 6
    Presence presence = getPresence(tx.getRequest());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.