public ITriggerListener getTriggerListener (final String name) { synchronized (m_aGlobalTriggerListeners) { return m_aGlobalTriggerListeners.get (name); } }
@Nonnull protected final ITEMTYPE addToItemStore (@Nonnull final KEYTYPE aDataID, @Nonnull final ITEMTYPE aItem) { // Is the ID already in use? if (m_aItemStore.containsKey (aDataID)) throw new IllegalArgumentException ("An item with ID '" + aDataID + "' is already contained!"); m_aItemStore.put (aDataID, aItem); return aItem; }
public BuildInfo (@Nonnull final ICommonsMap <String, String> aMap) { m_aMap = ValueEnforcer.notNull (aMap, "Map"); m_nVersion = getAsInt ("buildinfo.version", 0); if (m_nVersion < 1) throw new IllegalArgumentException ("The passed map is not a buildinfo map!"); // Extract all system properties and env vars for (final Map.Entry <String, String> aEntry : aMap.entrySet ()) { final String sKey = aEntry.getKey (); if (sKey.startsWith (PREFIX_SYSPROPERTY)) m_aSysProperties.put (sKey.substring (PREFIX_SYSPROPERTY.length ()), aEntry.getValue ()); else if (sKey.startsWith (PREFIX_ENVVAR)) m_aEnvVars.put (sKey.substring (PREFIX_ENVVAR.length ()), aEntry.getValue ()); } }
/** * Checks if a given name is already defined as a class/interface * * @param sName * Name to search * @return <code>true</code> if the passed variable is contained */ public boolean isDeclared (@Nullable final String sName) { return m_aDecls.containsKey (sName); }
@Nonnull public final DOMReaderSettings setFeatureValue (@Nonnull final EXMLParserFeature eFeature, final boolean bValue) { ValueEnforcer.notNull (eFeature, "Feature"); m_aFeatures.put (eFeature, Boolean.valueOf (bValue)); return this; }
public int getNumJobsCurrentlyExecuting () { synchronized (executingJobs) { return executingJobs.size (); } }
/** * Clear all of this request's attributes. * * @return this */ @Nonnull public MockHttpServletRequest clearAttributes () { m_aAttributes.clear (); return this; }
public ICommonsList <IJobListener> getJobListeners () { synchronized (m_aGlobalJobListeners) { return m_aGlobalJobListeners.copyOfValues (); } }
/** * Clear all of this session's attributes. */ public void clearAttributes () { for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ()) { final String sName = entry.getKey (); final Object aValue = entry.getValue (); if (aValue instanceof HttpSessionBindingListener) ((HttpSessionBindingListener) aValue).valueUnbound (new HttpSessionBindingEvent (this, sName, aValue)); } m_aAttributes.clear (); }
/** * Emit all supported features to the logger. */ public static void debugLogDOMFeatures () { for (final Map.Entry <EXMLDOMFeatureVersion, ICommonsList <String>> aEntry : s_aSupportedFeatures.entrySet ()) for (final String sFeature : aEntry.getValue ()) if (LOGGER.isInfoEnabled ()) LOGGER.info ("DOM " + aEntry.getKey ().getID () + " feature '" + sFeature + "' is present"); }
public boolean removeTriggerListener (final String name) { synchronized (m_aGlobalTriggerListeners) { return m_aGlobalTriggerListeners.remove (name) != null; } }
/** * @param sID * the id to look up * @return looks up if the compressed attachment contain the given ID */ default boolean containsCompressedAttachmentID (@Nullable final String sID) { final ICommonsMap <String, EAS4CompressionMode> aIDs = getCompressedAttachmentIDs (); return aIDs != null && aIDs.containsKey (sID); }
public APIDescriptorList () { // Init map for (final EHttpMethod e : EHttpMethod.values ()) m_aMap.put (e, new CommonsArrayList<> ()); }