public ActivityContext getActivityContext() { return aciImpl.getActivityContext(); }
@Override public boolean equals(Object obj) { // even if there may be different java interfaces for an AC, equality // should be defined only by the AC if (obj != null && obj instanceof ActivityContextInterface) { return ((ActivityContextInterface) obj).getActivityContext() .equals(this.aciImpl.getActivityContext()); } else { return false; } }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, byte value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, long value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, char value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, double value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, boolean value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, Object value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, short value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, int value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Sets an sbb aci data field value * * @param fieldName * @param value */ public void setFieldValue(String fieldName, float value) { String realFieldName = getRealFieldName(fieldName); aciImpl.getActivityContext().setDataAttribute(realFieldName, value); }
/** * Retrieves an sbb aci data field value * * @param fieldName * @param returnType * @return */ public Object getFieldValue(String fieldName, Class<?> returnType) { String realFieldName = getRealFieldName(fieldName); Object value = aciImpl.getActivityContext().getDataAttribute( realFieldName); if (value == null) { if (returnType.isPrimitive()) { if (returnType.equals(Integer.TYPE)) { return Integer.valueOf(0); } else if (returnType.equals(Boolean.TYPE)) { return Boolean.FALSE; } else if (returnType.equals(Long.TYPE)) { return Long.valueOf(0); } else if (returnType.equals(Double.TYPE)) { return Double.valueOf(0); } else if (returnType.equals(Float.TYPE)) { return Float.valueOf(0); } } } return value; }
/** * * @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()); }
ActivityContext ac = sleeAci.getActivityContext(); ActivityContextHandle ach = ac.getActivityContextHandle(); ActivityContextNamingFacilityCacheData cacheData=new ActivityContextNamingFacilityCacheData(aciName, cluster);
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); }
aciImpl.getActivityContext().attachTimer(timerID); TimerFacilityTimerTaskData taskData = new TimerFacilityTimerTaskData(timerID, aciImpl.getActivityContext().getActivityContextHandle(), address, startTime, period, numRepetitions, timerOptions); final TimerFacilityTimerTask task = new TimerFacilityTimerTask(taskData); if(configuration.getTaskExecutionWaitsForTxCommitConfirmation()) {
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); }
.getActivityContext(); if (logger.isTraceEnabled()) { logger.trace("invoke(): firing event on "