org.apache.turbine.util
Class ServerData

java.lang.Object
  |
  +--org.apache.turbine.util.ServerData

public class ServerData
extends java.lang.Object

Holds basic server information under which Turbine is running. This class is accessable via the RunData object within the Turbine system. You can also use it as a placeholder for this information if you are only emulating a servlet system.

Version:
$Id$
Author:
Kevin A. Burton, Jon S. Stevens

Field Summary
private  java.lang.String contextPath
          Cached context path.
private  java.lang.String scriptName
          Cached script name.
private  java.lang.String serverName
          Cached serverName,
private  int serverPort
          Cached serverPort.
private  java.lang.String serverScheme
          Cached serverScheme.
 
Constructor Summary
ServerData(java.lang.String serverName, int serverPort, java.lang.String serverScheme, java.lang.String scriptName, java.lang.String contextPath)
          Constructor.
 
Method Summary
 java.lang.String getContextPath()
          Get the context path.
 java.lang.String getScriptName()
          Get the script name
 java.lang.String getServerName()
          Get the name of the server.
 int getServerPort()
          Get the server port.
 java.lang.String getServerScheme()
          Get the server scheme.
 void setContextPath(java.lang.String cpath)
          Set the context path.
 void setScriptName(java.lang.String sname)
          Set the script name.
 void setServerName(java.lang.String sn)
          Sets the cached serverName.
 void setServerPort(int port)
          Sets the cached serverPort.
 void setServerScheme(java.lang.String ss)
          Sets the cached serverScheme.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

serverName

private java.lang.String serverName
Cached serverName,

serverPort

private int serverPort
Cached serverPort.

serverScheme

private java.lang.String serverScheme
Cached serverScheme.

scriptName

private java.lang.String scriptName
Cached script name.

contextPath

private java.lang.String contextPath
Cached context path.
Constructor Detail

ServerData

public ServerData(java.lang.String serverName,
                  int serverPort,
                  java.lang.String serverScheme,
                  java.lang.String scriptName,
                  java.lang.String contextPath)
Constructor.
Parameters:
serverName - The server name.
serverPort - The server port.
serverScheme - The server scheme.
scriptName - The script name.
Method Detail

getServerName

public java.lang.String getServerName()
Get the name of the server.
Returns:
A String.

setServerName

public void setServerName(java.lang.String sn)
Sets the cached serverName.
Parameters:
sn - A String.

getServerPort

public int getServerPort()
Get the server port.
Returns:
An int.

setServerPort

public void setServerPort(int port)
Sets the cached serverPort.
Parameters:
port - An int.

getServerScheme

public java.lang.String getServerScheme()
Get the server scheme.
Returns:
A String.

setServerScheme

public void setServerScheme(java.lang.String ss)
Sets the cached serverScheme.
Parameters:
ss - A String.

getScriptName

public java.lang.String getScriptName()
Get the script name
Returns:
A String.

setScriptName

public void setScriptName(java.lang.String sname)
Set the script name.
Parameters:
sname - A String.

getContextPath

public java.lang.String getContextPath()
Get the context path.
Returns:
A String.

setContextPath

public void setContextPath(java.lang.String cpath)
Set the context path.
Parameters:
sname - A String.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.