Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal
Class BrowserInfo

    java.lang.Object
      org.jasig.portal.BrowserInfo

    public class BrowserInfo

extends java.lang.Object

Field Summary
`protected javax.servlet.http.Cookie[]` | `cookies`
`protected java.util.Map` | `headers`

Constructor Summary
`BrowserInfo()` Constructs a new empty browser info
`BrowserInfo(javax.servlet.http.Cookie[] cookies, java.util.Map headers)` Constructs a new browser info with supplied cookies and header info
`BrowserInfo(javax.servlet.http.HttpServletRequest req)` Construct a new browser info based on HTTP request.

Method Summary
`javax.servlet.http.Cookie[]` | `getCookies()`
`java.lang.String` | `getHeader(java.lang.String hName)` Get value of a particular header.
`java.util.Map` | `getHeaders()` Get the headers as a Map.
`java.lang.String` | `getUserAgent()` Obtain a "user-agent" header contained in the request.
`void` | `setCookies(javax.servlet.http.Cookie[] cookies)`
`void` | `setHeaders(java.util.Map headers)` Sets the headers.
`java.lang.String` | `toString()` Overrides Object's toString().

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### cookies

    protected javax.servlet.http.Cookie[] cookies

### headers

    protected java.util.Map headers

Constructor Detail

### BrowserInfo

    public BrowserInfo()

  Constructs a new empty browser info

### BrowserInfo

    public BrowserInfo(javax.servlet.http.Cookie[] cookies,
                       java.util.Map headers)

  Constructs a new browser info with supplied cookies and header info

  Parameters:
    `cookies` - an array of cookies
    `headers` - a Map of headers

### BrowserInfo

    public BrowserInfo(javax.servlet.http.HttpServletRequest req)

  Construct a new browser info based on HTTP request.

  Parameters:
    `req` - a `HttpServletRequest` value

Method Detail

### getCookies

    public javax.servlet.http.Cookie[] getCookies()

### setCookies

    public void setCookies(javax.servlet.http.Cookie[] cookies)

### getHeader

    public java.lang.String getHeader(java.lang.String hName)

  Get value of a particular header.

  Parameters:
    `hName` - a `String` value
  Returns:
    a `String` value

### getHeaders

    public java.util.Map getHeaders()

  Get the headers as a Map.

  Returns:
    a map of headers

### setHeaders

    public void setHeaders(java.util.Map headers)

  Sets the headers.

  Parameters:
    `headers` - a Map of headers

### getUserAgent

    public java.lang.String getUserAgent()

  Obtain a "user-agent" header contained in the request.

  Returns:
    a `String` value

### toString

    public java.lang.String toString()

  Overrides Object's toString(). The string form of this object is sometimes used to generate a key for caching objects in the portal.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    state the state of this object in string form

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD