org.glassfish.grizzly.http.util
Class Parameters

java.lang.Object
  extended by org.glassfish.grizzly.http.util.Parameters

public final class Parameters
extends Object

Author:
Costin Manolache

Field Summary
static Charset DEFAULT_CHARSET
           
static String DEFAULT_ENCODING
           
static int INITIAL_SIZE
           
 
Constructor Summary
Parameters()
           
 
Method Summary
 void addParameter(String key, String value)
           
 void addParameterValues(String key, String[] newValues)
           
 Parameters getCurrentSet()
           
 String getParameter(String name)
           
 Set<String> getParameterNames()
           
 String[] getParameterValues(String name)
           
 void handleQueryParameters()
          Process the query string into parameters
 String paramsAsString()
          Debug purpose
 void pop()
          Discard the last child.
 void processParameters(Buffer buffer, int start, int len)
           
 void processParameters(Buffer buffer, int start, int len, Charset enc)
           
 void processParameters(char[] chars, int start, int len)
           
 void processParameters(DataChunk data)
           
 void processParameters(DataChunk data, Charset encoding)
           
 void processParameters(String str)
           
 void processSingleParameters(String str)
          Used by RequestDispatcher
 void push()
          Create ( or reuse ) a child that will be used during a sub-request.
 void recycle()
           
 void setEncoding(Charset encoding)
           
 void setHeaders(MimeHeaders headers)
           
 void setLimit(int limit)
           
 void setQuery(DataChunk queryBC)
           
 void setQueryStringEncoding(Charset queryStringEncoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_SIZE

public static final int INITIAL_SIZE
See Also:
Constant Field Values

DEFAULT_ENCODING

public static final String DEFAULT_ENCODING
See Also:
Constant Field Values

DEFAULT_CHARSET

public static final Charset DEFAULT_CHARSET
Constructor Detail

Parameters

public Parameters()
Method Detail

setQuery

public void setQuery(DataChunk queryBC)

setHeaders

public void setHeaders(MimeHeaders headers)

setLimit

public void setLimit(int limit)

setEncoding

public void setEncoding(Charset encoding)

setQueryStringEncoding

public void setQueryStringEncoding(Charset queryStringEncoding)

recycle

public void recycle()

getCurrentSet

public Parameters getCurrentSet()

push

public void push()
Create ( or reuse ) a child that will be used during a sub-request. All future changes ( setting query string, adding parameters ) will affect the child ( the parent request is never changed ). Both setters and getters will return the data from the deepest child, merged with data from parents.


pop

public void pop()
Discard the last child. This happens when we return from a sub-request and the parameters are locally modified.


addParameterValues

public void addParameterValues(String key,
                               String[] newValues)

getParameterValues

public String[] getParameterValues(String name)

getParameterNames

public Set<String> getParameterNames()

getParameter

public String getParameter(String name)

handleQueryParameters

public void handleQueryParameters()
Process the query string into parameters


addParameter

public void addParameter(String key,
                         String value)
                  throws IllegalStateException
Throws:
IllegalStateException

processParameters

public void processParameters(Buffer buffer,
                              int start,
                              int len)

processParameters

public void processParameters(Buffer buffer,
                              int start,
                              int len,
                              Charset enc)

processParameters

public void processParameters(char[] chars,
                              int start,
                              int len)

processParameters

public void processParameters(DataChunk data)

processParameters

public void processParameters(DataChunk data,
                              Charset encoding)

paramsAsString

public String paramsAsString()
Debug purpose


processSingleParameters

public void processSingleParameters(String str)
Used by RequestDispatcher


processParameters

public void processParameters(String str)


Copyright © 2012 Oracle Corporation. All Rights Reserved.