if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; connection.getConnectionDetails().getProviderURI(), UpdateType.UPDATE, new EntityKey(null, null, null, null)
/** * Constructor. * @param key Entity key. */ public PublisherKey(final EntityKey key) { this.key1 = getIdValue(key.getFirstSubKey()); this.key2 = key.getSecondSubKey(); this.key3 = key.getThirdSubKey(); this.key4 = key.getFourthSubKey(); }
Identifier eventObjNumber = updateHeaderList.get(i).getKey().getFirstSubKey(); archiveDetails.setDetails(new ObjectDetails(updateHeaderList.get(i).getKey().getThirdSubKey(), null)); // Event objId archiveDetails.setNetwork(msgHeader.getNetworkZone()); archiveDetails.setTimestamp(HelperTime.getTimestamp()); this.publishConfigurationStoredSuccess(objId, updateHeaderList.get(i).getKey().getThirdSubKey()); } catch (MALException ex) { this.publishConfigurationStoredFailure(updateHeaderList.get(i).getKey().getThirdSubKey()); // Event objId } catch (MALInteractionException ex) { this.publishConfigurationStoredFailure(updateHeaderList.get(i).getKey().getThirdSubKey()); // Event objId
@Override public void monitorValueNotifyReceived(MALMessageHeader msgHeader, Identifier _Identifier0, UpdateHeaderList _UpdateHeaderList1, ObjectIdList paramValueObjectIds, ParameterValueList parameterValueList, Map qosProperties) { final Long paramIdentityId = _UpdateHeaderList1.get(0).getKey().getSecondSubKey(); Logger.getLogger(CheckProviderServiceImpl.class.getName()).log(Level.INFO, "monitorvalue-update for parameter with identity id: {0} received", new Object[]{paramIdentityId}); final ParameterValue newParamValue = parameterValueList.get(0); final ObjectId paramValObjId = new ObjectId(ParameterHelper.PARAMETERVALUEINSTANCE_OBJECT_TYPE, new ObjectKey(msgHeader.getDomain(), _UpdateHeaderList1.get(0).getKey().getFourthSubKey())); //set as the current parameterValue paramMonitorManager.setParameterValue(paramIdentityId, newParamValue, paramValObjId); super.monitorValueNotifyReceived(msgHeader, _Identifier0, _UpdateHeaderList1, paramValueObjectIds, parameterValueList, qosProperties); }
/** * Constructor. * @param lst Entity key. */ public JMSPublisherKey(final EntityKey lst) { super(); this.key1 = getIdValue(lst.getFirstSubKey()); this.key2 = lst.getSecondSubKey(); this.key3 = lst.getThirdSubKey(); this.key4 = lst.getFourthSubKey(); }
/** * Create an entity key for an event for the instanceNumber of objectType, * with source set ti sourceObjectType * * @param objectType * @param instanceNumber * @param sourceObjectType * @return */ static public EntityKey generateEntityKey(ObjectType objectType, long instanceNumber, ObjectType sourceObjectType) { return new EntityKey( new Identifier(String.valueOf(objectType.getNumber())), MCServicesHelper.generateSubKey(objectType, false), instanceNumber, MCServicesHelper.generateSubKey(sourceObjectType, true)); }
static public void getValuesFromEntityKey(EntityKey key, KeyParts keyParts) { // Get the area/service/version from the second sub key generateObjectTypeFromSubKey(keyParts.objectType, key.getSecondSubKey()); // Add object number from first subkey keyParts.objectType.setNumber( new UShort(Integer.parseInt(key.getFirstSubKey().toString()))); // Instance number is 3rd keyParts.objectInstance = key.getThirdSubKey(); // Source object is all from the 4th generateObjectTypeFromSubKey(keyParts.sourceObjectType, key.getFourthSubKey()); }
if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; final EntityKey ekey = new EntityKey(new Identifier(manager.get(appObjId).getName().toString()), appObjId, null, null); final Time timestamp = HelperTime.getTimestampMillis();
/** * Returns true if this key matches supplied argument taking into account wildcards. * @param rhs Key to match against. * @return True if matches. */ public boolean matchesWithWildcard(final EntityKey rhs) { if (null != rhs) { boolean matched = matchedSubkeyWithWildcard(key1, getIdValue(rhs.getFirstSubKey())); if (matched) { matched = matchedSubkeyWithWildcard(key2, rhs.getSecondSubKey()); if (matched) { matched = matchedSubkeyWithWildcard(key3, rhs.getThirdSubKey()); if (matched) { matched = matchedSubkeyWithWildcard(key4, rhs.getFourthSubKey()); } } } return matched; } return false; }
if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; final EntityKey ekey = new EntityKey( new Identifier(objType.getNumber().toString()), secondEntityKey,
/** * Returns true if this key matches supplied argument taking into account wildcards. * @param rhs Key to match against. * @return True if matches. */ public boolean matches(final EntityKey rhs) { if (null != rhs) { boolean matched = matchedSubkey(key1, getIdValue(rhs.getFirstSubKey())); if (matched) { matched = matchedSubkey(key2, rhs.getSecondSubKey()); if (matched) { matched = matchedSubkey(key3, rhs.getThirdSubKey()); if (matched) { matched = matchedSubkey(key4, rhs.getFourthSubKey()); } } } return matched; } return false; }
if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; final EntityKey ekey = new EntityKey(funcName, objIdLink, statLink.getParameterId().getInstId(), sValObjId); final Time timestamp = HelperTime.getTimestampMillis(); // requirement: 3.6.9.2.e
boolean valueSet = createRoutingKeyIdentifier(lbuf, JMSEndpoint.EID_PROPERTY, id.getFirstSubKey()); valueSet = createRoutingKeyLong(lbuf, JMSEndpoint.DID_PROPERTY, id.getSecondSubKey(), valueSet); valueSet = createRoutingKeyLong(lbuf, JMSEndpoint.OID_PROPERTY, id.getThirdSubKey(), valueSet); createRoutingKeyLong(lbuf, JMSEndpoint.SID_PROPERTY, id.getFourthSubKey(), valueSet); if (lbuf.length() > 0)
if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; final EntityKey ekey = new EntityKey(new Identifier(manager.getName(identityId).toString()), identityId, definitionId, aValObjId); Time time = timestamp;
objMsg.setIntProperty(JMSEndpoint.SVC_PROPERTY, service); objMsg.setIntProperty(JMSEndpoint.OPN_PROPERTY, operation); objMsg.setStringProperty(JMSEndpoint.EID_PROPERTY, publishEntry.eKey.getFirstSubKey().getValue()); objMsg.setObjectProperty(JMSEndpoint.DID_PROPERTY, publishEntry.eKey.getSecondSubKey()); objMsg.setObjectProperty(JMSEndpoint.OID_PROPERTY, publishEntry.eKey.getThirdSubKey()); objMsg.setObjectProperty(JMSEndpoint.SID_PROPERTY, publishEntry.eKey.getFourthSubKey()); objMsg.setBooleanProperty(JMSEndpoint.MOD_PROPERTY, publishEntry.isModification); objMsg.setObject(publishEntry.update);
/** * * Returns a subscription object with the entity keys field set as the * provided keys * * @param subId Identifier of the subscription * @param key1 First key - name * @param key2 Second key - identity-id * @param key3 Third key - definition-id * @param key4 Fourth key - value-id * @return The subscription object */ private Subscription subscriptionKeys(Identifier subId, Identifier key1, Long key2, Long key3, Long key4) { final EntityKeyList entityKeys = new EntityKeyList(); final EntityKey entitykey = new EntityKey(key1, key2, key3, key4); entityKeys.add(entitykey); final EntityRequest entity = new EntityRequest(null, false, false, false, false, entityKeys); final EntityRequestList entities = new EntityRequestList(); entities.add(entity); return new Subscription(subId, entities); }
/** * Returns a subscription object with the entity keys field set as the * provided keys * * @param subscriptionId The subscription Identifier * @param key1 First key * @param key2 Second key * @param key3 Third key * @param key4 Fourth key * @return The subscription object */ public static Subscription subscriptionKeys(final Identifier subscriptionId, final Identifier key1, final Long key2, final Long key3, final Long key4) { final EntityKeyList entityKeys = new EntityKeyList(); final EntityKey entitykey = new EntityKey(key1, key2, key3, key4); entityKeys.add(entitykey); final EntityRequest entity = new EntityRequest( null, false, false, false, false, entityKeys); final EntityRequestList entities = new EntityRequestList(); entities.add(entity); return new Subscription(subscriptionId, entities); }
/** * * Returns a subscription object with the entity keys field set as the * provided keys * * @param subId Identifier of the subscription * @param key1 First key - event object number * @param key2 Second key - the area, service, and version ObjectType fields * as a MAL::Long * @param key3 Third key - the event object instance identifier. * @param key4 Fourth key - the area, service, version and number fields of * the event source ObjectType * @return The subscription object */ private Subscription subscriptionKeys(Identifier subId, Identifier key1, Long key2, Long key3, Long key4) { final EntityKeyList entityKeys = new EntityKeyList(); final EntityKey entitykey = new EntityKey(key1, key2, key3, key4); entityKeys.add(entitykey); final EntityRequest entity = new EntityRequest(null, false, false, false, false, entityKeys); final EntityRequestList entities = new EntityRequestList(); entities.add(entity); return new Subscription(subId, entities); }
/** * Returns a subscription object with wildcards in all four fields of the * entity keys field * * @param subscriptionId The subscription Identifier * @return The subscription object */ public static Subscription subscriptionWildcard(final Identifier subscriptionId) { final EntityKeyList entityKeys = new EntityKeyList(); final EntityKey entitykey = new EntityKey(new Identifier("*"), 0L, 0L, 0L); entityKeys.add(entitykey); final EntityRequest entity = new EntityRequest( null, false, false, false, false, entityKeys); final EntityRequestList entities = new EntityRequestList(); entities.add(entity); return new Subscription(subscriptionId, entities); }
if (!isRegistered) { final EntityKeyList lst = new EntityKeyList(); lst.add(new EntityKey(new Identifier("*"), 0L, 0L, 0L)); publisher.register(lst, new PublishInteractionListener()); isRegistered = true; final EntityKey ekey = new EntityKey( new Identifier(objType.getNumber().toString()), secondEntityKey,