edu.wisc.my.webproxy.beans.http
Class RequestImpl

java.lang.Object
  extended by edu.wisc.my.webproxy.beans.http.RequestImpl
All Implemented Interfaces:
Request

public class RequestImpl
extends Object
implements Request

This class is the implementation of the methods defined in the (@link edu.wisc.my.webproxy.beans.http.Request) interface

Version:
$Id: RequestImpl.java 20993 2010-07-02 19:32:47Z edalquist $
Author:
nramzan

Constructor Summary
RequestImpl()
           
RequestImpl(ParameterPair[] postAtributes, IHeader[] headers, String url, String type, String authType)
           
 
Method Summary
 IHeader createHeader(String name, String value)
          Creates and return an empty Header
 String getAuthType()
          Retrives the type(Basic, Form, NTML) of the authentication that was set on this object
 IHeader[] getHeaders()
          Retrieves an array of Headers that this object contains.
 ParameterPair[] getParameters()
          Retrieves all the post parameters on this object contained in map to make a post request
 String getType()
          Retrieves the type of the request that this object contains
 String getUrl()
          Retrieves the base url as a String that this object contains
 void setAuthType(String authType)
          There are a few differnt type of HTTP authentications, such as Basic, Form-based, NTLM etc.
 void setHeaders(IHeader[] h)
          Sets the Static Headers to this object
 void setParameters(ParameterPair[] sPostAttributes)
          Sets all the post parameters on this object contained in map to make a post request
 void setType(String type)
          Sets the type (GET, POST, HEAD) of the request that need to made to the remote server It may not be null
 void setUrl(String url)
          Sets the base url that is needed to make the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestImpl

public RequestImpl()

RequestImpl

public RequestImpl(ParameterPair[] postAtributes,
                   IHeader[] headers,
                   String url,
                   String type,
                   String authType)
Parameters:
state -
postAtributes -
headers -
url -
type -
authType -
Method Detail

setHeaders

public void setHeaders(IHeader[] h)
Description copied from interface: Request
Sets the Static Headers to this object

Specified by:
setHeaders in interface Request
Parameters:
h - the Headers to use for the request
See Also:
edu.wisc.my.webproxy.beans.http.Request#addHeaders(edu.wisc.my.webproxy.beans.http.IHeader[])

getHeaders

public IHeader[] getHeaders()
Description copied from interface: Request
Retrieves an array of Headers that this object contains.

Specified by:
getHeaders in interface Request
Returns:
Header[] an array of Headers that this object contains.

setUrl

public void setUrl(String url)
Description copied from interface: Request
Sets the base url that is needed to make the request. It may be not be null

Specified by:
setUrl in interface Request
Parameters:
url - the url as a string that is needed to make request to the remote server.

getUrl

public String getUrl()
Description copied from interface: Request
Retrieves the base url as a String that this object contains

Specified by:
getUrl in interface Request
Returns:
url the url as String that this object contains.

setType

public void setType(String type)
Description copied from interface: Request
Sets the type (GET, POST, HEAD) of the request that need to made to the remote server It may not be null

Specified by:
setType in interface Request
Parameters:
type - the request type as a String that need to be made to the remote server

getType

public String getType()
Description copied from interface: Request
Retrieves the type of the request that this object contains

Specified by:
getType in interface Request
Returns:
type the request type as String that this object contains.

createHeader

public IHeader createHeader(String name,
                            String value)
Description copied from interface: Request
Creates and return an empty Header

Specified by:
createHeader in interface Request
Returns:
header a empty Header that has no name and value.

setParameters

public void setParameters(ParameterPair[] sPostAttributes)
Description copied from interface: Request
Sets all the post parameters on this object contained in map to make a post request

Specified by:
setParameters in interface Request

getParameters

public ParameterPair[] getParameters()
Description copied from interface: Request
Retrieves all the post parameters on this object contained in map to make a post request

Specified by:
getParameters in interface Request
Returns:
postParameters a Map containing all the parameters to make a post request.

setAuthType

public void setAuthType(String authType)
Description copied from interface: Request
There are a few differnt type of HTTP authentications, such as Basic, Form-based, NTLM etc. Sets the type(Basic, Form, NTML) of the authentication that need to be used for successful authentication

Specified by:
setAuthType in interface Request
Parameters:
authType - the authentication type as a String to identify the type of authentication request

getAuthType

public String getAuthType()
Description copied from interface: Request
Retrives the type(Basic, Form, NTML) of the authentication that was set on this object

Specified by:
getAuthType in interface Request
Returns:
authType the authentication type as a String that was set on thsi object


Copyright © 2010 Jasig. All Rights Reserved.