This method gets the {@link NlsMessageFactory} used to create instances of
{@link net.sf.mmm.util.nls.api.NlsMessage}.

@return the factory instance.
5811
public static NlsMessageFactory getFactory() {

    if (factory == null) {
      synchronized (NlsAccess.class) {
        if (factory == null) {
          NlsMessageFactoryImpl factoryImpl = new NlsMessageFactoryImpl();
          factoryImpl.initialize();
          factory = factoryImpl;
        }
      }
    }
    return factory;
  }
1032033
protected synchronized static SAXParserFactory getSaxFactory()
    {
        if (sSaxFactory == null) {
            sSaxFactory = SAXParserFactory.newInstance();
            sSaxFactory.setNamespaceAware(true); 
        }
        return sSaxFactory;
    }
946760
public static ControlMessageFactory getControlMessageFactory() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "getControlMessageFactory");

        if (_controlMessageFactory == null)
            _controlMessageFactory = (ControlMessageFactory) getSingletonInstance(SIMPConstants.CONTROL_MESSAGE_FACTORY);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "getControlMessageFactory", _controlMessageFactory);
        return _controlMessageFactory;
    }
627665
public WebServiceTemplateBuilder setWebServiceMessageFactory(
			WebServiceMessageFactory messageFactory) {
		Assert.notNull(messageFactory, "MessageFactory must not be null");
		return new WebServiceTemplateBuilder(this.detectHttpMessageSender,
				this.interceptors, this.internalCustomizers, this.customizers,
				this.messageSenders, this.marshaller, this.unmarshaller,
				this.destinationProvider, this.transformerFactoryClass, messageFactory);
	}
270704
public SSLSocketFactory createSslSocketFactory() {
        try {
            SSLContext sslContext = SSLContext.getInstance("TLS");
            sslContext.init(null, new TrustManager[]{this}, null);
            return sslContext.getSocketFactory();
        } catch (NoSuchAlgorithmException | KeyManagementException e) {
            throw new AssertionError(e);
        }
    }
675034
@Override
    public GeldbetragFactory getFactory() {
        return new GeldbetragFactory().setCurrency(currency).setNumber(betrag).setContext(context);
    }
745603
public BridgeFactory get() {
        BridgeFactory result;
        try {
            result = factorySetting.get();
        } catch (RuntimeException exception) {
            RuntimeException wrapper = new IllegalStateException("Missing factory for: " + display(nearType), exception);
            logger.trace("Stack trace", wrapper);
            throw wrapper;
        }
        return result;
    }
298001
private static void createFactoryInstance()
  {
    try {
      Class cls = Class.forName(MP_MESSAGE_SELECTOR_FACTORY_CLASS);
      instance = (MPSelectionCriteriaFactory) cls.newInstance();
    }
    catch (Exception e) {
      FFDCFilter.processException(e, "com.ibm.ws.sib.processor.MPSelectionCriteriaFactory.createFactoryInstance", "100");
      throw new SIErrorException(e);
    }
  }
1215403
public static WebSocketExtensionFactory newInstance(ClassLoader cl) {
        ServiceLoader<WebSocketExtensionFactorySpi> services = load(WebSocketExtensionFactorySpi.class, cl);
        return newInstance(services);
    }
1026659
public static TrieNodeFactory<Boolean> getInstance() {
        return new TrieNodeFactory<Boolean>() {
            @Override
            public TrieNode<Boolean> create() {
                return new BooleanTrieNode();
            }
        };
    }
982597
public static XMLInputFactory createSafeXmlInputFactory() {
    XMLInputFactory xif = XMLInputFactory.newInstance();
    if (xif.isPropertySupported(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)) {
      xif.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES,
                      false);
    }

    if (xif.isPropertySupported(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)) {
      xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES,
                      false);
    }

    if (xif.isPropertySupported(XMLInputFactory.SUPPORT_DTD)) {
      xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
    }
    return xif;
  }
803628
public GelfMessage build() {
        if (message == null) {
            throw new IllegalArgumentException("message must not be null!");
        }

        if (host == null || host.trim().isEmpty()) {
            throw new IllegalArgumentException("host must not be null or empty!");
        }

        if (version == null) {
            throw new IllegalArgumentException("version must not be null!");
        }

        final GelfMessage gelfMessage = new GelfMessage(message, host, version);

        gelfMessage.setLevel(level);

        if (fullMessage != null) {
            gelfMessage.setFullMessage(fullMessage);
        }

        if (timestamp != null) {
            gelfMessage.setTimestamp(timestamp);
        }

        gelfMessage.addAdditionalFields(fields);

        return gelfMessage;
    }
1242266
private static void createFactoryInstance() throws Exception {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createFactoryInstance");
    try {
      Class cls = Class.forName(CONTROL_MESSAGE_FACTORY_CLASS);
      instance = (ControlMessageFactory) cls.newInstance();
    }
    catch (Exception e) {
      FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.ControlMessageFactory.createFactoryInstance", "112");
      SibTr.error(tc,"UNABLE_TO_CREATE_CONTROLFACTORY_CWSIF0041",e);
      throw e;
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createFactoryInstance");
  }
615270
public SmtpConnectionFactory build() {
    if (session == null) {
      session = Session.getInstance(new Properties());
    }

    TransportStrategy transportStrategy = protocol == null ? newSessiontStrategy() : newProtocolStrategy(protocol);

    ConnectionStrategy connectionStrategy;
    if (host == null && port == -1 && username == null && password == null) {
      connectionStrategy = newConnectionStrategy();
    } else {
      connectionStrategy = newConnectionStrategy(host, port, username, password);
    }

    return new SmtpConnectionFactory(session, transportStrategy, connectionStrategy, defaultTransportListeners);
  }
1221915
public ResourceFactory resourceFactory() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "resourceFactory", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "resourceFactory", _resourceFactory);
        return _resourceFactory;
    }
779999
public static LogFactory get() {
		if (null == currentLogFactory) {
			synchronized (lock) {
				if (null == currentLogFactory) {
					currentLogFactory = LogFactory.create();
				}
			}
		}
		return currentLogFactory;
	}
28041
public MessageManager getMessageManager()
    {
        boolean createMessageManager = true;
    	if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(DBParams.MESSAGE_SERVER)))
    	    createMessageManager = false;
		return this.getMessageManager(createMessageManager);
    }