Tabnine Logo
ActivityContext.getActivityContextHandle
Code IndexAdd Tabnine to your IDE (free)

How to use
getActivityContextHandle
method
in
org.mobicents.slee.container.activity.ActivityContext

Best Java code snippets using org.mobicents.slee.container.activity.ActivityContext.getActivityContextHandle (Showing top 16 results out of 315)

origin: org.mobicents.servers.jainslee.core/activities

public void endActivity(ActivityContextHandle ach) throws ManagementException {
  // Again this is tx method
  logger.info("Trying to stop null activity[" + ach + "]!!");
  ActivityContext ac = acFactory.getActivityContext(ach);
  if (ac == null) {
    logger.debug("There is no ac associated with given acID["
          + ach + "]!!");
    throw new ManagementException("Can not find AC for given ID["
        + ach + "], try again!!!");
  }
  if (ac.getActivityContextHandle().getActivityType() == ActivityType.NULL) {
    logger.debug("Scheduling activity end for acID[" + ach
          + "]");
    NullActivity nullActivity = (NullActivity) ac.getActivityContextHandle().getActivityObject();
    if (nullActivity != null) {
      nullActivity.endActivity();
    }
  } else {
    logger.debug("AC is not null activity context");
    throw new IllegalArgumentException("Given ID[" + ach
        + "] does not point to NullActivity");
  }        
}
origin: org.mobicents.servers.jainslee.core/services

/**
 * 
 * @param sbbEntity
 * @param cmpFieldName
 * @param cmpFieldValue
 */
public static void setCMPFieldOfTypeActivityContextInterface(SbbEntity sbbEntity, String cmpFieldName, ActivityContextInterface cmpFieldValue) {
  if (cmpFieldValue == null) {
    sbbEntity.setCMPField(cmpFieldName, null);
    return;
  }
  org.mobicents.slee.container.activity.ActivityContextInterface aci = null;
  try {
    aci = (org.mobicents.slee.container.activity.ActivityContextInterface) cmpFieldValue;
  } catch (ClassCastException e) {
    throw new IllegalArgumentException("CMP value being set (" + cmpFieldValue + ") is an unknown ActivityContextInterface implementation");
  }
  sbbEntity.setCMPField(cmpFieldName, aci.getActivityContext().getActivityContextHandle());
}
origin: org.mobicents.servers.jainslee.core/activities

public Object getActivity() throws TransactionRequiredLocalException,
    SLEEException {
  sleeContainer.getTransactionManager().mandateTransaction();
  
  return activityContext.getActivityContextHandle().getActivityObject();
}
origin: org.mobicents.servers.jainslee.core/common

org.mobicents.slee.container.activity.ActivityContextInterface sleeAci = (org.mobicents.slee.container.activity.ActivityContextInterface)aci;
ActivityContext ac = sleeAci.getActivityContext();
ActivityContextHandle ach = ac.getActivityContextHandle();
ActivityContextNamingFacilityCacheData cacheData=new ActivityContextNamingFacilityCacheData(aciName, cluster);
cacheData.bindName(ach);
origin: org.mobicents.servers.jainslee.core/services

public String[] getEventMask(ActivityContextInterface aci)
    throws NullPointerException, TransactionRequiredLocalException,
    IllegalStateException, NotAttachedException, SLEEException {
  if (aci == null)
    throw new NullPointerException(
        "Activity Context Interface cannot be null.");
  if (sbbObject == null || sbbObject.getState() != SbbObjectState.READY)
    throw new IllegalStateException("Wrong state! "
        + (sbbObject == null ? null : sbbObject.getState()));
  if (this.sbbObject.getSbbEntity() == null) {
    throw new IllegalStateException(
        "Wrong state! SbbEntity is not assigned");
  }
  sleeContainer.getTransactionManager().mandateTransaction();
  ActivityContextHandle ach = ((org.mobicents.slee.container.activity.ActivityContextInterface) aci)
      .getActivityContext().getActivityContextHandle();
  if (!sbbObject.getSbbEntity().isAttached(ach))
    throw new NotAttachedException("ACI not attached to SBB");
  return sbbObject.getSbbEntity().getEventMask(ach);
}
origin: org.mobicents.servers.jainslee.core/activities

public boolean isAttached(SbbLocalObject sbbLocalObject) throws NullPointerException,
    TransactionRequiredLocalException,
    TransactionRolledbackLocalException, SLEEException {
  
  if (sbbLocalObject == null) {
    throw new NullPointerException("null sbbLocalObject");
  }
  
  sleeContainer.getTransactionManager().mandateTransaction();
  
  if (sbbLocalObject instanceof org.mobicents.slee.container.sbb.SbbLocalObject) {
    org.mobicents.slee.container.sbb.SbbLocalObject sbbLocalObjectImpl = (org.mobicents.slee.container.sbb.SbbLocalObject) sbbLocalObject;
    SbbEntity sbbEntity = sbbLocalObjectImpl.getSbbEntity();
    if (sbbEntity != null && !sbbEntity.isRemoved()) {				
      return sbbEntity.isAttached(activityContext.getActivityContextHandle());
    }
  }
  
  try {
    sleeContainer.getTransactionManager().setRollbackOnly();
  } catch (Exception e) {
    throw new SLEEException(e.getMessage(),e);
  }
  throw new TransactionRolledbackLocalException("the sbbLocalObject argument must represent a valid SBB entity");
}

origin: org.mobicents.servers.jainslee.core/slee-timers

logger
    .trace("Posting timer event on event router queue. Activity context:  "
        + ac.getActivityContextHandle()
        + " remainingRepetitions: "
        + data.getRemainingRepetitions());
origin: org.mobicents.servers.jainslee.core/services

public void maskEvent(String[] eventNames, ActivityContextInterface aci)
    throws NullPointerException, TransactionRequiredLocalException,
    IllegalStateException, UnrecognizedEventException,
    NotAttachedException, SLEEException {
  if (SbbObjectState.READY != this.sbbObject.getState()) {
    throw new IllegalStateException(
        "Cannot call SbbContext maskEvent in "
            + this.sbbObject.getState());
  }
  if (this.sbbObject.getSbbEntity() == null) {
    // this shouldnt happen since SbbObject state ready shoudl be set
    // when its fully setup, but....
    throw new IllegalStateException(
        "Wrong state! SbbEntity is not assigned");
  }
  sleeContainer.getTransactionManager().mandateTransaction();
  ActivityContextHandle ach = ((org.mobicents.slee.container.activity.ActivityContextInterface) aci)
      .getActivityContext().getActivityContextHandle();
  if (!sbbObject.getSbbEntity().isAttached(ach))
    throw new NotAttachedException("ACI is not attached to SBB ");
  sbbObject.getSbbEntity().setEventMask(ach, eventNames);
}
origin: org.mobicents.servers.jainslee.core/slee-timers

TimerFacilityTimerTaskData taskData = new TimerFacilityTimerTaskData(timerID, aciImpl.getActivityContext().getActivityContextHandle(), address, startTime, period, numRepetitions, timerOptions);
final TimerFacilityTimerTask task = new TimerFacilityTimerTask(taskData);
if(configuration.getTaskExecutionWaitsForTxCommitConfirmation()) {
origin: org.mobicents.servers.jainslee.core/activities

} else {
  sbbEntity.afterACAttach(getActivityContext().getActivityContextHandle());
          + sbbEntity.getSbbEntityId()
          + "] from the delivered set of activity context ["
          + getActivityContext().getActivityContextHandle()
          + "]. Seems to be a reattachment after detachment in the same event delivery transaction. See JSLEE 1.0 Spec, Section 8.5.8.");
origin: org.mobicents.servers.jainslee.core/services

+ ac.getActivityContextHandle() + " is ending");
origin: org.mobicents.servers.jainslee.core/activities

} else {
  sbbEntity.afterACDetach(getActivityContext().getActivityContextHandle());
origin: org.mobicents.servers.jainslee.core/router

if (eventRouterConfiguration.isConfirmSbbEntityAttachement() && !sbbEntity.isAttached(ac.getActivityContextHandle())) {
origin: org.mobicents.servers.jainslee.core/router

sbbEntity.afterACAttach(ac.getActivityContextHandle());
origin: org.mobicents.servers.jainslee.core/router

  nextSbbEntityFinderResult = nextSbbEntityFinder.next(ac, eventContext, sbbEntitiesThatHandledCurrentEvent,container);                                
} catch (Exception e) {
  logger.warn("Failed to find next sbb entity to deliver the event "+eventContext+" in "+ac.getActivityContextHandle(), e);
origin: org.mobicents.servers.jainslee.core/resource

  tc.getAfterRollbackActions().add(action);
return ac.getActivityContextHandle();
org.mobicents.slee.container.activityActivityContextgetActivityContextHandle

Popular methods of ActivityContext

  • getActivityContextInterface
  • fireEvent
  • detachSbbEntity
  • endActivity
  • getLocalActivityContext
  • activityEnded
  • attachSbbEntity
  • isEnding
  • addNameBinding
  • attachTimer
  • beforeDeliveringEvent
  • detachTimer
  • beforeDeliveringEvent,
  • detachTimer,
  • getAttachedTimers,
  • getDataAttribute,
  • getNamingBindings,
  • getSbbAttachmentSet,
  • getSortedSbbAttachmentSet,
  • removeNameBinding,
  • setDataAttribute

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now