com.tensegrity.palojava.http.handlers
Class HttpHeaderHandler

java.lang.Object
  extended by com.tensegrity.palojava.http.handlers.HttpHeaderHandler

public class HttpHeaderHandler
extends java.lang.Object

This HttpHandler is used to parse header strings of a palo server http response. It provides usefull methods for accessing the fields. Furthermore it will notice if a header field changed due to changes in the palo server. In future version one can register an listener to get notified about those changes

Version:
$Id$
Author:
ArndHouben

Constructor Summary
HttpHeaderHandler()
           
 
Method Summary
 int getContentLength()
          Returns the length of the subsequent content data
 long getCubeToken()
          Returns the value of the cube token header field
 long getDatabaseToken()
          Returns the value of the database token header field
 long getDimensionToken()
          Returns the value of the dimension token header field
 long getServerToken()
          Returns the value of the server token header field
 void parse(java.io.BufferedReader reader)
          Parses the palo serverresponse and reads out all known header fields
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeaderHandler

public HttpHeaderHandler()
Method Detail

parse

public final void parse(java.io.BufferedReader reader)
                 throws java.lang.NumberFormatException,
                        java.io.IOException
Parses the palo serverresponse and reads out all known header fields

Parameters:
reader - a BufferedReader which contains the palo server response
Throws:
java.lang.NumberFormatException
java.io.IOException

getContentLength

public final int getContentLength()
Returns the length of the subsequent content data

Returns:
the content length

getServerToken

public final long getServerToken()
Returns the value of the server token header field

Returns:
the server token value

getDatabaseToken

public final long getDatabaseToken()
Returns the value of the database token header field

Returns:
the database token value

getDimensionToken

public final long getDimensionToken()
Returns the value of the dimension token header field

Returns:
the dimension token value

getCubeToken

public final long getCubeToken()
Returns the value of the cube token header field

Returns:
the cube token value