/** * Converts a identifier list version of a domain name to a single, dot delimited, String. * * @param domain The list of identifiers to concatenate. * @return The dot delimited version of the domain name. */ public static String domainToString(final IdentifierList domain) { String retVal = null; if (null != domain) { final StringBuilder buf = new StringBuilder(); int i = 0; final int e = domain.size(); while (i < e) { if (0 < i) { buf.append('.'); } buf.append((Identifier) domain.get(i)); ++i; } retVal = buf.toString(); } return retVal; }
/** * Converts a identifier list version of a domain name to a single, dot delimited, String. * * @param domain The list of identifiers to concatenate. * @param truncateCount The number of elements of the list to ignore off the end. * @return The dot delimited version of the domain name. */ public static String domainToString(final IdentifierList domain, final int truncateCount) { String retVal = null; if (null != domain) { final StringBuilder buf = new StringBuilder(); int i = 0; final int e = domain.size() - truncateCount; while (i < e) { if (0 < i) { buf.append('.'); } buf.append((Identifier) domain.get(i)); ++i; } retVal = buf.toString(); } return retVal; }
/** * Checks if the provided domain matches the supplied domain with a wildcard * * @param domain Domain * @param wilcardDomain Domain with wildcard * @return True if the domain matches the domain with the wildcard */ public static boolean domainMatchesWildcardDomain(IdentifierList domain, IdentifierList wilcardDomain) { // The domain of the wildcard can never be greater than the real domain if (wilcardDomain.size() > domain.size() + 1) { return false; } // cycle through the parts of the domains for (int i = 0; i < wilcardDomain.size(); i++) { Identifier domainPart1 = wilcardDomain.get(i); if ("*".equals(domainPart1.toString())) { return true; // Wildcard found! } Identifier domainPart2 = domain.get(i); // The parts are different, return false if (!domainPart1.toString().equals(domainPart2.toString())) { return false; } } return false; }
protected void internalHandleDeregister(final GENMessage msg, Session lqs) throws MALException, MALInteractionException { // get components parts of messsage IdentifierList subList = (IdentifierList) msg.getBody().getBodyElement(0, new IdentifierList()); final String strURL = msg.getHeader().getURITo().getValue(); final int iSecond = strURL.indexOf(JMSTransport.JMS_SERVICE_DELIM); final String providerExchangeName = strURL.substring(iSecond + 1); for (int i = 0; i < subList.size(); ++i) { String subscriptionKey = queueName + "::" + providerExchangeName + "::" + subList.get(i); if (consumeHandlerMap.containsKey(subscriptionKey)) { JMSConsumeHandler handler = consumeHandlerMap.get(subscriptionKey); consumeHandlerMap.remove(subscriptionKey); handler.deregister(true); } else { JMSTransport.RLOGGER.log(Level.WARNING, "JMS Error deregistering for unregistered subscription {0}", subscriptionKey); } } // create response and do callback GENMessage returnMsg = new GENMessage(false, createReturnHeader(msg, false), null, null, (Object[]) null); receiveMessage(returnMsg); }
/** * Changes the current set of definitions available by the provided set. * * @param identityIds the identityIds of the parameters to be set * @param names the names of the parameters to be set * @param defIds the definitionsIds of the parameters to be set * @param definitions The object body of the definitions to be set * @return True if the configuration was successfully changed. False * otherwise. */ public synchronized Boolean reconfigureDefinitions(final LongList identityIds, final IdentifierList names, final LongList defIds, final ElementList definitions) { if (identityIds == null || names == null || defIds == null || definitions == null) { return false; } if (identityIds.size() != names.size() && defIds.size() != definitions.size() && identityIds.size() != defIds.size()) { return false; } this.identitiesToNamesMap.clear(); this.namesToPairsMap.clear(); this.objIdToDefMap.clear(); for (int i = 0; i < identityIds.size(); i++) { this.identitiesToNamesMap.put(identityIds.get(i), names.get(i)); this.namesToPairsMap.put(names.get(i), new ObjectInstancePair(identityIds.get(i), defIds.get(i))); this.objIdToDefMap.put(defIds.get(i), (Element) definitions.get(i)); } return true; }
for (int i = 0; i < paramNames.size(); i++) { //requirement: 3.3.11.2.f foreach-cycle steps through list in order if (paramNames.get(i).toString().equals("*")) { // requirement: 3.3.11.2.b for (int i = 0; i < paramNames.size(); i++) { //requirement: 3.3.11.2.f foreach-cycle steps through list in order Identifier name = paramNames.get(i);
result |= (0x1 << 2); if (header.getDomain() != null && header.getDomain().size() > 0) { result |= (0x1 << 1);
availablePackages = backend.getListOfPackages(); for (int i = 0; i < names.size(); i++) { int index = packageExistsInIndex(names.get(i).getValue(), availablePackages);
for (int i = 0; i < alertNames.size(); i++) { //requirement: 3.4.9.2.f foreach-cycle steps through list in order Identifier alertName = alertNames.get(i);
for (int i = 0; i < actionNames.size(); i++) { //requirement: 3.2.11.2.f foreach-cycle steps through list in order Identifier actionName = actionNames.get(i);
availablePackages = backend.getListOfPackages(); for (int i = 0; i < names.size(); i++) { int index = packageExistsInIndex(names.get(i).getValue(), availablePackages);
availablePackages = backend.getListOfPackages(); for (int i = 0; i < names.size(); i++) { int index = packageExistsInIndex(names.get(i).getValue(), availablePackages);
for (int index = 0; index < nameList.size(); index++) { // requirement: 3.7.11.2.f Identifier name = nameList.get(index);
for (int j = 0; j < names.size(); j++) {
availablePackages = backend.getListOfPackages(); for (int i = 0; i < names.size(); i++) { int index = packageExistsInIndex(names.get(i).getValue(), availablePackages);
BooleanList runningApps = new BooleanList(); for (int index = 0; index < appNames.size(); index++) { if ("*".equals(appNames.get(index).getValue())) {
for (int i = 0; i < names.size(); i++) { Identifier name = names.get(i);
enc.encodeIdentifier(header.getSessionName()); if (header.getDomain() != null && header.getDomain().size() > 0) { header.getDomain().encode(enc);