org.jacorb.orb.http.httpserver

Class ServeConnection


public class ServeConnection
extends java.lang.Object

Field Summary

static int
SC_ACCEPTED
static int
SC_BAD_GATEWAY
static int
SC_BAD_REQUEST
static int
SC_CONFLICT
static int
SC_CONTINUE
static int
SC_CREATED
static int
SC_FORBIDDEN
static int
SC_GATEWAY_TIMEOUT
static int
SC_GONE
static int
SC_HTTP_VERSION_NOT_SUPPORTED
static int
SC_INTERNAL_SERVER_ERROR
static int
SC_LENGTH_REQUIRED
static int
SC_METHOD_NOT_ALLOWED
static int
SC_MOVED_PERMANENTLY
static int
SC_MOVED_TEMPORARILY
static int
SC_MULTIPLE_CHOICES
static int
SC_NON_AUTHORITATIVE_INFORMATION
static int
SC_NOT_ACCEPTABLE
static int
SC_NOT_FOUND
static int
SC_NOT_IMPLEMENTED
static int
SC_NOT_MODIFIED
static int
SC_NO_CONTENT
static int
SC_OK
static int
SC_PARTIAL_CONTENT
static int
SC_PAYMENT_REQUIRED
static int
SC_PRECONDITION_FAILED
static int
SC_PROXY_AUTHENTICATION_REQUIRED
static int
SC_REQUEST_ENTITY_TOO_LARGE
static int
SC_REQUEST_TIMEOUT
static int
SC_REQUEST_URI_TOO_LONG
static int
SC_RESET_CONTENT
static int
SC_SEE_OTHER
static int
SC_SERVICE_UNAVAILABLE
static int
SC_SWITCHING_PROTOCOLS
static int
SC_UNAUTHORIZED
static int
SC_UNSUPPORTED_MEDIA_TYPE
static int
SC_USE_PROXY

Constructor Summary

ServeConnection(Socket socket, java.io.InputStream _in)

Method Summary

void
answerRequest(byte[] answer)
void
close()
boolean
containsHeader(String name)
String
encodeRedirectUrl(String url)
String
encodeUrl(String url)
Object
getAttribute(String name)
String
getAuthType()
String
getCharacterEncoding()
int
getContentLength()
String
getContentType()
long
getDateHeader(String name, long def)
String
getHeader(String name)
Enumeration
getHeaderNames()
ServeInputStream
getInputStream()
int
getIntHeader(String name, int def)
long
getLongHeader(String name, long def)
String
getMethod()
ServeOutputStream
getOutputStream()
String
getParameter(String name)
Enumeration
getParameterNames()
String[]
getParameterValues(String name)
String
getPathInfo()
String
getPathTranslated()
String
getProtocol()
String
getQueryString()
BufferedReader
getReader()
String
getRealPath(String path)
String
getRemoteAddr()
String
getRemoteHost()
String
getRemoteUser()
String
getRequestURI()
String
getRequestedSessionId()
String
getScheme()
String
getServerName()
int
getServerPort()
String
getServletPath()
PrintWriter
getWriter()
boolean
isRequestedSessionIdFromCookie()
boolean
isRequestedSessionIdFromUrl()
boolean
isRequestedSessionIdValid()
void
sendError(int resCode)
void
sendError(int resCode, String resMessage)
void
sendRedirect(String location)
void
setContentLength(int length)
void
setContentType(String type)
void
setDateHeader(String name, long value)
void
setHeader(String name, String value)
void
setIntHeader(String name, int value)
void
setLongHeader(String name, long value)
void
setStatus(int resCode)
void
setStatus(int resCode, String resMessage)
static String[]
splitStr(String str)

Field Details

SC_ACCEPTED

public static final int SC_ACCEPTED

Field Value:
202


SC_BAD_GATEWAY

public static final int SC_BAD_GATEWAY

Field Value:
502


SC_BAD_REQUEST

public static final int SC_BAD_REQUEST

Field Value:
400


SC_CONFLICT

public static final int SC_CONFLICT

Field Value:
409


SC_CONTINUE

public static final int SC_CONTINUE

Field Value:
100


SC_CREATED

public static final int SC_CREATED

Field Value:
201


SC_FORBIDDEN

public static final int SC_FORBIDDEN

Field Value:
403


SC_GATEWAY_TIMEOUT

public static final int SC_GATEWAY_TIMEOUT

Field Value:
504


SC_GONE

public static final int SC_GONE

Field Value:
410


SC_HTTP_VERSION_NOT_SUPPORTED

public static final int SC_HTTP_VERSION_NOT_SUPPORTED

Field Value:
505


SC_INTERNAL_SERVER_ERROR

public static final int SC_INTERNAL_SERVER_ERROR

Field Value:
500


SC_LENGTH_REQUIRED

public static final int SC_LENGTH_REQUIRED

Field Value:
411


SC_METHOD_NOT_ALLOWED

public static final int SC_METHOD_NOT_ALLOWED

Field Value:
405


SC_MOVED_PERMANENTLY

public static final int SC_MOVED_PERMANENTLY

Field Value:
301


SC_MOVED_TEMPORARILY

public static final int SC_MOVED_TEMPORARILY

Field Value:
302


SC_MULTIPLE_CHOICES

public static final int SC_MULTIPLE_CHOICES

Field Value:
300


SC_NON_AUTHORITATIVE_INFORMATION

public static final int SC_NON_AUTHORITATIVE_INFORMATION

Field Value:
203


SC_NOT_ACCEPTABLE

public static final int SC_NOT_ACCEPTABLE

Field Value:
406


SC_NOT_FOUND

public static final int SC_NOT_FOUND

Field Value:
404


SC_NOT_IMPLEMENTED

public static final int SC_NOT_IMPLEMENTED

Field Value:
501


SC_NOT_MODIFIED

public static final int SC_NOT_MODIFIED

Field Value:
304


SC_NO_CONTENT

public static final int SC_NO_CONTENT

Field Value:
204


SC_OK

public static final int SC_OK

Field Value:
200


SC_PARTIAL_CONTENT

public static final int SC_PARTIAL_CONTENT

Field Value:
206


SC_PAYMENT_REQUIRED

public static final int SC_PAYMENT_REQUIRED

Field Value:
402


SC_PRECONDITION_FAILED

public static final int SC_PRECONDITION_FAILED

Field Value:
412


SC_PROXY_AUTHENTICATION_REQUIRED

public static final int SC_PROXY_AUTHENTICATION_REQUIRED

Field Value:
407


SC_REQUEST_ENTITY_TOO_LARGE

public static final int SC_REQUEST_ENTITY_TOO_LARGE

Field Value:
413


SC_REQUEST_TIMEOUT

public static final int SC_REQUEST_TIMEOUT

Field Value:
408


SC_REQUEST_URI_TOO_LONG

public static final int SC_REQUEST_URI_TOO_LONG

Field Value:
414


SC_RESET_CONTENT

public static final int SC_RESET_CONTENT

Field Value:
205


SC_SEE_OTHER

public static final int SC_SEE_OTHER

Field Value:
303


SC_SERVICE_UNAVAILABLE

public static final int SC_SERVICE_UNAVAILABLE

Field Value:
503


SC_SWITCHING_PROTOCOLS

public static final int SC_SWITCHING_PROTOCOLS

Field Value:
101


SC_UNAUTHORIZED

public static final int SC_UNAUTHORIZED

Field Value:
401


SC_UNSUPPORTED_MEDIA_TYPE

public static final int SC_UNSUPPORTED_MEDIA_TYPE

Field Value:
415


SC_USE_PROXY

public static final int SC_USE_PROXY

Field Value:
305

Constructor Details

ServeConnection

public ServeConnection(Socket socket,
                       java.io.InputStream _in)

Method Details

answerRequest

public void answerRequest(byte[] answer)


close

public void close()


containsHeader

public boolean containsHeader(String name)


encodeRedirectUrl

public String encodeRedirectUrl(String url)


encodeUrl

public String encodeUrl(String url)


getAttribute

public Object getAttribute(String name)


getAuthType

public String getAuthType()


getCharacterEncoding

public String getCharacterEncoding()


getContentLength

public int getContentLength()


getContentType

public String getContentType()


getDateHeader

public long getDateHeader(String name,
                          long def)


getHeader

public String getHeader(String name)


getHeaderNames

public Enumeration getHeaderNames()


getInputStream

public ServeInputStream getInputStream()
            throws IOException


getIntHeader

public int getIntHeader(String name,
                        int def)


getLongHeader

public long getLongHeader(String name,
                          long def)


getMethod

public String getMethod()


getOutputStream

public ServeOutputStream getOutputStream()


getParameter

public String getParameter(String name)


getParameterNames

public Enumeration getParameterNames()


getParameterValues

public String[] getParameterValues(String name)


getPathInfo

public String getPathInfo()


getPathTranslated

public String getPathTranslated()


getProtocol

public String getProtocol()


getQueryString

public String getQueryString()


getReader

public BufferedReader getReader()


getRealPath

public String getRealPath(String path)


getRemoteAddr

public String getRemoteAddr()


getRemoteHost

public String getRemoteHost()


getRemoteUser

public String getRemoteUser()


getRequestURI

public String getRequestURI()


getRequestedSessionId

public String getRequestedSessionId()


getScheme

public String getScheme()


getServerName

public String getServerName()


getServerPort

public int getServerPort()


getServletPath

public String getServletPath()


getWriter

public PrintWriter getWriter()
            throws IOException


isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()


isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()


isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()


sendError

public void sendError(int resCode)
            throws IOException


sendError

public void sendError(int resCode,
                      String resMessage)
            throws IOException


sendRedirect

public void sendRedirect(String location)
            throws IOException


setContentLength

public void setContentLength(int length)


setContentType

public void setContentType(String type)


setDateHeader

public void setDateHeader(String name,
                          long value)


setHeader

public void setHeader(String name,
                      String value)


setIntHeader

public void setIntHeader(String name,
                         int value)


setLongHeader

public void setLongHeader(String name,
                          long value)


setStatus

public void setStatus(int resCode)


setStatus

public void setStatus(int resCode,
                      String resMessage)


splitStr

public static String[] splitStr(String str)