| java.lang.Object com.meterware.pseudoserver.PseudoServer
PseudoServer | public class PseudoServer (Code) | | A basic simulated web-server for testing user agents without a web server.
|
Method Summary | |
public void | addResourceHeader(String name, String header) Adds a header to a defined resource. | public int | getConnectedPort() Returns the port on which this server is listening. | public 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. | public static int | getWaitThreshhold() Returns the number of server sockets that must have been allocated and not returned before waiting for one
to be returned. | public void | mapToClasspath(String directory) | public void | setCharacterSet(String name, String characterSet) Specifies the character set encoding for a resource. | public void | setDebug(boolean debug) | public void | setErrorResource(String name, int errorCode, String errorMessage) Defines a resource which will result in an error message. | public void | setMaxProtocolLevel(int majorLevel, int minorLevel) | public void | setResource(String name, String value) Defines the contents of an expected resource. | public void | setResource(String name, PseudoServlet servlet) Defines the contents of an expected resource. | public void | setResource(String name, String value, String contentType) Defines the contents of an expected resource. | public void | setResource(String name, byte[] value, String contentType) Defines the contents of an expected resource. | public void | setSendCharacterSet(String name, boolean enabled) Enables the sending of the character set in the content-type header. | public 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. | public 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. | public void | shutDown() |
PseudoServer | public PseudoServer()(Code) | | |
PseudoServer | public PseudoServer(int socketTimeout)(Code) | | |
addResourceHeader | public void addResourceHeader(String name, String header)(Code) | | Adds a header to a defined resource.
|
getConnectedPort | public int getConnectedPort() throws IOException(Code) | | Returns the port on which this server is listening.
|
getSocketReleaseWaitTime | public static int getSocketReleaseWaitTime()(Code) | | Returns the amount of time the pseudo server will wait for a server socket to be released (in msec)
before allocating a new one. See also
PseudoServer.getWaitThreshhold getWaitThreshhold .
|
getWaitThreshhold | public static int getWaitThreshhold()(Code) | | Returns the number of server sockets that must have been allocated and not returned before waiting for one
to be returned.
|
mapToClasspath | public void mapToClasspath(String directory)(Code) | | |
setCharacterSet | public void setCharacterSet(String name, String characterSet)(Code) | | Specifies the character set encoding for a resource.
|
setDebug | public void setDebug(boolean debug)(Code) | | |
setErrorResource | public void setErrorResource(String name, int errorCode, String errorMessage)(Code) | | Defines a resource which will result in an error message.
|
setMaxProtocolLevel | public void setMaxProtocolLevel(int majorLevel, int minorLevel)(Code) | | |
setResource | public void setResource(String name, String value)(Code) | | Defines the contents of an expected resource.
|
setResource | public void setResource(String name, String value, String contentType)(Code) | | Defines the contents of an expected resource.
|
setResource | public void setResource(String name, byte[] value, String contentType)(Code) | | Defines the contents of an expected resource.
|
setSendCharacterSet | public void setSendCharacterSet(String name, boolean enabled)(Code) | | Enables the sending of the character set in the content-type header.
|
setSocketReleaseWaitTime | public static void setSocketReleaseWaitTime(int socketReleaseWaitTime)(Code) | | Returns the amount of time the pseudo server will wait for a server socket to be released (in msec)
before allocating a new one. See also
PseudoServer.getWaitThreshhold getWaitThreshhold .
|
setWaitThreshhold | public static void setWaitThreshhold(int waitThreshhold)(Code) | | Specifies the number of server sockets that must have been allocated and not returned before waiting for one
to be returned.
|
shutDown | public void shutDown()(Code) | | |
|
|