ePOST API

rice.email.proxy.web
Class WebConnection

java.lang.Object
  extended by rice.email.proxy.web.WebConnection

public class WebConnection
extends java.lang.Object


Field Summary
static java.text.SimpleDateFormat DATE
           
protected  Environment environment
           
protected  WebHandler handler
           
protected  java.lang.String http
           
 java.io.StreamTokenizer in
           
static java.lang.String LINE_FEED
           
protected  Logger logger
           
protected  java.util.HashMap options
           
 java.io.Writer out
           
protected  java.util.HashMap parameters
           
protected  java.lang.String redirect
           
protected  java.lang.String request
           
protected  java.lang.StringBuffer response
           
protected  java.net.Socket socket
           
protected  java.lang.String status
           
static java.lang.String STATUS_AUTH_REQUIRED
           
static java.lang.String STATUS_ERROR
           
static java.lang.String STATUS_INVALID_REQUEST
           
static java.lang.String STATUS_NOT_FOUND
           
static java.lang.String STATUS_OK
           
static java.lang.String STATUS_REDIRECT
           
protected  int type
           
static int TYPE_GET
           
static int TYPE_POST
           
 
Constructor Summary
WebConnection(WebHandler handler, java.net.Socket socket, Environment env)
           
 
Method Summary
protected  java.lang.String cleanse(java.lang.String string)
           
 void error(java.lang.String status, java.lang.String message)
           
 Environment getEnvironment()
           
 java.lang.String getParameter(java.lang.String name)
           
protected  void parseParameters(java.lang.String parameters)
           
 void print(java.lang.String line)
           
 void println(java.lang.String line)
           
 void quit()
           
 java.lang.String readRequest()
           
 void redirect(java.lang.String location)
           
 void send()
           
 void setStatus(java.lang.String status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_OK

public static final java.lang.String STATUS_OK
See Also:
Constant Field Values

STATUS_REDIRECT

public static final java.lang.String STATUS_REDIRECT
See Also:
Constant Field Values

STATUS_AUTH_REQUIRED

public static final java.lang.String STATUS_AUTH_REQUIRED
See Also:
Constant Field Values

STATUS_NOT_FOUND

public static final java.lang.String STATUS_NOT_FOUND
See Also:
Constant Field Values

STATUS_ERROR

public static final java.lang.String STATUS_ERROR
See Also:
Constant Field Values

STATUS_INVALID_REQUEST

public static final java.lang.String STATUS_INVALID_REQUEST
See Also:
Constant Field Values

TYPE_GET

public static final int TYPE_GET
See Also:
Constant Field Values

TYPE_POST

public static final int TYPE_POST
See Also:
Constant Field Values

LINE_FEED

public static final java.lang.String LINE_FEED
See Also:
Constant Field Values

DATE

public static final java.text.SimpleDateFormat DATE

socket

protected java.net.Socket socket

out

public java.io.Writer out

in

public java.io.StreamTokenizer in

handler

protected WebHandler handler

type

protected int type

options

protected java.util.HashMap options

parameters

protected java.util.HashMap parameters

http

protected java.lang.String http

request

protected java.lang.String request

status

protected java.lang.String status

redirect

protected java.lang.String redirect

response

protected java.lang.StringBuffer response

environment

protected Environment environment

logger

protected Logger logger
Constructor Detail

WebConnection

public WebConnection(WebHandler handler,
                     java.net.Socket socket,
                     Environment env)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getParameter

public java.lang.String getParameter(java.lang.String name)

parseParameters

protected void parseParameters(java.lang.String parameters)

cleanse

protected java.lang.String cleanse(java.lang.String string)

readRequest

public java.lang.String readRequest()
                             throws WebException,
                                    java.io.IOException
Throws:
WebException
java.io.IOException

redirect

public void redirect(java.lang.String location)
              throws java.io.IOException
Throws:
java.io.IOException

error

public void error(java.lang.String status,
                  java.lang.String message)
           throws java.io.IOException
Throws:
java.io.IOException

setStatus

public void setStatus(java.lang.String status)

println

public void println(java.lang.String line)

print

public void print(java.lang.String line)

send

public void send()
          throws java.io.IOException
Throws:
java.io.IOException

quit

public void quit()

getEnvironment

public Environment getEnvironment()

ePOST API

Copyright © 2001-2005 - Rice Pastry.