|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.ServerData
public class ServerData
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.
Constructor Summary | |
---|---|
ServerData(javax.servlet.http.HttpServletRequest req)
A C'tor that takes a HTTP Request object and builds the server data from its contents |
|
ServerData(ServerData serverData)
Copy-Constructor |
|
ServerData(String serverName,
int serverPort,
String serverScheme,
String scriptName,
String contextPath)
Constructor. |
Method Summary | |
---|---|
Object |
clone()
generates a new Object with the same values as this one. |
String |
getContextPath()
Get the context path. |
void |
getHostUrl(StringBuffer url)
Appends the Host URL to the supplied StringBuffer. |
String |
getScriptName()
Get the script name |
String |
getServerName()
Get the name of the server. |
int |
getServerPort()
Get the server port. |
String |
getServerScheme()
Get the server scheme. |
void |
setContextPath(String contextPath)
Set the context path. |
void |
setScriptName(String scriptName)
Set the script name. |
void |
setServerName(String serverName)
Sets the cached serverName. |
void |
setServerPort(int serverPort)
Sets the cached serverPort. |
void |
setServerScheme(String serverScheme)
Sets the cached serverScheme. |
String |
toString()
Returns this object as an URL. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServerData(String serverName, int serverPort, String serverScheme, String scriptName, String contextPath)
serverName
- The server name.serverPort
- The server port.serverScheme
- The server scheme.scriptName
- The script name.contextPath
- The context Pathpublic ServerData(ServerData serverData)
serverData
- A ServerData Objectpublic ServerData(javax.servlet.http.HttpServletRequest req)
req
- The HTTP RequestMethod Detail |
---|
public Object clone()
clone
in class Object
public String getServerName()
public void setServerName(String serverName)
serverName
- the server name.public int getServerPort()
public void setServerPort(int serverPort)
serverPort
- the server port.public String getServerScheme()
public void setServerScheme(String serverScheme)
serverScheme
- the server scheme.public String getScriptName()
public void setScriptName(String scriptName)
scriptName
- the script name.public String getContextPath()
public void setContextPath(String contextPath)
contextPath
- A String.public void getHostUrl(StringBuffer url)
url
- A StringBuffer objectpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |