|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.meterware.pseudoserver.PseudoServer
A basic simulated web-server for testing user agents without a web server.
Constructor Summary | |
PseudoServer()
|
|
PseudoServer(int socketTimeout)
|
Method Summary | |
void |
addResourceHeader(java.lang.String name,
java.lang.String header)
Adds a header to a defined resource. |
int |
getConnectedPort()
Returns the port on which this server is listening. |
static int |
getSocketReleaseWaitTime()
Returns the amount of time the pseudo server will wait for a server socket to be released (in msec) before allocating a new one. |
static int |
getWaitThreshhold()
Returns the number of server sockets that must have been allocated and not returned before waiting for one to be returned. |
void |
mapToClasspath(java.lang.String directory)
|
void |
setCharacterSet(java.lang.String name,
java.lang.String characterSet)
Specifies the character set encoding for a resource. |
void |
setDebug(boolean debug)
|
void |
setErrorResource(java.lang.String name,
int errorCode,
java.lang.String errorMessage)
Defines a resource which will result in an error message. |
void |
setMaxProtocolLevel(int majorLevel,
int minorLevel)
|
void |
setResource(java.lang.String name,
byte[] value,
java.lang.String contentType)
Defines the contents of an expected resource. |
void |
setResource(java.lang.String name,
PseudoServlet servlet)
Defines the contents of an expected resource. |
void |
setResource(java.lang.String name,
java.lang.String value)
Defines the contents of an expected resource. |
void |
setResource(java.lang.String name,
java.lang.String value,
java.lang.String contentType)
Defines the contents of an expected resource. |
void |
setSendCharacterSet(java.lang.String name,
boolean enabled)
Enables the sending of the character set in the content-type header. |
static void |
setSocketReleaseWaitTime(int socketReleaseWaitTime)
Returns the amount of time the pseudo server will wait for a server socket to be released (in msec) before allocating a new one. |
static void |
setWaitThreshhold(int waitThreshhold)
Specifies the number of server sockets that must have been allocated and not returned before waiting for one to be returned. |
void |
shutDown()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PseudoServer()
public PseudoServer(int socketTimeout)
Method Detail |
public static int getSocketReleaseWaitTime()
getWaitThreshhold
.
public static void setSocketReleaseWaitTime(int socketReleaseWaitTime)
getWaitThreshhold
.
public static int getWaitThreshhold()
public static void setWaitThreshhold(int waitThreshhold)
public void shutDown()
public void setMaxProtocolLevel(int majorLevel, int minorLevel)
public int getConnectedPort() throws java.io.IOException
java.io.IOException
public void setResource(java.lang.String name, java.lang.String value)
public void setResource(java.lang.String name, PseudoServlet servlet)
public void setResource(java.lang.String name, java.lang.String value, java.lang.String contentType)
public void setResource(java.lang.String name, byte[] value, java.lang.String contentType)
public void setErrorResource(java.lang.String name, int errorCode, java.lang.String errorMessage)
public void setSendCharacterSet(java.lang.String name, boolean enabled)
public void setCharacterSet(java.lang.String name, java.lang.String characterSet)
public void addResourceHeader(java.lang.String name, java.lang.String header)
public void mapToClasspath(java.lang.String directory)
public void setDebug(boolean debug)
|
Copyright © 2000-2008 Russell Gold. See license agreement for rights granted. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |