@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == this.getClass()) { ObjectPoolMapKey other = (ObjectPoolMapKey) obj; return this.serviceID.equals(other.serviceID) && this.sbbID.equals(other.sbbID); } else { return false; } }
@Override public String toString() { return serviceID.toString() + " & "+sbbID.toString(); } }
this.setValue(new SbbID(componentName,componentVendor,componentVersion));
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService()); for (UsageMBeanImpl usageMBeanImpl : usageMBeans.values()) { if (((SbbNotification) usageMBeanImpl.getNotificationSource()) .getSbb().equals(sbbId)) { String name = usageMBeanImpl.getUsageParameterSet(); if (name != null) {
@Override public int hashCode() { return sbbID.hashCode() * 31 + (paramName != null ? paramName.hashCode() : 0); }
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService()); SbbNotification sbbNotification = (SbbNotification) usageMBeanImpl .getNotificationSource(); if (sbbNotification.getSbb().equals(sbbId)) { usageMBeanImpl.resetAllUsageParameters();
@Override public int hashCode() { return serviceID.hashCode()*31+sbbID.hashCode(); }
/** * Computes the real aci data field name * * @param fieldName * @return */ private String getRealFieldName(String fieldName) { String realFieldName = sbbComponent.getDescriptor() .getActivityContextAttributeAliases().get(fieldName); if (realFieldName == null) { // not there then it has no alias, lets set one based on sbb id realFieldName = sbbComponent.getSbbID().toString() + "." + fieldName; final Map<String, String> aliases = sbbComponent.getDescriptor() .getActivityContextAttributeAliases(); synchronized (aliases) { aliases.put(fieldName, realFieldName); } } return realFieldName; }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == this.getClass()) { SbbUsageMBeanMapKey other = (SbbUsageMBeanMapKey) obj; // check sbb id if (!this.sbbID.equals(other.sbbID)) { return false; } // check param name, may be null if (other.paramName == null) { if (this.paramName != null) { return false; } } else { if (!other.paramName.equals(this.paramName)) { return false; } } return true; } else { return false; } } }
public MSbbRef( org.mobicents.slee.container.component.deployment.jaxb.slee.sbb.SbbRef sbbRef10) { String sbbName = sbbRef10.getSbbName().getvalue(); String sbbVendor = sbbRef10.getSbbVendor().getvalue(); String sbbVersion = sbbRef10.getSbbVersion().getvalue(); this.sbbAlias = sbbRef10.getSbbAlias().getvalue(); this.sbbID = new SbbID(sbbName, sbbVendor, sbbVersion); }
try { SbbEntity sbbe = sbbEntityFactory.getSbbEntity(sbbes.next(), false); if (sbbe != null && sbbe.getSbbId().toString().equals(sbbId)) { Object res = sbbEntityToArray(sbbe); if (res != null)
if (!implSbbID.equals(idBeingLookedUp)) {
public MSbbRef( org.mobicents.slee.container.component.deployment.jaxb.slee11.sbb.SbbRef sbbRef11) { String sbbName = sbbRef11.getSbbName().getvalue(); String sbbVendor = sbbRef11.getSbbVendor().getvalue(); String sbbVersion = sbbRef11.getSbbVersion().getvalue(); this.sbbAlias = sbbRef11.getSbbAlias().getvalue(); this.sbbID = new SbbID(sbbName, sbbVendor, sbbVersion); }
private Object[] sbbEntityToArray(SbbEntity entity) { Object[] info = new Object[8]; try { if (entity == null) return null; info[SBB_ENTITY_ID] = entity.getSbbEntityId().toString(); info[PARENT_SBB_ENTITY_ID] = String.valueOf(entity.getSbbEntityId().getParentSBBEntityID()); info[ROOT_SBB_ENTITY_ID] = String.valueOf(entity.getSbbEntityId().getRootSBBEntityID()); info[SBB_ID] = entity.getSbbId().toString(); info[SBB_ENTITY_PRIORITY] = Byte.toString(entity.getPriority()); info[SBB_ENTITY_SERV_CONV_NAME] = entity.getSbbEntityId().getServiceConvergenceName(); info[SBB_ENTITY_SERVICE_ID] = String.valueOf(entity.getSbbEntityId().getServiceID()); Set acsSet = entity.getActivityContexts(); if (acsSet != null && acsSet.size() > 0) { Object[] acsArray = acsSet.toArray(); String[] acs = new String[acsArray.length]; info[ACS] = acs; } } catch (Exception e) { e.printStackTrace(); return null; } return info; }
/** * * @param sbbEntity * @param cmpFieldName * @param cmpFieldValue */ public static void setCMPFieldOfTypeSbbLocalObject(SbbEntity sbbEntity, String cmpFieldName, SbbLocalObject cmpFieldValue) { if (cmpFieldValue == null) { sbbEntity.setCMPField(cmpFieldName, null); return; } SbbLocalObjectImpl sbbLocalObjectImpl = null; try { sbbLocalObjectImpl = (SbbLocalObjectImpl) cmpFieldValue; } catch (ClassCastException e) { throw new IllegalArgumentException("CMP value being set ("+ cmpFieldValue+ ") is an unknown SbbLocalObject implementation"); } final CMPFieldDescriptor field = sbbEntity.getSbbComponent().getDescriptor().getCmpFields().get(cmpFieldName); if (field.getSbbRef() != null && !field.getSbbRef().equals(sbbLocalObjectImpl.getSbbEntity().getSbbComponent().getSbbID())) { throw new IllegalArgumentException("CMP value being set ("+ sbbLocalObjectImpl.getSbbEntity().getSbbComponent().getSbbID()+ ") is for a different sbb then the one expected ("+ field.getSbbRef() + ")"); } sbbEntity.setCMPField(cmpFieldName, sbbLocalObjectImpl.getSbbEntityId()); }
public ServiceDescriptorImpl(MService mService) throws DeploymentException { super(mService.isSlee11()); try { this.defaultPriority = mService.getDefaultPriority(); this.serviceID = new ServiceID(mService.getServiceName(),mService.getServiceVendor(),mService.getServiceVersion()); this.rootSbbID = new SbbID(mService.getRootSbb().getSbbName(),mService.getRootSbb().getSbbVendor(),mService.getRootSbb().getSbbVersion()); this.addressProfileTable = mService.getAddressProfileTable(); this.resourceInfoProfileTable = mService.getResourceInfoProfileTable(); dependenciesSet.add(rootSbbID); // even if the root sbb does not declares it, all services depend on standard service started event(s) dependenciesSet.add(new EventTypeID("javax.slee.serviceactivity.ServiceStartedEvent", "javax.slee", "1.0")); if (isSlee11()) { dependenciesSet.add(new EventTypeID("javax.slee.serviceactivity.ServiceStartedEvent", "javax.slee", "1.1")); } } catch (Exception e) { throw new DeploymentException("failed to build service descriptor",e); } }
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
this.sbbID = new SbbID(sbb.getSbbName(), sbb.getSbbVendor(), sbb .getSbbVersion());
.getComponentByID(sbbId); if (sbbComponent == null) { throw new UnrecognizedSbbException(sbbId.toString()); } else { if (sbbComponent.getUsageParametersInterface() == null) { if (!serviceComponent.getSbbIDs( sleeContainer.getComponentRepository()).contains(sbbId)) { throw new UnrecognizedSbbException(sbbId.toString() + " is not part of " + getService());
sbbRefs.add(new SbbID(sbbRef.getSbbName().getvalue(), sbbRef .getSbbVendor().getvalue(), sbbRef.getSbbVersion() .getvalue()));