org.mega.gasp.platform.utils
Class PropertiesReader

java.lang.Object
  extended byorg.mega.gasp.platform.utils.PropertiesReader

public class PropertiesReader
extends java.lang.Object

Class to read the properties files of GASP configuration.

Author:
PELLERIN Romain (pellerin@cnam.fr) - MEGA Project

Field Summary
private  org.apache.log4j.Category cat
           
private  java.lang.String conf_home
           
private  java.io.InputStream is
           
private  java.lang.String logs_home
           
private  int minimalApplicationTimeout
           
private  int minimalPlatformTimeout
           
private  java.util.Properties prop
           
private  java.net.URL url
           
 
Constructor Summary
PropertiesReader(java.lang.String path)
           
 
Method Summary
 void checkLog4jLoggingPath()
          Checks the path of logging from log4j.properties.
 byte getApplicationModel(int appID)
          Returns the type of the application model. 0: automatic management (start, stop the game watching the number of player) 1: manual management (the proprietary of the application instance start, stop the aI) 2: mapcycle
 java.lang.String getApplicationPackage(int appID)
          Returns the package name of the application to serve.
 int getApplicationTimeout(int appID)
          Returns the application timeout.
 java.lang.String getDBUrl()
          Returns the database url from platform.properties.
 int getPlatformTimeout()
          Returns the platform timeout for sessions from platform.properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

private java.net.URL url

is

private java.io.InputStream is

prop

private java.util.Properties prop

cat

private org.apache.log4j.Category cat

conf_home

private java.lang.String conf_home

logs_home

private java.lang.String logs_home

minimalApplicationTimeout

private final int minimalApplicationTimeout
See Also:
Constant Field Values

minimalPlatformTimeout

private final int minimalPlatformTimeout
See Also:
Constant Field Values
Constructor Detail

PropertiesReader

public PropertiesReader(java.lang.String path)
Method Detail

getApplicationPackage

public java.lang.String getApplicationPackage(int appID)
Returns the package name of the application to serve.

Parameters:
appID -
Returns:
String the application package

getApplicationTimeout

public int getApplicationTimeout(int appID)
Returns the application timeout.

Parameters:
appID -
Returns:
int the application timeout

getDBUrl

public java.lang.String getDBUrl()
Returns the database url from platform.properties.

Returns:
String the db url

getPlatformTimeout

public int getPlatformTimeout()
Returns the platform timeout for sessions from platform.properties.

Returns:
String the db url

checkLog4jLoggingPath

public void checkLog4jLoggingPath()
Checks the path of logging from log4j.properties.


getApplicationModel

public byte getApplicationModel(int appID)
Returns the type of the application model. 0: automatic management (start, stop the game watching the number of player) 1: manual management (the proprietary of the application instance start, stop the aI) 2: mapcycle

Parameters:
appID -
Returns:
the type of the application model