ibspan.tss.agents.pra.server.http
Class HttpReplyHdr

java.lang.Object
  extended by ibspan.tss.agents.pra.server.http.HttpReplyHdr

public class HttpReplyHdr
extends Object

Generates a http reply header. The header indicates the outcome of a http request.

Author:
Pawel Kaczmarek, Sherman Janes

Constructor Summary
HttpReplyHdr()
           
 
Method Summary
 boolean addErrorDescription(String str)
          Adds an extra explanation.
 String formAccepted()
          Indicates the document was accepted.
 String formCreated()
          Indicates a new file was created.
 String formForbidden()
          Client if forbidden to get the request service.
 String formFound()
          Never seen this used.
 String formInternalError()
          The server had a problem and could not fulfill the request.
 String formMethod()
          The requested method is not implemented by the server.
 String formMoved()
          Indicates a requested URL has moved to a new address or name.
 String formNotFound()
          The requested object was not found.
 String formNotImplemented()
          Server does not do the requested feature.
 String formNotModified()
          Indicates remote copy of the requested object is current.
 String formOk(String ContentType, long ContentLength)
          Forms a http ok reply header
 String formOverloaded()
          Server is overloaded, client should try again latter.
 String formPartial()
          Indicates only a partial responce was sent.
 String formPaymentNeeded()
          Payment is required for service.
 String formServerNotFound()
          Indicates the client's proxies could not locate a server.
 String formTimeout()
          Indicates the request took to long.
 String formUnautorized()
          Client not otherized for the request.
 boolean setModifiedDate(String date)
          Sets the last modified date for a header;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpReplyHdr

public HttpReplyHdr()
Method Detail

setModifiedDate

public boolean setModifiedDate(String date)
Sets the last modified date for a header;

Parameters:
date - A string holding an interner date
Returns:
true

addErrorDescription

public boolean addErrorDescription(String str)
Adds an extra explanation. This extra information is Added to the http headers failure explanation.

Parameters:
str - Description to add.
Returns:
true.

formOk

public String formOk(String ContentType,
                     long ContentLength)
Forms a http ok reply header

Parameters:
ContentType - The mime-type of the content
Returns:
A string with the header in it

formCreated

public String formCreated()
Indicates a new file was created.

Returns:
The header in a string;

formAccepted

public String formAccepted()
Indicates the document was accepted.

Returns:
The header in a string;

formPartial

public String formPartial()
Indicates only a partial responce was sent.

Returns:
The header in a string;

formMoved

public String formMoved()
Indicates a requested URL has moved to a new address or name.

Returns:
The header in a string;

formFound

public String formFound()
Never seen this used.

Returns:
The header in a string;

formMethod

public String formMethod()
The requested method is not implemented by the server.

Returns:
The header in a string;

formNotModified

public String formNotModified()
Indicates remote copy of the requested object is current.

Returns:
The header in a string;

formUnautorized

public String formUnautorized()
Client not otherized for the request.

Returns:
The header in a string;

formPaymentNeeded

public String formPaymentNeeded()
Payment is required for service.

Returns:
The header in a string;

formForbidden

public String formForbidden()
Client if forbidden to get the request service.

Returns:
The header in a string;

formNotFound

public String formNotFound()
The requested object was not found.

Returns:
The header in a string;

formInternalError

public String formInternalError()
The server had a problem and could not fulfill the request.

Returns:
The header in a string;

formNotImplemented

public String formNotImplemented()
Server does not do the requested feature.

Returns:
The header in a string;

formOverloaded

public String formOverloaded()
Server is overloaded, client should try again latter.

Returns:
The header in a string;

formTimeout

public String formTimeout()
Indicates the request took to long.

Returns:
The header in a string;

formServerNotFound

public String formServerNotFound()
Indicates the client's proxies could not locate a server.

Returns:
The header in a string;