com.ibm.di.parser
Class HTTPParser

java.lang.Object
  extended by com.ibm.di.parser.ParserImpl
      extended by com.ibm.di.parser.HTTPParser
All Implemented Interfaces:
ParserInterface, VersionInfoInterface

public class HTTPParser
extends ParserImpl


Field Summary
static String ENCODING_LATIN_1
           
static String HTTP_FILE_NOT_FOUND
           
static String HTTP_FORBIDDEN
           
static String HTTP_OK
           
static String HTTP_REDIR
           
 
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
 
Constructor Summary
HTTPParser()
           
 
Method Summary
 String[] getNames(Entry e)
           
 Object getProp(Entry e, String prop)
           
 String getVersion()
          Return version information
 void httpAuthenticationRequest(String realm)
          Send a Forbidden response requesting authentication
 void httpForbidden()
          Send a HTTP/FORBIDDEN response onto the output stream.
 void initParser()
          Perform initialization of parser.
 void parseAuthentication(Entry entry)
           
 int readByte()
           
 Entry readEntry()
          Return the next entry from the current input stream
 String readLine()
           
 void sendAuthorization(Entry entry, BufferedWriter out)
          Send client authorization
 void setClientMode(boolean clientMode)
           
 void setProp(Entry e, String prop, Object value)
           
 void setUseProperties(boolean useProps)
           
 void writeEntry(Entry entry)
          Write an entry to the current output stream
 
Methods inherited from class com.ibm.di.parser.ParserImpl
closeParser, debug, debugMode, flush, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_OK

public static final String HTTP_OK
See Also:
Constant Field Values

HTTP_FILE_NOT_FOUND

public static final String HTTP_FILE_NOT_FOUND
See Also:
Constant Field Values

HTTP_FORBIDDEN

public static final String HTTP_FORBIDDEN
See Also:
Constant Field Values

HTTP_REDIR

public static final String HTTP_REDIR
See Also:
Constant Field Values

ENCODING_LATIN_1

public static final String ENCODING_LATIN_1
See Also:
Constant Field Values
Constructor Detail

HTTPParser

public HTTPParser()
Method Detail

initParser

public void initParser()
                throws Exception
Description copied from class: ParserImpl
Perform initialization of parser.

Specified by:
initParser in interface ParserInterface
Overrides:
initParser in class ParserImpl
Throws:
Exception

setUseProperties

public void setUseProperties(boolean useProps)

setClientMode

public void setClientMode(boolean clientMode)

readByte

public int readByte()
             throws Exception
Throws:
Exception

readLine

public String readLine()
                throws Exception
Throws:
Exception

readEntry

public Entry readEntry()
                throws Exception
Description copied from interface: ParserInterface
Return the next entry from the current input stream

Returns:
The next entry from the input stream
Throws:
Exception

writeEntry

public void writeEntry(Entry entry)
                throws Exception
Description copied from interface: ParserInterface
Write an entry to the current output stream

Parameters:
entry - The entry to write
Throws:
Exception

parseAuthentication

public void parseAuthentication(Entry entry)
                         throws Exception
Throws:
Exception

setProp

public void setProp(Entry e,
                    String prop,
                    Object value)

getProp

public Object getProp(Entry e,
                      String prop)

getNames

public String[] getNames(Entry e)

httpForbidden

public void httpForbidden()
                   throws IOException
Send a HTTP/FORBIDDEN response onto the output stream.

Throws:
IOException

httpAuthenticationRequest

public void httpAuthenticationRequest(String realm)
                               throws IOException
Send a Forbidden response requesting authentication

Throws:
IOException

sendAuthorization

public void sendAuthorization(Entry entry,
                              BufferedWriter out)
                       throws Exception
Send client authorization

Throws:
Exception

getVersion

public String getVersion()
Return version information