Codota Logo
ActivityContext.getActivityContextHandle
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JFileChooser (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now