001 package com.croftsoft.apps.vaft.app; 002 003 import java.net.InetAddress; 004 005 import com.croftsoft.apps.vaft.core.HostInfo; 006 007 /********************************************************************* 008 * <P> 009 * @author 010 * <A HREF="http://www.alumni.caltech.edu/~croft">David W. Croft</A> 011 * @version 012 * 1998-04-26 013 *********************************************************************/ 014 015 public class Defaults 016 ////////////////////////////////////////////////////////////////////// 017 ////////////////////////////////////////////////////////////////////// 018 { 019 020 public static final String INFO 021 = "VAFT/0.0"; 022 023 public static final boolean USE_CONTROL_PANEL 024 = false; 025 public static final String RMI_SERVER_NAME 026 = getLocalHostAddress ( ); 027 public static final int RMI_SERVER_PORT 028 // Change when Java 1.2 comes out. 029 = 1099; 030 // = java.rmi.Registry.REGISTRY_PORT; 031 public static final String RMI_OBJECT_NAME 032 = "VAFT"; 033 public static final String WEB_SERVER_NAME 034 = getLocalHostAddress ( ); 035 public static final int WEB_SERVER_PORT 036 = 1968; 037 public static final String WEB_SERVER_ROOT 038 = "."; 039 public static final String PEER_LIST_PATH 040 = "peers.txt"; 041 042 public static final String SEED_SERVER_NAME 043 = "www.lpwv.org"; 044 public static final int SEED_SERVER_PORT 045 = RMI_SERVER_PORT; 046 public static final String SEED_OBJECT_NAME 047 = RMI_OBJECT_NAME; 048 049 public static final long SWAP_DELAY = 1000 * 60 * 60; 050 051 public static final String AGENT_DIR 052 = "."; 053 054 ////////////////////////////////////////////////////////////////////// 055 ////////////////////////////////////////////////////////////////////// 056 057 private Defaults ( ) { } 058 059 private static String getLocalHostAddress ( ) 060 ////////////////////////////////////////////////////////////////////// 061 { 062 String address = null; 063 try { address = InetAddress.getLocalHost ( ).getHostAddress ( ); } 064 catch ( Exception ex ) { } 065 return address; 066 } 067 068 ////////////////////////////////////////////////////////////////////// 069 ////////////////////////////////////////////////////////////////////// 070 }