Package javax.slee

Examples of javax.slee.ActivityContextInterface


  private void initDtmfDetector(MsConnection connection, String endpointName) {
    MsSignalDetector dtmfDetector = msProvider
        .getSignalDetector(endpointName);
    try {
      ActivityContextInterface dtmfAci = mediaAcif
          .getActivityContextInterface(dtmfDetector);
      dtmfAci.attach(getSbbContext().getSbbLocalObject());
      dtmfDetector.receive(Basic.DTMF, connection, new String[] {});
    } catch (UnrecognizedActivityException e) {
    }
  }
View Full Code Here


            .debug("Obtained dialog in onThirdPCCTriggerEvent : callId = "
                + dialog.getCallId().getCallId());
      }

      // Get activity context from factory
      ActivityContextInterface sipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(dialog);

      ActivityContextInterface clientSipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(ct);

     
      calleeSession.setDialog(dialog);
      sa.setCalleeSession(calleeSession);

      /**
       * Actually callerSession is not required for this example and clean
       * up is needed
       */
      Session callerSession = new Session();

      // Create a new caller address from caller URI specified in the
      // event (the real caller address) since we need this in the next
      // INVITE.
      callerAddress = getSipUtils().convertURIToAddress(callerSip);
      callerSession.setSipAddress(callerAddress);
      // Since we don't have the client transaction for the caller yet,
      // just set the to be cancelled client transaction to null.
      callerSession.setToBeCancelledClientTransaction(null);
      sa.setCallerSession(callerSession);

      // put the callId for the callee dialog in the cache
      getCacheUtility().put(calleeCallId, sa);

      ChildRelation relation = getCallControlSbbChild();
      // Create child SBB
      CallControlSbbLocalObject child = (CallControlSbbLocalObject) relation
          .create();

      setChildSbbLocalObject(child);

      child.setParent(getSbbContext().getSbbLocalObject());

      // Attach child SBB to the activity context
      sipACI.attach(child);
      clientSipACI.attach(child);
      sipACI.attach(this.getSbbContext().getSbbLocalObject());

      // Send the INVITE request
      ct.sendRequest();

View Full Code Here

    MsSignalGenerator generator = msProvider
        .getSignalGenerator(announcementEndpoint);

    try {
      ActivityContextInterface generatorActivity = mediaAcif
          .getActivityContextInterface(generator);
      generatorActivity.attach(getSbbContext().getSbbLocalObject());

      String announcementFile = "file:" + audioFilePath;
      generator.apply(Announcement.PLAY,
          new String[] { announcementFile });
View Full Code Here

        logger
            .debug("Obtained dialog in onThirdPCCTriggerEvent : callId = "
                + dialog.getCallId().getCallId());
      }
      // Get activity context from factory
      ActivityContextInterface sipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(dialog);

      ActivityContextInterface clientSipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(ct);

      calleeSession.setDialog(dialog);
      sa.setCalleeSession(calleeSession);

      /**
       * Actually callerSession is not required for this example and clean
       * up is needed
       */
      Session callerSession = new Session();

      // Create a new caller address from caller URI specified in the
      // event (the real caller address) since we need this in the next
      // INVITE.
      callerAddress = getSipUtils().convertURIToAddress(callerSip);
      callerSession.setSipAddress(callerAddress);
      // Since we don't have the client transaction for the caller yet,
      // just set the to be cancelled client transaction to null.
      callerSession.setToBeCancelledClientTransaction(null);
      sa.setCallerSession(callerSession);

      // put the callId for the callee dialog in the cache
      getCacheUtility().put(calleeCallId, sa);

      ChildRelation relation = getCallControlSbbChild();
      // Create child SBB
      CallControlSbbLocalObject child = (CallControlSbbLocalObject) relation
          .create();

      setChildSbbLocalObject(child);

      child.setParent(getSbbContext().getSbbLocalObject());

      // Attach child SBB to the activity context
      sipACI.attach(child);
      clientSipACI.attach(child);
      sipACI.attach(this.getSbbContext().getSbbLocalObject());
      // Send the INVITE request
      ct.sendRequest();

    } catch (ParseException parExc) {
View Full Code Here

    MsSignalGenerator generator = msProvider
        .getSignalGenerator(announcementEndpoint);

    try {
      ActivityContextInterface generatorActivity = mediaAcif
          .getActivityContextInterface(generator);
      generatorActivity.attach(getSbbContext().getSbbLocalObject());

      String announcementFile = pathToAudioDirectory
          + "OrderDeliveryDate.wav";
      generator.apply(Announcement.PLAY,
          new String[] { announcementFile });
View Full Code Here

      MsSignalGenerator generator = msProvider.getSignalGenerator(this
          .getAnnouncementEndpointName());

      try {
        ActivityContextInterface generatorActivity = mediaAcif
            .getActivityContextInterface(generator);
        generatorActivity.attach(getSbbContext().getSbbLocalObject());

        String announcementFile = "file:" + audioFilePath;
        generator.apply(Announcement.PLAY,
            new String[] { announcementFile });
View Full Code Here

          logger.error("Error getting dialog", e);
        }
      }

      // Get activity context from factory
      ActivityContextInterface sipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(dialog);

      ActivityContextInterface clientSipACI = getSipActivityContextInterfaceFactory()
          .getActivityContextInterface(ct);

      if (logger.isDebugEnabled()) {
        logger
            .debug("Obtained dialog in onThirdPCCTriggerEvent : callId = "
                + dialog.getCallId().getCallId());
      }
      dialog.terminateOnBye(true);
      calleeSession.setDialog(dialog);
      sa.setCalleeSession(calleeSession);

      /**
       * Actually callerSession is not required for this example and clean
       * up is needed
       */
      Session callerSession = new Session();

      // Create a new caller address from caller URI specified in the
      // event (the real caller address) since we need this in the next
      // INVITE.
      callerAddress = getSipUtils().convertURIToAddress(callerSip);
      callerSession.setSipAddress(callerAddress);
      // Since we don't have the client transaction for the caller yet,
      // just set the to be canceled client transaction to null.
      callerSession.setToBeCancelledClientTransaction(null);
      sa.setCallerSession(callerSession);

      // put the callId for the callee dialog in the cache
      getCacheUtility().put(calleeCallId, sa);

      ChildRelation relation = getCallControlSbbChild();
      // Create child SBB
      CallControlSbbLocalObject child = (CallControlSbbLocalObject) relation
          .create();

      setChildSbbLocalObject(child);

      child.setParent(getSbbContext().getSbbLocalObject());

      child.setCustomEvent(event);

      // Attach child SBB to the activity context
      sipACI.attach(child);
      clientSipACI.attach(child);
      sipACI.attach(this.getSbbContext().getSbbLocalObject());
      // Send the INVITE request
      ct.sendRequest();

    } catch (ParseException parExc) {
View Full Code Here

      try {
        NullActivity nullActivity = getNullActivityFactory()
            .createNullActivity();

        ActivityContextInterface nullActivityContextInterface = getNullACIFactory()
            .getActivityContextInterface(nullActivity);

        fireOrderCancelled((CustomEvent) this.getCustomEvent().clone(),
            nullActivityContextInterface, null);

      } catch (UnrecognizedActivityException unreActExc) {
        unreActExc.printStackTrace();
      }
      break;
    default:
      String reConfirm = pathToAudioDirectory + "ReConfirm.wav";
      this.setAudioFile(reConfirm);
      break;
    }
    this.setSendBye(successful);

    MsSignalGenerator generator = msProvider.getSignalGenerator(this
        .getAnnouncementEndpointName());

    try {
      ActivityContextInterface generatorActivity = mediaAcif
          .getActivityContextInterface(generator);
      generatorActivity.attach(getSbbContext().getSbbLocalObject());

      String announcementFile = "file:" + this.getAudioFile();
      generator.apply(Announcement.PLAY,
          new String[] { announcementFile });
View Full Code Here

       
        MsConnection connection = (MsConnection) sbbContext.getActivities()[0].getActivity();
        MsSession session = connection.getSession();
        MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX);

        ActivityContextInterface linkActivity = null;
        try {
            linkActivity = mediaAcif.getActivityContextInterface(link);
        } catch (UnrecognizedActivityException ex) {
        }

        linkActivity.attach(sbbContext.getSbbLocalObject());
        link.join(endpointName, LOOP_ENDPOINT);
    }
View Full Code Here

TOP

Related Classes of javax.slee.ActivityContextInterface

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.