Examples of sendResponse()


Examples of javax.sip.ServerTransaction.sendResponse()

        serverTransaction.sendResponse(responseRing);
        //System.out.println("Ringing sent");
        //System.out.println("Ringing sent");
        Response responseOk = messageFactory.createResponse(Response.OK, requestEvent.getRequest());
        responseOk.addHeader(contactHeader);
        serverTransaction.sendResponse(responseOk);
        //System.out.println("OK sent");
        //System.out.println("Ok sent");
      } catch (SipException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

Examples of javax.sip.ServerTransaction.sendResponse()

     
      Response responseOk;
      try {
        responseOk = messageFactory.createResponse(Response.OK, requestEvent.getRequest());
        ServerTransaction serverTransaction = requestEvent.getServerTransaction();
        serverTransaction.sendResponse(responseOk);
       
      } catch (ParseException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (SipException e) {
View Full Code Here

Examples of javax.sip.SipProvider.sendResponse()

            // Check that it has a Refer-To, if not bad request
            ReferToHeader refTo = (ReferToHeader) refer.getHeader( ReferToHeader.NAME );
            if (refTo==null) {
                Response bad = messageFactory.createResponse(Response.BAD_REQUEST, refer);
                bad.setReasonPhrase( "Missing Refer-To" );
                sipProvider.sendResponse( bad );
                TestHarness.fail("Bad REFER request. Missing Refer-To.");
            }

            // New test: first time, only send 100 Trying, to test that retransmission
            // continues for non-INVITE requests (using UDP)
View Full Code Here

Examples of javax.sip.SipProvider.sendResponse()

            // New test: first time, only send 100 Trying, to test that retransmission
            // continues for non-INVITE requests (using UDP)
            // before(!) creating a ServerTransaction! Else retransmissions are filtered
            if (!tryingSent && "udp".equalsIgnoreCase(transport)) {
                tryingSent = true;
                sipProvider.sendResponse( messageFactory.createResponse(100, refer) );
                return;
            }

            // Always create a ServerTransaction, best as early as possible in the code
            Response response = null;
View Full Code Here

Examples of mongrel2.Mongrel2Handler.sendResponse()

    // echo message back to client
    final Response rsp = new Response();
    rsp.setPayload(contents);
    Assert.assertTrue(Arrays.equals(contents, rsp.getPayload()));
    handler.sendResponse(rsp, req);

    // read out message at client
    final byte[] msg1 = readInputStream(in, true);
    Assert.assertTrue("zero-length message", msg1.length > 0);
    // decode base64 message
View Full Code Here

Examples of org.apache.bookkeeper.proto.NIOServerFactory.Cnxn.sendResponse()

        bb.putLong(entryId);
        bb.flip();
        if (LOG.isTraceEnabled()) {
            LOG.trace("Add entry rc = " + rc + " for " + entryId + "@" + ledgerId);
        }
        src.sendResponse(new ByteBuffer[] { bb });
    }

}
View Full Code Here

Examples of org.apache.qpid.restapi.HttpTransaction.sendResponse()

        {
            _server.doDelete(tx);
        }
        else
        {
            tx.sendResponse(HTTP_BAD_METHOD, "text/plain", "405 Bad Method.");
        }
    }
}

View Full Code Here

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

    session.sendRequest(subscribe, Response.OK); // 2
   
    ServerTransaction tx = session.waitForNotify();
    Request notify = tx.getRequest(); // 3
    //System.out.println(notify);
    session.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("reg", ((EventHeader) notify.getHeader(EventHeader.NAME)).getEventType());
    Reginfo regInfo = getRegInfo(notify);
View Full Code Here

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

    registerSession.register(null, 1800); // 5 and 6
   
    tx = session.waitForNotify();
    notify = tx.getRequest(); // 7
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx); // 8
    regInfo = getRegInfo(notify);
    registration = regInfo.getRegistrationArray(0);
    assertEquals(1, registration.getContactArray().length);
    assertEquals(version + 1, regInfo.getVersion().intValue());
    assertEquals(State.ACTIVE, registration.getState());
View Full Code Here

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

   
    registerSession.register(null, 0); // 9 and  10
    tx = session.waitForNotify();
    notify = tx.getRequest(); // 11
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx); // 12
    regInfo = getRegInfo(notify);
    registration = regInfo.getRegistrationArray(0);
    assertEquals(1, registration.getContactArray().length);
    assertEquals(version + 2, regInfo.getVersion().intValue());
    assertEquals(State.TERMINATED, registration.getState());
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.