Examples of sendResponse()


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

    session.sendRequest(subscribe, Response.OK); // 14
   
    tx = session.waitForNotify();
    notify = tx.getRequest(); // 15
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx); // 16
    subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.TERMINATED.toLowerCase(),
        subState.getState());
    regInfo = getRegInfo(notify);
    registration = regInfo.getRegistrationArray(0);
View Full Code Here

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

    session.sendRequest(subscribe, Response.OK);
   
    ServerTransaction tx = session.waitForNotify();
    Request notify = tx.getRequest();
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx);
    SubscriptionStateHeader subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.ACTIVE.toLowerCase(), subState.getState().toLowerCase());
    assertBetween(95, 100, subState.getExpires());
    assertEquals("reg", ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    Reginfo regInfo = getRegInfo(notify);
View Full Code Here

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

   
    getAlicePhone().unregister(null, 2000);
    assertLastOperationSuccess(getAlicePhone());
    tx = session.waitForNotify();
    notify = tx.getRequest();
    session.sendResponse(Response.OK, tx);
    regInfo = getRegInfo(notify);
    registration = regInfo.getRegistrationArray(0);
    assertEquals(1, registration.getContactArray().length);
    assertEquals(1, regInfo.getVersion().intValue());
    assertEquals(State.TERMINATED, registration.getState());
View Full Code Here

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

    session.sendRequest(subscribe, Response.OK);
   
    tx = session.waitForNotify();
    notify = tx.getRequest();
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx);
    subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.TERMINATED.toLowerCase(),
        subState.getState());
    regInfo = getRegInfo(notify);
    registration = regInfo.getRegistrationArray(0);
View Full Code Here

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

    winfoSession.sendRequest(subscribe, Response.OK); // 8
   
    tx = winfoSession.waitForNotify(); // 9
    Request notify = tx.getRequest();
    //System.out.println(notify);
    winfoSession.sendResponse(Response.OK, tx); // 10
    SubscriptionStateHeader subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.ACTIVE.toLowerCase(), subState.getState().toLowerCase());
    assertEquals(WatcherInfoEventPackage.NAME, ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    Watcherinfo watcherinfo = getWatcherinfo(notify);
    assertEquals(0, watcherinfo.getVersion().intValue());
View Full Code Here

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

    presence = getPresence(tx.getRequest());
    assertEquals(Basic.CLOSED, presence.getTupleArray()[0].getStatus().getBasic());
   
    tx = winfoSession.waitForNotify(); // 15
    notify = tx.getRequest();
    winfoSession.sendResponse(Response.OK, tx); // 16
    System.out.println(notify);
    subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.ACTIVE.toLowerCase(), subState.getState().toLowerCase());
    assertEquals(WatcherInfoEventPackage.NAME, ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    watcherinfo = getWatcherinfo(notify);
View Full Code Here

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

   
    subscribe = winfoSession.newSubsequentSubscribe(0); // 17
    winfoSession.sendRequest(subscribe, Response.OK); // 18
       
    tx = winfoSession.waitForNotify(); // 19
    winfoSession.sendResponse(Response.OK, tx); // 20
   
   
    subscribe = presenceSession.newSubsequentSubscribe(0); // 21
    presenceSession.sendRequest(subscribe, Response.OK); // 22
       
View Full Code Here

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

    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());
    assertEquals(Basic.CLOSED, presence.getTupleArray()[0].getStatus().getBasic());
   
   
    SubscribeSession winfoSession = new SubscribeSession(getAlicePhone(), "presence.winfo"); // 7
View Full Code Here

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

    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
    SubscriptionStateHeader subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.ACTIVE.toLowerCase(), subState.getState().toLowerCase());
    assertEquals(WatcherInfoEventPackage.NAME, ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    Watcherinfo watcherinfo = getWatcherinfo(notify);
    assertEquals(0, watcherinfo.getVersion().intValue());
View Full Code Here

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

    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
    SubscriptionStateHeader subState = (SubscriptionStateHeader) notify.getHeader(SubscriptionStateHeader.NAME);
    assertEquals(SubscriptionStateHeader.ACTIVE.toLowerCase(), subState.getState().toLowerCase());
    assertBetween(95, 100, subState.getExpires());
    assertEquals(WatcherInfoEventPackage.NAME, ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    Watcherinfo watcherinfo = getWatcherinfo(notify);
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.