Package com.bitmovers.maui.engine

Examples of com.bitmovers.maui.engine.ServerConfigurationManager


  *                              of the concrete MessageThread objects
  */
  public MessageDispatcher (MessageThreadFactory aMessageThreadFactory)
  {
    messageThreadFactory = aMessageThreadFactory;
    ServerConfigurationManager theSCM = ServerConfigurationManager.getInstance ();
    ageLimit = getValue (theSCM,
               theSCM.MAUI_THREAD_AGE_LIMIT,
               Integer.parseInt (theSCM.MAUI_THREAD_AGE_LIMIT_VALUE));
    threadCapacity = getValue (theSCM,
                   theSCM.MAUI_THREAD_POOL_MAXIMUM,
View Full Code Here


  protected ServerSocket createServerSocket (int aServerPort, InetAddress aInetAddress)
    throws IOException
  {
    secure = true;
   
    ServerConfigurationManager theSCM = ServerConfigurationManager.getInstance ();
    String thePassphraseProperty = theSCM.getProperty (theSCM.MAUI_PASS_PHRASE);
    if (thePassphraseProperty == null)
    {
      thePassphraseProperty = promptForPassPhrase ();
    }
    char[] thePassphrase = thePassphraseProperty.toCharArray();
    SSLServerSocketFactory theFactory = null;
    try
    {
      String theCertFile = theSCM.getProperty (theSCM.MAUI_CERTIFICATE_FILE);
      SSLContext theContext = SSLContext.getInstance ("TLS");
      KeyManagerFactory theKMF = KeyManagerFactory.getInstance ("SunX509");
      KeyStore theKS = KeyStore.getInstance (KeyStore.getDefaultType ());
      theKS.load (getCertificateStream (theCertFile), null);
      theKMF.init (theKS, thePassphrase);
     
      SecureRandom theSecureRandom = null;
      String theFastRandom = theSCM.getProperty (theSCM.MAUI_FAST_RANDOM);
      if (theFastRandom != null && theFastRandom.equalsIgnoreCase ("true"))
      {
        Random theRandom = new Random ();
        byte [] theRandomBytes = new byte [20];
        theRandom.nextBytes (theRandomBytes);
View Full Code Here

    if (!initDone)
    {
      //
      //  Get various initial settings from the ServerConfigurationManager
      //
      ServerConfigurationManager theSCM = ServerConfigurationManager.getInstance ();
      String theDesktopClass = theSCM.getProperty (theSCM.MAUI_DESKTOP_CLASS);
      if (!theDesktopClass.equals (theSCM.MAUI_DESKTOP_CLASS_VALUE))
      {
        try
        {
          desktop = (MDesktop) Class.forName (theDesktopClass).newInstance ();
        }
        catch (Exception e)
        {
          System.err.println ("[MDesktop] Couldn't create MDesktop " +
                    theDesktopClass + " because: " + e +
                    ".  Using default MDesktop");
        }
      }
     
      if (desktop == null)
      {
        desktop = new MDesktop ();
      }
     
      desktop.setBackgroundColor (testColor (theSCM,
                            theSCM.MAUI_DESKTOP_BACKGROUND_COLOR,
                            theSCM.MAUI_DESKTOP_BACKGROUND_COLOR_VALUE));
     
      desktop.setTextColor (testColor (theSCM,
                         theSCM.MAUI_DESKTOP_TEXT_COLOR,
                         theSCM.MAUI_DESKTOP_TEXT_COLOR_VALUE));
     
      desktop.setLinkColor (testColor (theSCM,
                         theSCM.MAUI_DESKTOP_LINK_COLOR,
                         theSCM.MAUI_DESKTOP_LINK_COLOR_VALUE));
                        
      desktop.setPreamble (theSCM.getProperty (theSCM.MAUI_DESKTOP_PREAMBLE));
                        
      desktop.setPostamble (theSCM.getProperty (theSCM.MAUI_DESKTOP_POSTAMBLE));
      desktop.setBackgroundImage (theSCM.getProperty (theSCM.MAUI_DESKTOP_BACKGROUND_IMAGE));
      initDone = true;
    }
  }
View Full Code Here

TOP

Related Classes of com.bitmovers.maui.engine.ServerConfigurationManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.