Package net.sf.jml.protocol.msnslp

Examples of net.sf.jml.protocol.msnslp.MsnslpResponse


        for (OutgoingMSG anOutgoing : outgoing) {
            session.sendSynchronousMessage(anOutgoing);
        }

        MsnslpMessage msnslpRequest = message.getSlpMessage();
    MsnslpResponse okSlpMessage = new MsnslpResponse();
    okSlpMessage.setTo(msnslpRequest.getFrom());
    okSlpMessage.setFrom(msnslpRequest.getTo());
    okSlpMessage.setVia(msnslpRequest.getVia());
    okSlpMessage.setCSeq(msnslpRequest.getCSeq() + 1);
    okSlpMessage.setCallId(msnslpRequest.getCallId());
    okSlpMessage.setMaxForwards(msnslpRequest.getMaxForwards());
    okSlpMessage.setContentType(msnslpRequest.getContentType());
    sessionId = msnslpRequest.getBodys().getIntProperty("SessionID", -1);
    StringHolder body = new StringHolder();
    body.setProperty("SessionID", sessionId);
    okSlpMessage.setBody(body.toString() + JmlConstants.LINE_SEPARATOR
        + "\0");

    int okSlpMessageLength = Charset.encodeAsByteArray(okSlpMessage
        .toString()).length;

    MsnP2PSlpMessage okMessage = new MsnP2PSlpMessage();
    okMessage.setSlpMessage(okSlpMessage);
    okMessage.setIdentifier(nextBaseId());
View Full Code Here


    @Override
  protected void parseP2PBody(ByteBuffer buffer) {
        slpMessage = new MsnslpRequest();
        if (!slpMessage.readFromBuffer(buffer)) {
            slpMessage = new MsnslpResponse();
            slpMessage.readFromBuffer(buffer);
        }
    }
View Full Code Here

   * @param invite Original invitation message.
   */
  private void sendDirectConnectionDeny(MsnP2PInvitationMessage invite) {

        MsnslpMessage msnslpRequest = invite.getSlpMessage();
    MsnslpResponse okSlpMessage = new MsnslpResponse();
    okSlpMessage.setStatusCode(405);
    okSlpMessage.setReasonPhrase("Not supported");
    okSlpMessage.setTo(msnslpRequest.getFrom());
    okSlpMessage.setFrom(msnslpRequest.getTo());
    okSlpMessage.setVia(msnslpRequest.getVia());
    okSlpMessage.setCSeq(msnslpRequest.getCSeq() + 1);
    okSlpMessage.setCallId(msnslpRequest.getCallId());
    okSlpMessage.setMaxForwards(msnslpRequest.getMaxForwards());
    okSlpMessage.setContentType(msnslpRequest.getContentType());
   
    StringHolder body = new StringHolder();
    body.setProperty("SessionID", transferSessionId);
    okSlpMessage.setBody(body.toString() + JmlConstants.LINE_SEPARATOR
        + "\0");

    int okSlpMessageLength = Charset.encodeAsByteArray(okSlpMessage
        .toString()).length;

    MsnP2PSlpMessage okMessage = new MsnP2PSlpMessage();
    okMessage.setSlpMessage(okSlpMessage);
    okMessage.setIdentifier(getNextIdentifier());
View Full Code Here

    else if (message instanceof MsnP2PSlpMessage &&
      ((MsnP2PSlpMessage) message).getSlpMessage() instanceof MsnslpResponse) {

      // Check that the response is for us
      MsnP2PSlpMessage p2pSlpMessage = (MsnP2PSlpMessage) message;
      MsnslpResponse slpResponse =
        (MsnslpResponse) p2pSlpMessage.getSlpMessage();
      int sessionId = slpResponse.getBodys().getIntProperty("SessionID");
      if (sessionId == transferSessionId) {
       
        // Check that it is a 200 response
        if (slpResponse.getStatusCode() == 200) {
         
          // Set next step
          state = TransferState.WAITING_DATA_PREPARATION;
         
          // Send ACK
View Full Code Here

TOP

Related Classes of net.sf.jml.protocol.msnslp.MsnslpResponse

Copyright © 2018 www.massapicom. 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.