org.apache.geronimo.system.serverinfo
Class BasicServerInfo

java.lang.Object
  extended by org.apache.geronimo.system.serverinfo.BasicServerInfo
All Implemented Interfaces:
ServerInfo

public class BasicServerInfo
extends Object
implements ServerInfo

Contains information about the server and functions for resolving pathnames.


Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
static String HOME_DIR_SYS_PROP
           
static String SERVER_DIR_SYS_PROP
           
static String SERVER_NAME_SYS_PROP
           
 
Constructor Summary
BasicServerInfo()
           
BasicServerInfo(String defaultBaseDirectory)
           
 
Method Summary
 String getBaseDirectory()
          A config.xml setting for the base directory.
 String getBuildDate()
           
 String getBuildTime()
           
 String getCopyright()
           
 String getCurrentBaseDirectory()
          The base directory that this ServerInfo is actually using.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getVersion()
           
 File resolve(String filename)
          Resolves an abstract pathname to a File.
 URI resolve(URI uri)
           
 String resolvePath(String filename)
          Resolves an abstract pathname to an absolute one.
 File resolveServer(String filename)
          Resolves a relative pathname to a File, relative to the server configuration directory.
 URI resolveServer(URI uri)
           
 String resolveServerPath(String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_NAME_SYS_PROP

public static final String SERVER_NAME_SYS_PROP
See Also:
Constant Field Values

SERVER_DIR_SYS_PROP

public static final String SERVER_DIR_SYS_PROP
See Also:
Constant Field Values

HOME_DIR_SYS_PROP

public static final String HOME_DIR_SYS_PROP
See Also:
Constant Field Values

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

BasicServerInfo

public BasicServerInfo()

BasicServerInfo

public BasicServerInfo(String defaultBaseDirectory)
                throws Exception
Throws:
Exception
Method Detail

resolvePath

public String resolvePath(String filename)
Resolves an abstract pathname to an absolute one.

Specified by:
resolvePath in interface ServerInfo
Parameters:
filename - a pathname that can either be fully-qualified (i.e. starts with a "/") or relative (i.e. starts with any character but "/"). If it's fully-qualified it will be resolved to an absolute pathname using system-dependent rules (@link java.io.File). If it's relative it will be resolved relative to the base directory.
Returns:
an absolute pathname
See Also:
File.File(String pathname), File.getAbsolutePath()

resolveServerPath

public String resolveServerPath(String filename)
Specified by:
resolveServerPath in interface ServerInfo

resolve

public File resolve(String filename)
Resolves an abstract pathname to a File.

Specified by:
resolve in interface ServerInfo
Parameters:
filename - a String containing a pathname, which will be resolved by resolvePath(String filename).
Returns:
a File value

resolveServer

public File resolveServer(String filename)
Description copied from interface: ServerInfo
Resolves a relative pathname to a File, relative to the server configuration directory. Normally, this is the same as the Geronimo installation directory (e.g. "foo" becomes .../geronimo/foo). However, you can pass command-line arguments to the server to relocate this to a server-instance-specific directory (e.g. "var/foo" might become .../geronimo/instance1/var/foo if the server was started with the flag indicating that the server instance dir was "instance1").

Specified by:
resolveServer in interface ServerInfo

resolve

public URI resolve(URI uri)
Specified by:
resolve in interface ServerInfo

resolveServer

public URI resolveServer(URI uri)
Specified by:
resolveServer in interface ServerInfo

getBaseDirectory

public String getBaseDirectory()
Description copied from interface: ServerInfo
A config.xml setting for the base directory. This is normally left null, which means the ServerInfo will use the Geronimo install directory.

Specified by:
getBaseDirectory in interface ServerInfo

getCurrentBaseDirectory

public String getCurrentBaseDirectory()
Description copied from interface: ServerInfo
The base directory that this ServerInfo is actually using.

Specified by:
getCurrentBaseDirectory in interface ServerInfo

getVersion

public String getVersion()
Specified by:
getVersion in interface ServerInfo

getBuildDate

public String getBuildDate()
Specified by:
getBuildDate in interface ServerInfo

getBuildTime

public String getBuildTime()
Specified by:
getBuildTime in interface ServerInfo

getCopyright

public String getCopyright()
Specified by:
getCopyright in interface ServerInfo

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.