Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
L
M
N
P
Q
R
S
T
U
W
A
add(String)
- Method in class mmhttp.protocol.
ChunkedResponse
Sends a chunk of text to the client.
add(byte[])
- Method in class mmhttp.protocol.
ChunkedResponse
Sends a chunk of data to the client.
addCredentials(String, String)
- Method in class mmhttp.protocol.
RequestBuilder
Adds digest authentication credentials to the request.
addHeader(String, String)
- Method in class mmhttp.protocol.
RequestBuilder
Adds a header to the request.
addHeader(String, String)
- Method in class mmhttp.protocol.
Response
Add an header to the response.
addInput(String, Object)
- Method in class mmhttp.protocol.
RequestBuilder
Add inputs that will be go in the query string.
addInputAsPart(String, Object)
- Method in class mmhttp.protocol.
RequestBuilder
Add the input as multi-part content to the request.
addInputAsPart(String, InputStream, int, String)
- Method in class mmhttp.protocol.
RequestBuilder
Same as addInputAsPart(String name, Object content) except that this version should be used for large datasets that wouldn't want to load into memory all at once.
addSpecificHeaders()
- Method in class mmhttp.protocol.
ChunkedResponse
addSpecificHeaders()
- Method in class mmhttp.protocol.
InputStreamResponse
addSpecificHeaders()
- Method in class mmhttp.protocol.
Response
addSpecificHeaders()
- Method in class mmhttp.protocol.
SimpleResponse
addStandardHeaders()
- Method in class mmhttp.protocol.
Response
addTrailingHeader(String, String)
- Method in class mmhttp.protocol.
ChunkedResponse
Trailing headers are sent to the client after all the chunks have been delievered.
authenticate(Server, Request, Responder)
- Method in class mmhttp.server.
Authenticator
This is the primary method used for authenticating a user for a given request.
Authenticator
- Class in
mmhttp.server
Base class for all authentication implementations.
Authenticator()
- Constructor for class mmhttp.server.
Authenticator
authenticator
- Variable in class mmhttp.server.
Server
Default: PromiscuousAuthenticator.
authorizationPassword
- Variable in class mmhttp.protocol.
Request
authorizationUsername
- Variable in class mmhttp.protocol.
Request
B
Base64
- Class in
mmhttp.protocol
This class supports Base 64 encoding and decoding.
Base64()
- Constructor for class mmhttp.protocol.
Base64
buildPath(String[])
- Static method in class mmhttp.util.
FileUtil
C
ChunkedResponse
- Class in
mmhttp.protocol
This a special type of Response that supports HTTP 1.1 Chunking.
ChunkedResponse()
- Constructor for class mmhttp.protocol.
ChunkedResponse
clone()
- Method in class mmhttp.server.
LogData
close()
- Method in class mmhttp.protocol.
ChunkedResponse
Call this method to conclude the response.
close()
- Method in interface mmhttp.protocol.
ResponseSender
close()
- Method in class mmhttp.server.
Expediter
Logs the request and closes the socket.
closeAll()
- Method in class mmhttp.protocol.
ChunkedResponse
This is a short cut to be used if there are not traling headers.
closeChunks()
- Method in class mmhttp.protocol.
ChunkedResponse
Call this method when you are through sending all the chunks.
closeTrailer()
- Method in class mmhttp.protocol.
ChunkedResponse
Call this method when you're finished sending trailing headers.
combineArrays(String[], String[])
- Static method in class mmhttp.util.
StringUtil
copyBytes(InputStream, OutputStream)
- Static method in class mmhttp.util.
FileUtil
createDir(String)
- Static method in class mmhttp.util.
FileUtil
createFile(String, String)
- Static method in class mmhttp.util.
FileUtil
createFile(File, String)
- Static method in class mmhttp.util.
FileUtil
createGoodResponse(Request)
- Method in class mmhttp.server.
Expediter
Creates the correct response object based on the request and authentication settings.
CRLF
- Static variable in class mmhttp.protocol.
Response
D
decode(String)
- Static method in class mmhttp.protocol.
Base64
Decodes a block of Base 64 encoded text.
decode(byte[])
- Static method in class mmhttp.protocol.
Base64
Decodes an array of encoded bytes.
decodeContent(String)
- Static method in class mmhttp.protocol.
Request
Decodes the URL unescaping all the escaped characters.
DEFAULT_CONTENT_TYPE
- Static variable in class mmhttp.protocol.
Response
defaultResponder
- Variable in class mmhttp.server.
ResponderFactory
Used in the event that none of the registered Responders match a request.
delete()
- Method in class mmhttp.protocol.
UploadedFile
Deletes the temp file containing the uploaded file content.
deleteFile(String)
- Static method in class mmhttp.util.
FileUtil
deleteFile(File)
- Static method in class mmhttp.util.
FileUtil
deleteFileSystemDirectory(String)
- Static method in class mmhttp.util.
FileUtil
deleteFileSystemDirectory(File)
- Static method in class mmhttp.util.
FileUtil
E
encode(String)
- Static method in class mmhttp.protocol.
Base64
Encodes a block of text.
encode(byte[])
- Static method in class mmhttp.protocol.
Base64
Encodes an array of bytes.
ENDL
- Static variable in class mmhttp.util.
FileUtil
entityBody
- Variable in class mmhttp.protocol.
Request
ErrorResponder
- Class in
mmhttp.server
Used in the event of an error.
ErrorResponder(Exception)
- Constructor for class mmhttp.server.
ErrorResponder
ErrorResponder(String)
- Constructor for class mmhttp.server.
ErrorResponder
Expediter
- Class in
mmhttp.server
This class fills a role in the restaurant metaphore.
Expediter(Socket, Server)
- Constructor for class mmhttp.server.
Expediter
Constructs an Expediter with a fresh socket connection, and the Server from whence it came.
F
FileUtil
- Class in
mmhttp.util
FileUtil()
- Constructor for class mmhttp.util.
FileUtil
G
getAuthorizationPassword()
- Method in class mmhttp.protocol.
Request
getAuthorizationUsername()
- Method in class mmhttp.protocol.
Request
getBody()
- Method in class mmhttp.protocol.
Request
getBody()
- Method in class mmhttp.protocol.
ResponseParser
getBoundary()
- Method in class mmhttp.protocol.
RequestBuilder
Build a unique boundary for sparating multi-part content.
getBytes()
- Method in class mmhttp.protocol.
SimpleResponse
The HTTP response bytes are generated and returned.
getContent()
- Method in class mmhttp.protocol.
SimpleResponse
getContentBytes()
- Method in class mmhttp.protocol.
SimpleResponse
getContentLength()
- Method in class mmhttp.protocol.
Request
getContentSize()
- Method in class mmhttp.protocol.
ChunkedResponse
getContentSize()
- Method in class mmhttp.protocol.
InputStreamResponse
getContentSize()
- Method in class mmhttp.protocol.
Response
A method to get the size of the response content.
getContentSize()
- Method in class mmhttp.protocol.
SimpleResponse
getContentType()
- Method in class mmhttp.protocol.
Response
getDirectoryListing(File)
- Static method in class mmhttp.util.
FileUtil
getEncodedBytes(String)
- Method in class mmhttp.protocol.
Response
getFile()
- Method in class mmhttp.protocol.
UploadedFile
getFileBytes(File)
- Static method in class mmhttp.util.
FileUtil
getFileContent(String)
- Static method in class mmhttp.util.
FileUtil
getFileContent(File)
- Static method in class mmhttp.util.
FileUtil
getFileLines(String)
- Static method in class mmhttp.util.
FileUtil
getFileLines(File)
- Static method in class mmhttp.util.
FileUtil
getHeader(String)
- Method in class mmhttp.protocol.
Request
Retrieves the value of HTTP headers in the request.
getHeader(String)
- Method in class mmhttp.protocol.
Response
Get the value of a header already set on this response.
getHeader(String)
- Method in class mmhttp.protocol.
ResponseParser
getInput(String)
- Method in class mmhttp.protocol.
Request
Retrives the value of inputs that were included in the query string or multipart data of the request.
getName()
- Method in class mmhttp.protocol.
UploadedFile
getQueryString()
- Method in class mmhttp.protocol.
Request
getReasonPhrase()
- Method in class mmhttp.protocol.
Response
getReasonPhrase(int)
- Static method in class mmhttp.protocol.
Response
Provideds the HTTP description for each response status code.
getRequestLine()
- Method in class mmhttp.protocol.
Request
getRequestParsingTimeLimit()
- Method in class mmhttp.server.
Expediter
getRequestUri()
- Method in class mmhttp.protocol.
Request
getResource()
- Method in class mmhttp.protocol.
Request
getResponderFactory()
- Method in class mmhttp.server.
Server
getSocket()
- Method in class mmhttp.server.
Expediter
getStatus()
- Method in class mmhttp.protocol.
Response
getStatus()
- Method in class mmhttp.protocol.
ResponseParser
getText()
- Method in class mmhttp.protocol.
RequestBuilder
getText()
- Method in class mmhttp.protocol.
SimpleResponse
The HTTP response bytes are generated and converted into a String.
getType()
- Method in class mmhttp.protocol.
UploadedFile
getUserpass(String)
- Method in class mmhttp.protocol.
Request
Helper method public only for testing.
getValueFor(byte)
- Static method in class mmhttp.protocol.
Base64
A helper method which is public only for testing purposes.
H
hasBeenParsed()
- Method in class mmhttp.protocol.
Request
hasHeader(String)
- Method in class mmhttp.protocol.
Request
hasHeader(String)
- Method in class mmhttp.protocol.
ResponseParser
hasInput(String)
- Method in class mmhttp.protocol.
Request
Tells you if the specified input was included in the query string or multipart data.
headers
- Variable in class mmhttp.protocol.
Request
host
- Variable in class mmhttp.server.
LogData
host
- Variable in class mmhttp.server.
Server
InetAddress to specify specific interfaces.
HttpException
- Exception in
mmhttp.protocol
HttpException(String)
- Constructor for exception mmhttp.protocol.
HttpException
I
input
- Variable in class mmhttp.protocol.
Request
inputs
- Variable in class mmhttp.protocol.
Request
InputStreamResponse
- Class in
mmhttp.protocol
A derivative of Response that is ideal for large data sets.
InputStreamResponse()
- Constructor for class mmhttp.protocol.
InputStreamResponse
isAuthenticated(String, String)
- Method in class mmhttp.server.
Authenticator
Should be overriden to validate the credentials.
isAuthenticated(String, String)
- Method in class mmhttp.server.
PromiscuousAuthenticator
isReadyToSend()
- Method in class mmhttp.protocol.
ChunkedResponse
isRestricted(Responder)
- Method in class mmhttp.server.
Authenticator
Should be overridden to determine if the specifed Responder should require a valid user to be logged in.
isRunning()
- Method in class mmhttp.server.
Server
isUsable()
- Method in class mmhttp.protocol.
UploadedFile
J
join(List, String)
- Static method in class mmhttp.util.
StringUtil
L
log(Socket, Request, Response)
- Method in class mmhttp.server.
Expediter
Constructs the LogData and sends it to the Server's Logger for logging.
log(LogData)
- Method in interface mmhttp.server.
Logger
LogData
- Class in
mmhttp.server
An object representing all the loggable data of a request.
LogData()
- Constructor for class mmhttp.server.
LogData
Logger
- Interface in
mmhttp.server
logger
- Variable in class mmhttp.server.
Server
A Logger object that will log each request.
M
makeDir(String)
- Static method in class mmhttp.util.
FileUtil
makeExceptionString(Exception)
- Static method in class mmhttp.server.
ErrorResponder
makeHttpHeaders()
- Method in class mmhttp.protocol.
Response
Build the headers portion of the response.
makeLogData(Socket, Request, Response)
- Static method in class mmhttp.server.
Expediter
Constructs a LogData object representing the loggable data of this request.
makeRequest()
- Method in class mmhttp.server.
Expediter
Instantiates the request.
makeResponse(Server, Request)
- Method in class mmhttp.server.
ErrorResponder
makeResponse(Server, Request)
- Method in class mmhttp.server.
NotFoundResponder
makeResponse(Server, Request)
- Method in interface mmhttp.server.
Responder
makeResponse(Server, Request)
- Method in class mmhttp.server.
UnauthorizedResponder
makeStandardHttpDateFormat()
- Static method in class mmhttp.protocol.
Response
HTTP Protocol fluff.
mmhttp.protocol
- package mmhttp.protocol
mmhttp.server
- package mmhttp.server
mmhttp.util
- package mmhttp.util
N
name
- Variable in class mmhttp.server.
Server
Server name the will be used in the Server header of each response.
NotFoundResponder
- Class in
mmhttp.server
Creates a 404 Not Found response.
NotFoundResponder()
- Constructor for class mmhttp.server.
NotFoundResponder
numberOfBytesParsed()
- Method in class mmhttp.protocol.
Request
Sometimes clients will stop transmitting halfway through a request.
P
parse()
- Method in class mmhttp.protocol.
Request
Parses the request.
parseCredentials()
- Method in class mmhttp.protocol.
Request
The digest authentication parameters are not used by default.
parseQueryString(String)
- Method in class mmhttp.protocol.
Request
performHttpRequest(String, int, RequestBuilder)
- Static method in class mmhttp.protocol.
ResponseParser
A convenience method that will perform a complete HTTP request, returning a parsed response.
port
- Variable in class mmhttp.server.
Server
The port that the server will listen to.
PromiscuousAuthenticator
- Class in
mmhttp.server
An implementation of Authenticator that lets every request thought.
PromiscuousAuthenticator()
- Constructor for class mmhttp.server.
PromiscuousAuthenticator
Q
queryString
- Variable in class mmhttp.protocol.
Request
queryString()
- Method in class mmhttp.protocol.
RequestBuilder
Builds the query string for this request.
R
readyToSend(ResponseSender)
- Method in class mmhttp.protocol.
ChunkedResponse
Begins the transfer of the HTTP response.
readyToSend(ResponseSender)
- Method in class mmhttp.protocol.
InputStreamResponse
This initiated the transmition of data.
readyToSend(ResponseSender)
- Method in class mmhttp.protocol.
Response
To be called when response has been prepared and is ready to go out the door.
readyToSend(ResponseSender)
- Method in class mmhttp.protocol.
SimpleResponse
Converts the response into HTTP compliant bytes and sends them through the ResponseSender.
realm
- Variable in class mmhttp.server.
Server
Displayed by the browser when promting for user credentials.
redirect(String)
- Method in class mmhttp.protocol.
Response
Configures this response to be a redirect to the specified URL.
register(String, Class)
- Method in class mmhttp.server.
ResponderFactory
Use this method to register your custom Responders.
register(String, Class)
- Method in class mmhttp.server.
Server
Shortcut to ResponderFactory.register.
Request
- Class in
mmhttp.protocol
This class is one of the primary work horses of MM HTTP.
Request()
- Constructor for class mmhttp.protocol.
Request
Request(InputStream)
- Constructor for class mmhttp.protocol.
Request
Constructs a new Request with the provided InputStream, however the stream will not be read and the request will not be parsed until calling parse().
RequestBuilder
- Class in
mmhttp.protocol
While Request is used for parsing requests, this clas is used to build request.
RequestBuilder(String)
- Constructor for class mmhttp.protocol.
RequestBuilder
Contructs a new RequestBuilder with the specified resource.
requestLine
- Variable in class mmhttp.protocol.
Request
requestLine
- Variable in class mmhttp.server.
LogData
requestParsingTimeLimit
- Variable in class mmhttp.server.
Expediter
requestTimeout
- Variable in class mmhttp.server.
Server
Time to wait, in milliseconds, for a request to parse.
requestURI
- Variable in class mmhttp.protocol.
Request
resource
- Variable in class mmhttp.protocol.
Request
Responder
- Interface in
mmhttp.server
An interface that custom Responders must implement.
responderClassFor(String)
- Method in class mmhttp.server.
ResponderFactory
This method is used to retreives the first matching Responder class for a given resource.
ResponderFactory
- Class in
mmhttp.server
The spawning place of all Responders.
ResponderFactory()
- Constructor for class mmhttp.server.
ResponderFactory
responderFactory
- Variable in class mmhttp.server.
Server
The ResponderFactory will create Responders for each request.
responderFor(String)
- Method in class mmhttp.server.
ResponderFactory
This will find the correct Responder for the resource and construct it using the default constructor.
Response
- Class in
mmhttp.protocol
The base class for building HTTP 1.1 compliant responses.
Response()
- Constructor for class mmhttp.protocol.
Response
Empty constructor.
Response(int)
- Constructor for class mmhttp.protocol.
Response
A constructor that sets the status of the response.
ResponseParser
- Class in
mmhttp.protocol
Used to parse HTTP 1.1 responses.
ResponseParser(InputStream)
- Constructor for class mmhttp.protocol.
ResponseParser
The Response will be read out of the provided InputStream.
ResponseSender
- Interface in
mmhttp.protocol
Implementers of this interface are responsible for sending responses over a socket.
S
send(OutputStream)
- Method in class mmhttp.protocol.
RequestBuilder
Writes an HTTP 1.1 compiant representation of the request to the provided OutputStream.
send(byte[])
- Method in interface mmhttp.protocol.
ResponseSender
send(byte[])
- Method in class mmhttp.server.
Expediter
Writes the given bytes to the socket output stream.
sendResponse()
- Method in class mmhttp.server.
Expediter
Initiated the delivery of the response.
serve(Socket)
- Method in class mmhttp.server.
Server
Serves a socket connection.
Server
- Class in
mmhttp.server
This is where the action begins.
Server()
- Constructor for class mmhttp.server.
Server
Constructs a new Server.
Server(int)
- Constructor for class mmhttp.server.
Server
A convenience constructor that sets the port.
setBody(InputStream, int)
- Method in class mmhttp.protocol.
InputStreamResponse
Sets the body of the response.
setBody(File)
- Method in class mmhttp.protocol.
InputStreamResponse
A shorcut to send a file.
setContent(String)
- Method in class mmhttp.protocol.
SimpleResponse
Sets the content (body) of the response.
setContent(byte[])
- Method in class mmhttp.protocol.
SimpleResponse
Sets the content (body) of the response.
setContentType(String)
- Method in class mmhttp.protocol.
Response
Sets the Content-Type header.
setDefaultResponder(Class)
- Method in class mmhttp.server.
Server
Sets the default Responder.
setExpiresHeader(String)
- Method in class mmhttp.protocol.
Response
Gives the response an expiration data.
setHostAndPort(String, int)
- Method in class mmhttp.protocol.
RequestBuilder
Use to build the Host header.
setLastModifiedHeader(String)
- Method in class mmhttp.protocol.
Response
Tells the client when the requested resource was last modified.
setMaxAge(int)
- Method in class mmhttp.protocol.
Response
Configures the response for chaching by setting the Cache-Control header to 'max-age=<age>'.
setMethod(String)
- Method in class mmhttp.protocol.
RequestBuilder
Sets the HTTP method...
setRequestParsingTimeLimit(long)
- Method in class mmhttp.server.
Expediter
Sets the time, in milliseconds, to wait for the request to be parsed.
setStatus(int)
- Method in class mmhttp.protocol.
Response
Sets the status of the response
SimpleResponse
- Class in
mmhttp.protocol
The most basic implementation of Response.
SimpleResponse()
- Constructor for class mmhttp.protocol.
SimpleResponse
Default constructor with no configuration.
SimpleResponse(int)
- Constructor for class mmhttp.protocol.
SimpleResponse
A convenience contructor that will set the port.
SimpleResponse(int, String)
- Constructor for class mmhttp.protocol.
SimpleResponse
A convenience contructor that will set the port and content.
size
- Variable in class mmhttp.server.
LogData
start()
- Method in class mmhttp.server.
Expediter
Expedites the request.
start()
- Method in class mmhttp.server.
Server
Starts the server.
status
- Variable in class mmhttp.server.
LogData
stop()
- Method in class mmhttp.server.
Server
Stops the server gracefully waiting for all the request threads to complete.
StringUtil
- Class in
mmhttp.util
StringUtil()
- Constructor for class mmhttp.util.
StringUtil
T
time
- Variable in class mmhttp.server.
LogData
toString()
- Method in class mmhttp.protocol.
Request
toString()
- Method in class mmhttp.protocol.
ResponseParser
toString()
- Method in class mmhttp.protocol.
UploadedFile
toString()
- Method in class mmhttp.server.
Authenticator
U
UnauthorizedResponder
- Class in
mmhttp.server
Generates a 401 response which will usually cause the browser to promt the user for credentials.
UnauthorizedResponder()
- Constructor for class mmhttp.server.
UnauthorizedResponder
UploadedFile
- Class in
mmhttp.protocol
When parsing a request that contains uploaded files, the file data will be bundled up in instance of this class.
UploadedFile(String, String, File)
- Constructor for class mmhttp.protocol.
UploadedFile
username
- Variable in class mmhttp.server.
LogData
W
writeLinesToFile(String, List)
- Static method in class mmhttp.util.
FileUtil
writeLinesToFile(File, List)
- Static method in class mmhttp.util.
FileUtil
A
B
C
D
E
F
G
H
I
J
L
M
N
P
Q
R
S
T
U
W
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
Copyright © 2009 Micah Martin. All Rights Reserved.