@Override public Subscription getSubscription() throws MALException { return (Subscription) getBodyElement(0, new Subscription()); } }
/** * * 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); }
protected void internalHandleRegister(final GENMessage msg, Session lqs) throws MALException, MALInteractionException Subscription subscription = (Subscription) msg.getBody().getBodyElement(0, new Subscription()); final String strURL = msg.getHeader().getURITo().getValue(); final int iSecond = strURL.indexOf(JMSTransport.JMS_SERVICE_DELIM);
return dec.decodeElement(new Subscription()); case MALPubSubOperation._PUBLISH_REGISTER_STAGE: return dec.decodeElement(new EntityKeyList());